|
MADNESS
version 0.9
|
Encapsulation of the data for a single formula token. More...
#include <muParserToken.h>
Public Types | |
| enum | ETokFlags { flVOLATILE = 1 } |
| Additional token flags. More... | |
Public Member Functions | |
| ParserToken () | |
| Constructor (default). More... | |
| ParserToken (const ParserToken &a_Tok) | |
| Create token from another one. More... | |
| ParserToken & | operator= (const ParserToken &a_Tok) |
| Assignement operator. More... | |
| void | Assign (const ParserToken &a_Tok) |
| Copy token information from argument. More... | |
| void | AddFlags (int a_iFlags) |
| Add additional flags to the token. More... | |
| bool | IsFlagSet (int a_iFlags) const |
| Check if a certain flag ist set. 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. More... | |
| 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 |
| void * | GetFuncAddr () const |
| Return the address of the callback function assoziated with function and operator tokens. More... | |
| TBase | GetVal () const |
| Get value of the token. More... | |
| 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:
| enum mu::ParserToken::ETokFlags |
|
inline |
Constructor (default).
Sets token to an neutral state of type cmUNKNOWN.
| nothrow |
|
inline |
Create token from another one.
Implemented by calling Assign(...)
| nothrow |
|
inline |
Add additional flags to the token.
Flags are currently used to mark volatile (non optimizeable) functions.
Referenced by mu::ParserToken< value_type, string_type >::Set(), mu::ParserToken< value_type, string_type >::SetString(), and mu::ParserToken< value_type, string_type >::SetVar().
|
inline |
Copy token information from argument.
| nothrow |
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.
|
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 |
|
inline |
Return the token type.
| nothrow |
|
inline |
Return the address of the callback function assoziated with function and operator tokens.
| exception_type | if token type is non of:
|
|
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 |
|
inline |
|
inline |
|
inline |
Get value of the token.
Only applicable to variable and value tokens.
| exception_type | if token is no value/variable token. |
|
inline |
Get address of a variable token.
Valid only if m_iType==CmdVar.
| exception_type | if token is no variable token. |
|
inline |
Check if a certain flag ist set.
| nothrow |
|
inline |
Assignement operator.
Copy token state from another token and return this. Implemented by calling Assign(...).
| nothrow |
|
inline |
Assign a token type.
Token may not be of type value, variable or function. Those have seperate set functions.
|
inline |
Set Callback type.
|
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 |
|
inline |
Make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
| nothrow |
|
inline |
Make this token a value token.
Member variables not necessary for value tokens will be invalidated.
| nothrow |
|
inline |
make this token a variable token.
Member variables not necessary for variable tokens will be invalidated.
| nothrow |
1.8.8