ML Reference
|
The class TreeNode is the abstract base class for the import/export of ML objects. More...
#include <mlTreeNode.h>
Public Types | |
enum | ConstructionMode { CM_writerRoot, CM_readerRoot, CM_COUNT } |
TreeNode construction modes: More... | |
Public Member Functions | |
virtual | ~TreeNode () |
Destructor deleting all children of this node. | |
TREE IMPORT/EXPORT METHODS: | |
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 (char *&) VOID_IMPLEMENTATION("writeToString") |
Generates a string representation of the subtree represented by this node to a file. | |
virtual void | readFromString (const char *) VOID_IMPLEMENTATION("readFromString") |
Reads the subtree represented by this node from a string. | |
READING METHODS PROVIDED FOR CONVENIENCE. | |
Because they call the corresponding readChild() methods above by default, they do not necessarily have to be re-implemented in derived classes. | |
virtual TreeNode * | readContainerChild (const char *name=0) |
Returns the container child node that is identified by its name. | |
virtual Base * | readBaseChild (const char *name=0) |
Creates an object of type Base (or derived) from a child that is identified by its name. | |
virtual void | setVersion (const char *, int) |
/name MISCELLANEOUS METHODS: | |
virtual int | getVersion (const char *) |
Returns version of current node. | |
virtual const char * | getLastReadChildName () const |
Returns the name of the child most recently read. | |
bool | isRootNode () const |
Returns true if this node is a root node. | |
virtual char * | correctName (const char *) const |
Adapts a given name to the specific parser. | |
virtual bool | isCorrectName (const char *) const |
Allows the user to ask whether a given name is acceptable to the parser. | |
Protected Member Functions | |
std::vector< TreeNode * > & | _getChildTreeNodes () |
Returns a reference to children nodes in the ML object tree. | |
CONSTRUCTORS: | |
Both constructors are protected to underline the abstractness of this class. The derived class is to implement the first constructor as public, allowing the user to create a root node. | |
TreeNode (ConstructionMode) | |
This protected constructor has to be called by derived class' public constructor to create the root node of the tree. | |
TreeNode () | |
The protected standard constructor is called by the derived class to create a node that is not a root node. | |
PROTECTED TREE MODIFICATION METHODS: | |
void | _appendNewChild (TreeNode &newNode) |
Wrapper method for _childTreeNodes.push_back() implemented to avoid problems with Micro$oft's buggy STL implementation. | |
TREE WRITING METHODS: | |
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 TreeNode * | NULL |
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. | |
virtual void | addChild (const char *const , const char *) VOID_IMPLEMENTATION("addChild( const char* const )") |
Factory method adding a child encapsulating a variable of type string. | |
virtual void | addChild (const Vector2 &, const char *) VOID_IMPLEMENTATION("addChild(Vector2)") |
Factory method adding a child encapsulating a variable of type Vector2. | |
virtual void | addChild (const Vector3 &, const char *) VOID_IMPLEMENTATION("addChild(Vector3)") |
Factory method adding a child encapsulating a variable of type Vector3. | |
virtual void | addChild (const Vector4 &, const char *) VOID_IMPLEMENTATION("addChild(Vector4)") |
Factory method adding a child encapsulating a variable of type Vector4. | |
virtual void | addChild (const Vector6 &, const char *) VOID_IMPLEMENTATION("addChild(Vector6)") |
Factory method adding a child encapsulating a variable of type Vector6. | |
virtual void | addChild (const ImageVector &, const char *) VOID_IMPLEMENTATION("addChild(ImageVector)") |
Factory method adding a child encapsulating a variable of type ImageVector. | |
virtual void | addChild (const Matrix3 &, const char *) VOID_IMPLEMENTATION("addChild(Matrix3)") |
Factory method adding a child encapsulating a variable of type Matrix3. | |
virtual void | addChild (const Matrix4 &, const char *) VOID_IMPLEMENTATION("addChild(Matrix4)") |
Factory method adding a child encapsulating a variable of type Matrix4. | |
virtual void | addChild (const SubImageBox &, const char *) VOID_IMPLEMENTATION("addChild(SubImageBox)") |
Factory method adding a child encapsulating a variable of type SubImageBox. | |
virtual void | addChild (const SubImageBoxd &, const char *) VOID_IMPLEMENTATION("addChild(SubImageBoxd)") |
Factory method adding a child encapsulating a variable of type SubImageBoxd. | |
virtual void | addChild (const void *const , size_t, const char *) VOID_IMPLEMENTATION("addChild(void*)") |
Factory method adding a child encapsulating raw data, identified by name, beginning at address ptr, and containing noBytes bytes. | |
virtual void | addChild (const Base *const , const char *, bool=true) VOID_IMPLEMENTATION("addChild(Base*)") |
Factory method adding a child encapsulating an object of a class type derived from Base. | |
virtual TreeNode * | addChild (const char *) VOID_IMPLEMENTATION_RET("TreeNode* addChild()" |
Factory method adding a container child that does not encapsulate a specific object. | |
TREE READING METHODS: | |
Those with VOID_IMPLEMENTATION have to be re-implemented when used in derived classes. If name is 0, a method is specified to try reading the next child after the last read child (regardless of its name) and store the name in _lastName. | |
virtual bool | false |
virtual bool | hasChild (const char *=0) VOID_IMPLEMENTATION_RET("TreeNode* hasChild()" |
Returns true when a child of the given tagName exists. | |
virtual void | readChild (bool &val, const char *name=0) READ_LONG_CHILD_FOR_BOOL |
Reads the value of a child of type bool that is identified by its name. | |
virtual void | readChild (char &val, const char *name=0) READ_LONG_CHILD |
Reads the value of a child of type char that is identified by its name. | |
virtual void | readChild (unsigned char &val, const char *name=0) READ_ULONG_CHILD |
Reads the value of a child of type unsigned char that is identified by its name. | |
virtual void | readChild (short &val, const char *name=0) READ_LONG_CHILD |
Reads the value of a child of type short that is identified by its name. | |
virtual void | readChild (unsigned short &val, const char *name=0) READ_ULONG_CHILD |
Reads the value of a child of type unsigned short that is identified by its name. | |
virtual void | readChild (int &val, const char *name=0) READ_LONG_CHILD |
Reads the value of a child of type int that is identified by its name. | |
virtual void | readChild (unsigned int &val, const char *name=0) READ_ULONG_CHILD |
Reads the value of a child of type unsigned int that is identified by its name. | |
virtual void | readChild (long &, const char *=0) VOID_IMPLEMENTATION("readChild(long&)") |
Reads the value of a child of type long that is identified by its name. | |
virtual void | readChild (unsigned long &, const char *=0) VOID_IMPLEMENTATION("readChild(unsigned long&)") |
Reads the value of a child of type unsigned long that is identified by its name. | |
virtual void | readChild (MLint64 &, const char *=0) VOID_IMPLEMENTATION("readChild(MLint64&)") |
Reads the value of a child of type MLint64 that is identified by its name. | |
virtual void | readChild (MLuint64 &, const char *=0) VOID_IMPLEMENTATION("readChild(MLuint64&)") |
Reads the value of a child of type MLuint64 that is identified by its name. | |
virtual void | readChild (float &val, const char *name=0) READ_LDOUBLE_CHILD |
Reads the value of a child of type float that is identified by its name. | |
virtual void | readChild (double &val, const char *name=0) READ_LDOUBLE_CHILD |
Reads the value of a child of type double that is identified by its name. | |
virtual void | readChild (long double &, const char *=0) VOID_IMPLEMENTATION("readChild(long double&)") |
Reads the value of a child of type long double that is identified by its name. | |
virtual void | readChild (Vector2 &, const char *=0) VOID_IMPLEMENTATION("readChild(Vector2&)") |
Reads the value of a child of type Vector2 that is identified by its name. | |
virtual void | readChild (Vector3 &, const char *=0) VOID_IMPLEMENTATION("readChild(Vector3&)") |
Reads the value of a child of type Vector3 that is identified by its name. | |
virtual void | readChild (Vector4 &, const char *=0) VOID_IMPLEMENTATION("readChild(Vector4&)") |
Reads the value of a child of type Vector4 that is identified by its name. | |
virtual void | readChild (Vector6 &, const char *=0) VOID_IMPLEMENTATION("readChild(Vector6&)") |
Reads the value of a child of type Vector6 that is identified by its name. | |
virtual void | readChild (ImageVector &, const char *=0) VOID_IMPLEMENTATION("readChild(ImageVector&)") |
Reads the value of a child of type ImageVector that is identified by its name. | |
virtual void | readChild (Matrix3 &, const char *=0) VOID_IMPLEMENTATION("readChild(Matrix3&)") |
Reads the value of a child of type Matrix3 that is identified by its name. | |
virtual void | readChild (Matrix4 &, const char *=0) VOID_IMPLEMENTATION("readChild(Matrix4&)") |
Reads the value of a child of type Matrix4 that is identified by its name. | |
virtual void | readChild (SubImageBox &, const char *=0) VOID_IMPLEMENTATION("readChild(SubImageBox&)") |
Reads the value of a child of type SubImageBox that is identified by its name. | |
virtual void | readChild (SubImageBoxd &, const char *=0) VOID_IMPLEMENTATION("readChild(SubImageBoxd&)") |
Reads the value of a child of type SubImageBoxd that is identified by its name. | |
virtual void | readChild (void *&, unsigned long &, const char *=0) VOID_IMPLEMENTATION("readChild(char*&)") |
Reads a child containing raw data that is identified by its name. | |
virtual void | readChild (Base *&, const char *=0) VOID_IMPLEMENTATION("readChild(Base*&)") |
Method for reading a child of a type derived from Base that is identified by its name. | |
virtual void | readChild (Base &, const char *=0) VOID_IMPLEMENTATION("readChild(Base&)") |
This method is for reading an object of a type derived from base from the child with name name. | |
virtual void | readChild (TreeNode *&, const char *=0) VOID_IMPLEMENTATION("readChild(TreeNode*&)") |
Returns the child node that is identified by its name. | |
virtual void | readChild (char *&, const char *=0) VOID_IMPLEMENTATION("readChild(char*&)") |
Reads the value of a child of type char*, that is identified by its name. | |
virtual void | deleteString (char *) const VOID_IMPLEMENTATION("deleteString(char*)") |
Deletes a string that was created using void readChild (char*& val, const char* tagName);. |
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 157 of file mlTreeNode.h.
TreeNode construction modes:
CM_writerRoot |
Construct as root node for writing. |
CM_readerRoot |
Construct as root node for reading. |
CM_COUNT |
number of construction modes |
Definition at line 215 of file mlTreeNode.h.
virtual ml::TreeNode::~TreeNode | ( | ) | [virtual] |
Destructor deleting all children of this node.
ml::TreeNode::TreeNode | ( | ConstructionMode | ) | [inline, protected] |
This protected constructor has to be called by derived class' public constructor to create the root node of the tree.
It is not public itself to keep the user from attempting to create actual instances.
Definition at line 610 of file mlTreeNode.h.
References ML_TRACE_IN.
ml::TreeNode::TreeNode | ( | ) | [inline, protected] |
The protected standard constructor is called by the derived class to create a node that is not a root node.
Definition at line 618 of file mlTreeNode.h.
References ML_TRACE_IN.
void ml::TreeNode::_appendNewChild | ( | TreeNode & | newNode | ) | [inline, protected] |
Wrapper method for _childTreeNodes.push_back() implemented to avoid problems with Micro$oft's buggy STL implementation.
Definition at line 641 of file mlTreeNode.h.
std::vector<TreeNode*>& ml::TreeNode::_getChildTreeNodes | ( | ) | [protected] |
Returns a reference to children nodes in the ML object tree.
The user is only allowed to navigate through the structure while he creates (add...Child) or reads (read...Child) it. However derived classes need it sometimes so permit protected access.
virtual void ml::TreeNode::addChild | ( | double | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type double.
virtual void ml::TreeNode::addChild | ( | bool | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type bool.
virtual void ml::TreeNode::addChild | ( | unsigned short | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type unsigned short.
virtual void ml::TreeNode::addChild | ( | short | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type short.
virtual void ml::TreeNode::addChild | ( | float | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type float.
virtual void ml::TreeNode::addChild | ( | long | double, |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type long double.
virtual void ml::TreeNode::addChild | ( | const char * | const, |
const char * | |||
) | const [virtual] |
Factory method adding a child encapsulating a variable of type string.
virtual void ml::TreeNode::addChild | ( | unsigned int | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type unsigned int.
virtual void ml::TreeNode::addChild | ( | const Vector2 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Vector2.
virtual void ml::TreeNode::addChild | ( | const Vector3 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Vector3.
virtual void ml::TreeNode::addChild | ( | int | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type int.
virtual void ml::TreeNode::addChild | ( | const Vector4 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Vector4.
virtual void ml::TreeNode::addChild | ( | const Vector6 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Vector6.
virtual void ml::TreeNode::addChild | ( | unsigned char | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type unsigned char.
virtual void ml::TreeNode::addChild | ( | unsigned | long, |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type long.
virtual void ml::TreeNode::addChild | ( | const ImageVector & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type ImageVector.
virtual void ml::TreeNode::addChild | ( | const Matrix3 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Matrix3.
virtual void ml::TreeNode::addChild | ( | long | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type long.
virtual void ml::TreeNode::addChild | ( | const Matrix4 & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type Matrix4.
virtual void ml::TreeNode::addChild | ( | const SubImageBox & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type SubImageBox.
virtual void ml::TreeNode::addChild | ( | char | val, |
const char * | name | ||
) | [virtual] |
Factory method adding a child encapsulating a variable of type char.
virtual void ml::TreeNode::addChild | ( | MLuint64 | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type MLuint64.
virtual void ml::TreeNode::addChild | ( | const SubImageBoxd & | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type SubImageBoxd.
virtual void ml::TreeNode::addChild | ( | const void * | const, |
size_t | , | ||
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating raw data, identified by name, beginning at address ptr, and containing noBytes bytes.
virtual void ml::TreeNode::addChild | ( | MLint64 | , |
const char * | |||
) | [virtual] |
Factory method adding a child encapsulating a variable of type MLint64.
virtual void ml::TreeNode::addChild | ( | const Base * | const, |
const char * | , | ||
bool | = true |
||
) | [virtual] |
Factory method adding a child encapsulating an object of a class type derived from Base.
If generic is true, the actual type of the object is also written into the file in order to allow automatic construction of the object when reading it again.
virtual TreeNode* ml::TreeNode::addChild | ( | const char * | ) | [virtual] |
virtual char* ml::TreeNode::correctName | ( | const char * | ) | const [inline, virtual] |
Adapts a given name to the specific parser.
The string returned has to be deleted using deleteString(). Returns 0 if the adaption was unsuccessful.
Definition at line 588 of file mlTreeNode.h.
References VOID_IMPLEMENTATION_RET.
virtual void ml::TreeNode::deleteString | ( | char * | ) | const [virtual] |
Deletes a string that was created using void readChild (char*& val, const char* tagName);.
virtual const char* ml::TreeNode::getLastReadChildName | ( | ) | const [inline, virtual] |
Returns the name of the child most recently read.
Definition at line 581 of file mlTreeNode.h.
References VOID_IMPLEMENTATION_RET.
virtual int ml::TreeNode::getVersion | ( | const char * | ) | [inline, virtual] |
Returns version of current node.
Definition at line 578 of file mlTreeNode.h.
References VOID_IMPLEMENTATION_RET.
virtual bool ml::TreeNode::hasChild | ( | const char * | = 0 | ) | [virtual] |
Returns true
when a child of the given tagName exists.
If 0 is given as tagName, true is returned if a child with an arbitrary name was found behind the current reading position. This reading position remains unchanged by the method; however, getLastReadChildName() will afterwards return the name of that child.
virtual bool ml::TreeNode::isCorrectName | ( | const char * | ) | const [inline, virtual] |
Allows the user to ask whether a given name is acceptable to the parser.
Definition at line 591 of file mlTreeNode.h.
References VOID_IMPLEMENTATION_RET.
bool ml::TreeNode::isRootNode | ( | ) | const [inline] |
Returns true if this node is a root node.
Definition at line 584 of file mlTreeNode.h.
virtual Base* ml::TreeNode::readBaseChild | ( | const char * | name = 0 | ) | [inline, virtual] |
Creates an object of type Base (or derived) from a child that is identified by its name.
This method is provided to allow reading a base derived object simply like this: BaseDerived* myBaseDerivedObject = (BaseDerived*) readBaseChild(tagName); Of course this only works, if you previously saved the object in generic mode, thus allowing the automatic construction of an instance. Note that you have to delete the object returned yourself.
Definition at line 552 of file mlTreeNode.h.
References ML_CATCH_BLOCK, ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
virtual void ml::TreeNode::readChild | ( | unsigned char & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type unsigned
char
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | int & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type int
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Base & | , |
const char * | = 0 |
||
) | [virtual] |
This method is for reading an object of a type derived from base from the child with name name.
Note that you have to construct the object yourself before calling the method and thus have to know its exact type.
virtual void ml::TreeNode::readChild | ( | unsigned long & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type unsigned
long
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Vector2 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Vector2
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | char & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type char
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Vector6 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Vector6
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | ImageVector & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type ImageVector
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | SubImageBox & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type SubImageBox
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | SubImageBoxd & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type SubImageBoxd
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Base *& | , |
const char * | = 0 |
||
) | [virtual] |
Method for reading a child of a type derived from Base that is identified by its name.
The actual type of the object will be read from the tree and the object will be automatically constructed (for example using the ML runtime system) and initialized via objP->readStateFromTree().
virtual void ml::TreeNode::readChild | ( | unsigned int & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type unsigned
int
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | char *& | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type char*, that is identified by its name.
The string is allocated on the heap and has to be deleted by the user by calling deleteString().
virtual void ml::TreeNode::readChild | ( | float & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type float
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | MLint64 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type MLint64
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | long & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type long
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | short & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type short
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | bool & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type bool
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | unsigned short & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type unsigned
short
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | MLuint64 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type MLuint64
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | long double & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type long
double
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Vector4 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Vector4
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Matrix4 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Matrix4
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Vector3 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Vector3
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | TreeNode *& | , |
const char * | = 0 |
||
) | [virtual] |
Returns the child node that is identified by its name.
virtual void ml::TreeNode::readChild | ( | Matrix3 & | , |
const char * | = 0 |
||
) | [virtual] |
Reads the value of a child of type Matrix3
that is identified by its name.
virtual void ml::TreeNode::readChild | ( | void *& | , |
unsigned long & | , | ||
const char * | = 0 |
||
) | [virtual] |
Reads a child containing raw data that is identified by its name.
Returns the number of bytes read in noBytes.
virtual void ml::TreeNode::readChild | ( | double & | val, |
const char * | name = 0 |
||
) | [virtual] |
Reads the value of a child of type double
that is identified by its name.
virtual TreeNode* ml::TreeNode::readContainerChild | ( | const char * | name = 0 | ) | [inline, virtual] |
Returns the container child node that is identified by its name.
Do not delete the node returned, it will be deleted when the root node is.
Definition at line 531 of file mlTreeNode.h.
References ML_CATCH_BLOCK, ML_CATCH_RETHROW, ML_TRACE_IN, and ML_TRY.
virtual void ml::TreeNode::readFromFile | ( | const char * | ) | [virtual] |
Reads the subtree represented by this node from a file.
virtual void ml::TreeNode::readFromString | ( | const char * | ) | [virtual] |
Reads the subtree represented by this node from a string.
This method can be used to quickly implement setPersistentString() for a class with TreeNode support. It might not make sense in all cases, for example when the derived class performs a binary import/export of the data.
virtual void ml::TreeNode::setVersion | ( | const char * | , |
int | |||
) | [inline, virtual] |
/name MISCELLANEOUS METHODS:
Sets version for current node.
Definition at line 575 of file mlTreeNode.h.
References VOID_IMPLEMENTATION.
virtual void ml::TreeNode::writeToFile | ( | const char * | ) | [virtual] |
Writes the subtree represented by this node to a file.
virtual void ml::TreeNode::writeToString | ( | char *& | ) | [virtual] |
Generates a string representation of the subtree represented by this node to a file.
This method can be used to quickly implement getPersistentString() for a class with TreeNode support. It might not make sense in all cases, for example when the derived class performs a binary import/export of the data.
virtual bool ml::TreeNode::false |
Definition at line 382 of file mlTreeNode.h.
virtual TreeNode* ml::TreeNode::NULL |
Definition at line 361 of file mlTreeNode.h.