|
virtual | ~TreeNode () |
| Destructor deleting all children of this node.
|
|
|
Re-implement in derived classes.
|
virtual void | writeToFile (const char *) VOID_IMPLEMENTATION("writeToFile") |
| Writes the subtree represented by this node to a file.
|
|
virtual void | readFromFile (const char *) VOID_IMPLEMENTATION("readFromFile") |
| Reads the subtree represented by this node from a file.
|
|
virtual void | writeToString (std::string &) VOID_IMPLEMENTATION("writeToString") |
| Generates a string representation of the subtree represented by this node to a file.
|
|
virtual void | readFromString (const std::string &) VOID_IMPLEMENTATION("readFromString") |
| Reads the subtree represented by this node from a string.
|
|
|
Each method appends a child representing the variable/object given as first parameter and identified via the second.
You can also add several children with the same name. This feature should be used with care though, because it is not specified here whether the implementation preserves the object order while reading and writing. Those methods with VOID_IMPLEMENTATION must be reimplemented when used in derived classes. The first parameter is the value to be stored and the second holds a name for it (for example a tag name in XML files.
|
virtual void | addChild (bool val, const char *name) ADD_ULONG_CHILD |
| Factory method adding a child encapsulating a variable of type bool.
|
|
virtual void | addChild (unsigned char val, const char *name) ADD_ULONG_CHILD |
| Factory method adding a child encapsulating a variable of type unsigned char.
|
|
virtual void | addChild (char val, const char *name) ADD_LONG_CHILD |
| Factory method adding a child encapsulating a variable of type char.
|
|
virtual void | addChild (unsigned short val, const char *name) ADD_ULONG_CHILD |
| Factory method adding a child encapsulating a variable of type unsigned short.
|
|
virtual void | addChild (short val, const char *name) ADD_LONG_CHILD |
| Factory method adding a child encapsulating a variable of type short.
|
|
virtual void | addChild (unsigned int val, const char *name) ADD_ULONG_CHILD |
| Factory method adding a child encapsulating a variable of type unsigned int.
|
|
virtual void | addChild (int val, const char *name) ADD_LONG_CHILD |
| Factory method adding a child encapsulating a variable of type int.
|
|
virtual void | addChild (unsigned long, const char *) VOID_IMPLEMENTATION("addChild(unsigned long)") |
| Factory method adding a child encapsulating a variable of type long.
|
|
virtual void | addChild (long, const char *) VOID_IMPLEMENTATION("addChild(long)") |
| Factory method adding a child encapsulating a variable of type long.
|
|
virtual void | addChild (MLuint64, const char *) VOID_IMPLEMENTATION("addChild(MLuint64)") |
| Factory method adding a child encapsulating a variable of type MLuint64.
|
|
virtual void | addChild (MLint64, const char *) VOID_IMPLEMENTATION("addChild(MLint64)") |
| Factory method adding a child encapsulating a variable of type MLint64.
|
|
virtual void | addChild (float val, const char *name) ADD_LDOUBLE_CHILD |
| Factory method adding a child encapsulating a variable of type float.
|
|
virtual void | addChild (double val, const char *name) ADD_LDOUBLE_CHILD |
| Factory method adding a child encapsulating a variable of type double.
|
|
virtual void | addChild (long double, const char *) VOID_IMPLEMENTATION("addChild(long double)") |
| Factory method adding a child encapsulating a variable of type long double.
|
|
The class TreeNode is the abstract base class for the import/export of ML objects.
It provides an interface that allows the import/export of standard C types such as int or float, as well as standard ML types like Vector6 or SubImageBox, and last but definitely not least, of complex user defined objects. Polymorphy is supported by allowing the I/E of base objects which can created automatically using the runtime system, and can be initialized using the Base::readStateFromTree method.
Definition at line 154 of file mlTreeNode.h.