|
| XMLTreeNode (TreeNode::ConstructionMode mode=TreeNode::CM_writerRoot) |
| Constructor. More...
|
|
| ~XMLTreeNode () override |
| Destructor. More...
|
|
const char * | getLastReadChildName () const override |
| Returns the name of the child most recently read. More...
|
|
|
void | writeToFile (const char *fileName) override |
| Writes the complete tree to a file. Throws TNE_WritingFile. More...
|
|
void | writeToString (std::string &str) override |
| Generates a string representation of the subtree represented by this node to a file. More...
|
|
|
void | readFromFile (const char *fileName) override |
| Generates a tree parsing a file. Throws TNE_FileNotFound, TNE_ReadingFile, TNE_XML_ParserError. More...
|
|
void | readFromString (const std::string &str) override |
| Reads the subtree represented by this node from a string. More...
|
|
|
The addChild methods add the variable or object val as a child node with tag name tagName.
They all throw
- TNE_ChildNotFound when no child with the specified tagName was found,
- TNE_ReadingString when the child node was found, but the system was unable to read the string representing its value,
- TNE_ReadingT (where T is the short name of the type of the first parameter) when this could also be read, but the conversion of the string to the class T failed,
- TNE_InvalidParent when something has gone terribly wrong. One possibility is that you tried to read a child from a completely empty tree.
|
void | addChild (unsigned long val, const char *tagName) override |
| Factory method for adding a child encapsulating a variable of type long. More...
|
|
void | addChild (long val, const char *tagName) override |
| Factory method for adding a child encapsulating a variable of type long. More...
|
|
void | addChild (MLuint64 val, const char *tagName) override |
| Factory method for adding a child encapsulating a variable of type MLuint64. More...
|
|
void | addChild (MLint64 val, const char *tagName) override |
| Factory method for adding a child encapsulating a variable of type MLint64. More...
|
|
void | addChild (long double val, const char *tagName) override |
| Factory method for adding a child encapsulating a variable of type long double. More...
|
|
void | addChild (const Vector2 &vec, const char *tagName) override |
|
void | addChild (const Vector3 &vec, const char *tagName) override |
|
void | addChild (const Vector4 &vec, const char *tagName) override |
|
void | addChild (const Vector6 &vec, const char *tagName) override |
|
void | addChild (const ImageVector &vec, const char *tagName) override |
|
void | addChild (const Matrix3 &mat, const char *tagName) override |
|
void | addChild (const Matrix4 &mat, const char *tagName) override |
|
void | addChild (const SubImageBox &box, const char *tagName) override |
|
void | addChild (const SubImageBoxd &box, const char *tagName) override |
|
void | addChild (const std::string &str, const char *tagName) override |
|
void | addChild (const void *const ptr, size_t noBytes, const char *tagName) override |
|
void | addChild (const Base *const obj, const char *tagName, bool generic=true) override |
| Adds an child representing an object whose class is derived from base and thus implements the addStateToTree() / readStateFromTree() methods. More...
|
|
TreeNode * | addChild (const char *tagName) override |
| Adds a group or container node with the specified tag name. More...
|
|
|
The readChild methods read the variable or object val from the child node identified by tagName.
They all throw
- TNE_ChildNotFound when no child with the specified tagName was found,
- TNE_ReadingString when the child node was found, but the system was unable to read the string representing its value,
- TNE_ReadingT (where T is the short name of the type of the first parameter) when this could also be read, but the conversion of the string to the class T failed,
- TNE_InvalidParent when something has gone terribly wrong. One possibility is that you tried to read a child from a completely empty tree.
|
bool | hasChild (const char *tagName=nullptr) override |
| returns true when a child of the given tagName exists. More...
|
|
void | readChild (unsigned long &val, const char *tagName=nullptr) override |
|
void | readChild (long &val, const char *tagName=nullptr) override |
|
void | readChild (MLuint64 &val, const char *tagName=nullptr) override |
|
void | readChild (MLint64 &val, const char *tagName=nullptr) override |
|
void | readChild (long double &val, const char *tagName=nullptr) override |
|
void | readChild (Vector2 &val, const char *tagName=nullptr) override |
|
void | readChild (Vector3 &val, const char *tagName=nullptr) override |
|
void | readChild (Vector4 &val, const char *tagName=nullptr) override |
|
void | readChild (Vector6 &val, const char *tagName=nullptr) override |
|
void | readChild (ImageVector &val, const char *tagName=nullptr) override |
|
void | readChild (Matrix3 &val, const char *tagName=nullptr) override |
|
void | readChild (Matrix4 &val, const char *tagName=nullptr) override |
|
void | readChild (SubImageBox &val, const char *tagName=nullptr) override |
|
void | readChild (SubImageBoxd &val, const char *tagName=nullptr) override |
|
void | readChild (void *&ptr, unsigned long &noBytes, const char *tagName=nullptr) override |
| The returned ptr (string) must be deleted later with deleteMemory(ptr) More...
|
|
void | readChild (std::string &val, const char *tagName=nullptr) override |
|
void | readChild (Base *&val, const char *tagName=nullptr) override |
| The type of the object here is read from the XML file. More...
|
|
void | readChild (Base &val, const char *tagName=nullptr) override |
| Opposed to the readChild(Base*& ...) method, you have to create the object yourself BEFORE calling this method. More...
|
|
void | readChild (TreeNode *&val, const char *tagName=nullptr) override |
| Returns the group or container node with the specified tag name. More...
|
|
|
void | deleteMemory (void *ptr) override |
| frees memory obtained with readChild(void*& ...) More...
|
|
void | setVersion (const char *className, int version) override |
| Set version for current node. className is currently not used. More...
|
|
int | getVersion (const char *) override |
| Get version of current node. className is currently not used. More...
|
|
virtual | ~TreeNode () |
| Destructor deleting all children of this node. More...
|
|
virtual void | addChild (bool val, const char *name) ADD_ULONG_CHILD |
| Factory method for adding a child encapsulating a variable of type bool. More...
|
|
virtual void | addChild (unsigned char val, const char *name) ADD_ULONG_CHILD |
| Factory method for adding a child encapsulating a variable of type unsigned char. More...
|
|
virtual void | addChild (char val, const char *name) ADD_LONG_CHILD |
| Factory method for adding a child encapsulating a variable of type char. More...
|
|
virtual void | addChild (unsigned short val, const char *name) ADD_ULONG_CHILD |
| Factory method for adding a child encapsulating a variable of type unsigned short. More...
|
|
virtual void | addChild (short val, const char *name) ADD_LONG_CHILD |
| Factory method for adding a child encapsulating a variable of type short. More...
|
|
virtual void | addChild (unsigned int val, const char *name) ADD_ULONG_CHILD |
| Factory method for adding a child encapsulating a variable of type unsigned int. More...
|
|
virtual void | addChild (int val, const char *name) ADD_LONG_CHILD |
| Factory method for adding a child encapsulating a variable of type int. More...
|
|
virtual void | addChild (float val, const char *name) ADD_LDOUBLE_CHILD |
| Factory method for adding a child encapsulating a variable of type float. More...
|
|
virtual void | addChild (double val, const char *name) ADD_LDOUBLE_CHILD |
| Factory method for adding a child encapsulating a variable of type double. More...
|
|
The class XMLTreeNode implements the abstract class TreeNode to allow export and import of ML objects to and from XML files and strings.
class XML TreeNode
Definition at line 82 of file mlXMLTreeNode.h.