muParserX 2.0.0
|
The variable class represents a parser variable. More...
#include <mpVariable.h>
Public Member Functions | |
Variable (IValue *pVal) | |
Create a variable and bind a value to it. | |
virtual IValue & | operator= (const Value &val) |
Assign a value to the variable. | |
virtual char_type | GetType () const |
Returns a character representing the type of the variable. | |
IValue * | GetPtr () const |
Returns the Value pointer bound to this variable. | |
Public Member Functions inherited from mup::IValue | |
int | GetDim () const |
Returns the dimension of the value represented by a value object. | |
bool | IsNonComplexScalar () const |
Returns true if the type is either floating point or interger. | |
bool | IsScalar () const |
Returns true if the type is not a vector and not a string. | |
bool | IsScalarOrBool () const |
Returns true if this value represents a scalar value or a boolean value. | |
bool | IsInteger () const |
Returns true if this value is a noncomplex integer. | |
bool | IsMatrix () const |
Returns true if this value is an array. | |
bool | IsComplex () const |
Returns true if this value is a complex value. | |
bool | IsString () const |
Returns true if this value is a string value. | |
Public Member Functions inherited from mup::IToken | |
ECmdCode | GetCode () const |
return the token code. | |
const string_type & | GetIdent () const |
Return the token identifier string. |
Additional Inherited Members | |
Protected Member Functions inherited from mup::IToken | |
virtual | ~IToken () |
Destructor (trivial). | |
IToken (const IToken &ref) | |
Copy constructor. |
The variable class represents a parser variable.
This class stores a pointer to a value object and refers all operations to this value object.
mup::Variable::Variable | ( | IValue * | pVal | ) |
Create a variable and bind a value to it.
pVal | Pointer of the value to bind to this variable. |
It is possible to create an empty variable object by setting pVal to nullptr. Such variable objects must be bound later in order to be of any use. The parser does NOT assume ownership over the pointer!
IValue * mup::Variable::GetPtr | ( | ) | const |
Returns the Value pointer bound to this variable.
nothrow |
|
virtual |
Returns a character representing the type of the variable.
nothrow |
Implements mup::IValue.