Represents a single regular expression parsing rule. More...
#include <ms_parserule.hpp>
Public Member Functions | |
ms_parserule () | |
Default constructor. | |
ms_parserule (const ms_parserule &src) | |
Copying constructor. | |
~ms_parserule () | |
Destructor. | |
void | copyFrom (const ms_parserule *right) |
Copies all contents from another instance. | |
void | defaultValues () |
Initialises the instance. | |
std::string | getRuleStr () const |
Returns a string representing the rule. | |
bool | isAvailable () const |
Call this member to check if this rule has been specified in the file or just a placeholder. | |
ms_parserule & | operator= (const ms_parserule &right) |
Assignment operator for C++ client applications. | |
void | setAvailable (const bool value) |
Change the availability of the rule. | |
void | setRuleStr (const char *str) |
Change the rule string. | |
Represents a single regular expression parsing rule.
Instances of this class can be stored in ms_parseoptions as a list of parse rules specified in PARSE
section of mascot.dat
.
bool isAvailable | ( | ) | const |
Call this member to check if this rule has been specified in the file or just a placeholder.
Parse rules in the PARSE
section are specified in arbitrary order with their unique numbers. There might be gaps and unspecified rules. Therefore, it is recommended to check if the rule is actually available in the file before retrieving its properties.
By default this returns FALSE.
void setAvailable | ( | const bool | value | ) |
Change the availability of the rule.
See isAvailable() for more information.
value | boolean whether the rule is available or not |