|
muParser API -
1.35
|
Encapsulation of the data for a single formula token. More...
#include <muParserToken.h>
Public Member Functions | |
| ParserToken () | |
| Constructor (default). More... | |
| ParserToken (const ParserToken &a_Tok) | |
| Create token from another one. More... | |
| ParserToken & | operator= (const ParserToken &a_Tok) |
| Assignment operator. More... | |
| void | Assign (const ParserToken &a_Tok) |
| Copy token information from argument. More... | |
| ParserToken & | Set (ECmdCode a_iType, const TString &a_strTok=TString()) |
| Assign a token type. More... | |
| ParserToken & | Set (const ParserCallback &a_pCallback, const TString &a_sTok) |
| Set Callback type. | |
| ParserToken & | SetVal (TBase a_fVal, const TString &a_strTok=TString()) |
| Make this token a value token. More... | |
| ParserToken & | SetVar (TBase *a_pVar, const TString &a_strTok) |
| make this token a variable token. More... | |
| ParserToken & | SetString (const TString &a_strTok, std::size_t a_iSize) |
| Make this token a variable token. More... | |
| void | SetIdx (int a_iIdx) |
| Set an index associated with the token related data. More... | |
| int | GetIdx () const |
| Return Index associated with the token related data. More... | |
| ECmdCode | GetCode () const |
| Return the token type. More... | |
| ETypeCode | GetType () const |
| int | GetPri () const |
| EOprtAssociativity | GetAssociativity () const |
| generic_fun_type | GetFuncAddr () const |
| Return the address of the callback function assoziated with function and operator tokens. More... | |
| TBase | GetVal () const |
| TBase * | GetVar () const |
| Get address of a variable token. More... | |
| int | GetArgCount () const |
| Return the number of function arguments. More... | |
| const TString & | GetAsString () const |
| Return the token identifier. More... | |
Encapsulation of the data for a single formula token.
Formula token implementation. Part of the Math Parser Package. Formula tokens can be either one of the following:
Definition at line 66 of file muParserToken.h.
|
inline |
Constructor (default).
Sets token to an neutral state of type cmUNKNOWN.
| nothrow |
Definition at line 87 of file muParserToken.h.
|
inline |
Create token from another one.
Implemented by calling Assign(...)
| nothrow |
Definition at line 106 of file muParserToken.h.
|
inline |
Copy token information from argument.
| nothrow |
Definition at line 129 of file muParserToken.h.
Referenced by mu::ParserToken< value_type, string_type >::operator=(), and mu::ParserToken< value_type, string_type >::ParserToken().
|
inline |
Return the number of function arguments.
Valid only if m_iType==CmdFUNC.
Definition at line 379 of file muParserToken.h.
|
inline |
Return the token identifier.
If #m_iType is cmSTRING the token identifier is the value of the string argument for a string function.
| nothrow |
Definition at line 398 of file muParserToken.h.
|
inline |
Return the token type.
| nothrow |
Definition at line 278 of file muParserToken.h.
|
inline |
Return the address of the callback function assoziated with function and operator tokens.
| exception_type | if token type is non of:
|
Definition at line 339 of file muParserToken.h.
|
inline |
Return Index associated with the token related data.
In cmSTRFUNC - This is the index to a string table in the main parser.
| exception_type | if #m_iIdx<0 or #m_iType!=cmSTRING |
Definition at line 264 of file muParserToken.h.
|
inline |
Get value of the token.
Only applicable to variable and value tokens.
\throw exception_type if token is no value/variable token.
Definition at line 350 of file muParserToken.h.
|
inline |
Get address of a variable token.
Valid only if m_iType==CmdVar.
| exception_type | if token is no variable token. |
Definition at line 366 of file muParserToken.h.
|
inline |
Assignment operator.
Copy token state from another token and return this. Implemented by calling Assign(...).
| nothrow |
Definition at line 118 of file muParserToken.h.
|
inline |
Assign a token type.
Token may not be of type value, variable or function. Those have separate set functions.
Definition at line 153 of file muParserToken.h.
|
inline |
Set an index associated with the token related data.
In cmSTRFUNC - This is the index to a string table in the main parser.
| a_iIdx | The index the string function result will take in the bytecode parser. |
| exception_type | if #a_iIdx<0 or #m_iType!=cmSTRING |
Definition at line 248 of file muParserToken.h.
|
inline |
Make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
| nothrow |
Definition at line 229 of file muParserToken.h.
|
inline |
Make this token a value token.
Member variables not necessary for value tokens will be invalidated.
| nothrow |
Definition at line 192 of file muParserToken.h.
|
inline |
make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
| nothrow |
Definition at line 212 of file muParserToken.h.
1.8.9.1