Represents the PARSE
section of mascot.dat
.
More...
#include <ms_parserule.hpp>
Public Member Functions | |
ms_parseoptions () | |
Default constructor. | |
ms_parseoptions (const ms_parseoptions &src) | |
Copying constructor. | |
~ms_parseoptions () | |
Destructor. | |
void | clearParseRules () |
Makes all rules unavailable. | |
void | copyFrom (const ms_parseoptions *right) |
Can be used to copy content from another instance. | |
void | defaultValues () |
Initializes the instance. | |
void | dropParseRule (const int index) |
Makes a parse rule with the specified index unavailable. | |
int | getNumberOfParseRules () const |
Can be used to get upper limit for a parse rule number. | |
const ms_parserule * | getParseRule (const int index) const |
Returns a parse rule by number. | |
std::string | getPreceedingComments () const |
Returns any comments preceeding the section. | |
bool | isSectionAvailable () const |
Check whether the section has been actually read from the file. | |
ms_parseoptions & | operator= (const ms_parseoptions &right) |
Assignment operator for C++ client applications. | |
void | setParseRule (const int index, const ms_parserule *rule) |
Set a new parse rule for a given number. | |
void | setPreceedingComments (const std::string &comments) |
Sets any comments preceeding the section. | |
void | setSectionAvailable (const bool value) |
Changes availability of the section, i.e. whether it should be saved in a file. |
Represents the PARSE
section of mascot.dat
.
Also get yourselves acquainted with the base class ms_customproperty. It facilitates the following tasks:
More functionality is described in the documentation for ms_customproperty.
void dropParseRule | ( | const int | index ) |
Makes a parse rule with the specified index unavailable.
Unavailable rules are not shown in the file any more and are not valid entries. In order to make it available again, create a new rule and put it in using setParseRule() member.
index | of rule to drop |
int getNumberOfParseRules | ( | ) | const |
Can be used to get upper limit for a parse rule number.
The limit is currently hard-coded. Use this function to retrieve its value.
const ms_parserule * getParseRule | ( | const int | index ) | const |
Returns a parse rule by number.
Parse rules are not not stored consecutively. They are stored according to their numbers explicitly specified in the file. So, not every number will yield an available rule. See ms_parserule::isAvailable().
index | a number from 0 to (getNumberOfParseRules()-1). |
std::string getPreceedingComments | ( | ) | const [inherited] |
Returns any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
bool isSectionAvailable | ( | ) | const |
Check whether the section has been actually read from the file.
By default the PARSE
section is unavailable until it has been set to a different state.
void setPreceedingComments | ( | const std::string & | comments ) | [inherited] |
Sets any comments preceeding the section.
Sections in the mascot.dat file may have comments preceeding them. In most cases, these comments need to stay 'attached' to the section.
Multiple line comments are supported by having a single string with newline characters
comments | any comments preceeding the section |
Copyright © 2022 Matrix Science Ltd. All Rights Reserved. Generated on Thu Mar 31 2022 01:12:35 |