muParserX 2.0.0
|
Token reader for the ParserXBase class. More...
#include <mpTokenReader.h>
Public Member Functions | |
TokenReader (ParserXBase *a_pParent) | |
Constructor. | |
~TokenReader () | |
Destructor (trivial). | |
TokenReader * | Clone (ParserXBase *a_pParent) const |
Create instance of a ParserTokenReader identical with this and return its pointer. | |
int | GetPos () const |
Return the current position of the token reader in the formula string. | |
const string_type & | GetExpr () const |
Return a reference to the formula. | |
const var_maptype & | GetUsedVar () const |
Return a map containing the used variables only. | |
void | SetExpr (const string_type &a_sExpr) |
Initialize the token Reader. | |
void | ReInit () |
Reset the token reader to the start of the formula. | |
ptr_tok_type | ReadNextToken () |
Read the next token from the string. | |
Token reader for the ParserXBase class.
mup::TokenReader::TokenReader | ( | ParserXBase * | a_pParent | ) |
Constructor.
Create a Token reader and bind it to a parser object.
a_pParent | Parent parser object of the token reader. |
mup::TokenReader::~TokenReader | ( | ) |
Destructor (trivial).
nothrow |
TokenReader * mup::TokenReader::Clone | ( | ParserXBase * | a_pParent | ) | const |
Create instance of a ParserTokenReader identical with this and return its pointer.
This is a factory method the calling function must take care of the object destruction.
nothrow |
const string_type & mup::TokenReader::GetExpr | ( | ) | const |
Return a reference to the formula.
nothrow |
int mup::TokenReader::GetPos | ( | ) | const |
Return the current position of the token reader in the formula string.
nothrow |
void mup::TokenReader::ReInit | ( | ) |
Reset the token reader to the start of the formula.
nothrow |
The syntax flags will be reset to a value appropriate for the start of a formula.
void mup::TokenReader::SetExpr | ( | const string_type & | a_sExpr | ) |
Initialize the token Reader.
Sets the expression position index to zero and set Syntax flags to default for initial parsing.