Used by the framework for symbolic manipulation, e.g: in parsing, interpretation, etc.
More...
Public Types |
|
typedef uint16_t | Type |
Public Member Functions |
| | MNode () |
| | MNode (const MNode &n) |
|
| MNode (const MVar &v) |
|
| MNode (MObjectBase *obj, Type t=ObjectPointer) |
|
| MNode (const MObjectBase &obj) |
|
| MNode (Type type, const mstr &value) |
|
| MNode (const MVar *v) |
|
| MNode (MVar *v) |
|
| MNode (MStr *s) |
|
| MNode (const MStr &s) |
|
| MNode (const char *s) |
|
| MNode (bool x) |
|
| MNode (uint8_t x) |
|
| MNode (int8_t x) |
|
| MNode (uint16_t x) |
|
| MNode (int16_t x) |
|
| MNode (uint32_t x) |
|
| MNode (int32_t x) |
|
| MNode (uint64_t x) |
|
| MNode (int64_t x) |
|
| MNode (double x) |
|
| MNode (float x) |
|
| MNode (const MVector< MVar > &v) |
|
| MNode (const MList< MVar > &l) |
|
| MNode (const MNum &x) |
|
| MNode (const MReal &x) |
|
MVar & | attrs () |
|
const MVar & | attrs () const |
|
bool | hasAttrs () const |
|
void | clearAttrs (bool recursive=false) |
|
bool | operator== (const MNode &n) const |
|
bool | operator!= (const MNode &n) const |
|
bool | isSame (const MNode &n) const |
|
MNode & | operator= (const MNode &n) |
|
MNode & | operator[] (size_t i) const |
|
MNode & | operator[] (int i) const |
|
MNode & | operator[] (const MVar &v) const |
| MNode | copy () const |
| mstr | toStr (bool concise=true, bool quote=true) const |
| MNode & | operator+ (const MNode &n) |
|
MVar & | var () |
|
const MVar & | var () const |
| MVar & | val () |
|
const MVar & | val () const |
|
| operator bool () const |
|
| operator double () const |
|
| operator float () const |
|
| operator uint8_t () const |
|
| operator int8_t () const |
|
| operator uint16_t () const |
|
| operator int16_t () const |
|
| operator uint32_t () const |
|
| operator int32_t () const |
|
| operator uint64_t () const |
|
| operator int64_t () const |
|
| operator const MNum & () const |
|
| operator const char * () const |
|
| operator mstr & () |
|
| operator const mstr & () const |
|
| operator MVar & () |
|
| operator const MVar & () const |
|
| operator const MVector< MVar > & () const |
|
| operator MVector< MVar > & () |
|
| operator const MList< MVar > & () const |
|
| operator MList< MVar > & () |
| void | add (MNode node) |
| void | addFront (MNode node) |
| void | insert (size_t pos, MNode node) |
| void | remove (size_t pos) |
| void | append (MNode node) |
| size_t | size () const |
| bool | empty () const |
| void | pushBack (MNode node) |
| void | pushFront (MNode node) |
| void | push (MNode node) |
| MNode | popBack () |
| MNode | popFront () |
| MNode | pop () |
| bool | isFunction () const |
| bool | isFunction (const mstr &f) const |
| bool | isFunction (const mstr &f, size_t args) const |
| bool | isFunction (const mstr &f, size_t argsMin, size_t argsMax) const |
| bool | isNumeric () const |
| int | isRational () const |
| bool | isReal () const |
| bool | isObject () const |
| bool | isSymbol () const |
| bool | isSymbol (const mstr &name) const |
| bool | isString () const |
| bool | isConstant () const |
| bool | isCodeData () const |
| bool | isSymbolic () const |
| bool | isTrue () const |
| bool | isFalse () const |
| bool | isPtr () const |
| void | set (MNode n) |
| void | clear () |
| Type | type () const |
| void | setLineNumber (size_t lineNumber) |
| size_t | lineNumber () const |
| void | setFileName (const mstr &fileName) |
| const mstr & | fileName () const |
| void | setStartLine (size_t lineNumber) |
| size_t | startLine () const |
| void | setTokenId (int tokenId) |
| int | tokenId () const |
| void | clearInputs () |
| void | copyParseInfo (MNode node, bool recursive=true) |
| MVar | toVar () const |
| MObjectBase * | obj () |
| const mstr & | str () const |
| mstr & | str () |
| const char * | cstr () const |
| void | findReplace (MNode f, MNode r) |
| void | replace (const MVector< MVar > &ns, MNode r) |
| void | replace (size_t i, MNode ri) |
| void | replace (MNode r) |
Static Public Member Functions |
|
static MNode | convertVar (const MVar &v, bool convertCodeData=false) |
Static Public Attributes |
|
static const Type | NumericMask = 0x0010 |
|
static const Type | DefinedNumericMask = 0x0020 |
|
static const Type | Undefined = 0x0010 |
|
static const Type | Constant = 0x0031 |
|
static const Type | Integer = 0x0032 |
|
static const Type | Rational = 0x0033 |
|
static const Type | Float = 0x0034 |
|
static const Type | Real = 0x0036 |
|
static const Type | StringMask = 0x0040 |
|
static const Type | String = 0x0040 |
|
static const Type | Symbol = 0x0041 |
|
static const Type | Function = 0x0042 |
|
static const Type | ObjectMask = 0x0080 |
|
static const Type | ObjectPointer = 0x0081 |
|
static const Type | LocalObject = 0x0082 |
|
static const Type | SharedObject = 0x0083 |
|
static const Type | RawPointer = 0x0100 |
|
static const Type | CodeDataMask = 0x0200 |
Used by the framework for symbolic manipulation, e.g: in parsing, interpretation, etc.
MNode is the central data type used throughout the framework for symbolic manipulation, e.g: parsing, interpretation, etc. It subsumes mvar, adding symbols, and functions which make use of the MNode recursively.