![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
Handles the serialization of XML files. More...
#include <VGearsXMLSerializer.h>
Public Member Functions | |
XMLSerializer () | |
Constructor. More... | |
virtual | ~XMLSerializer () |
Destructor. More... | |
Protected Member Functions | |
virtual void | Parse (Ogre::DataStreamPtr &stream, TiXmlDocument &dest) |
Reads and parses the XML file. More... | |
virtual const String * | ReadAttribute (TiXmlNode &node, const String &attribute) |
Reads an XMl node attribute as a string. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, bool &dest, const bool &def=false) |
Reads an XMl node attribute as a boolean. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, int &dest, const int &def=0) |
Reads an XMl node attribute as an integer. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, String &dest, const String &def="") |
Reads an XMl node attribute as a string. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Ogre::Real &dest, const Ogre::Real &def=0) |
Reads an XMl node attribute as a real. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Ogre::Vector2 &dest, const Ogre::Vector2 &def=Ogre::Vector2::ZERO) |
Reads an XMl node attribute as a 2-dimension vector. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Ogre::Vector3 &dest, const Ogre::Vector3 &def=Ogre::Vector3::ZERO) |
Reads an XMl node attribute as a 3-dimension vector. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Ogre::Vector4 &dest, const Ogre::Vector4 &def=Ogre::Vector4::ZERO) |
Reads an XMl node attribute as a 4-dimension vector. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Ogre::Quaternion &dest, const Ogre::Quaternion &def=Ogre::Quaternion::IDENTITY) |
Reads an XMl node attribute as a quaternion. More... | |
virtual TiXmlNode * | FindChildNode (TiXmlNode &node, const String &tag) |
Finds a child node of a XML node by name. More... | |
Handles the serialization of XML files.
VGears::XMLSerializer::XMLSerializer | ( | ) |
Constructor.
|
virtual |
Destructor.
|
protectedvirtual |
Finds a child node of a XML node by name.
It doesn't search recursively, just among the direct children.
[in] | node | The XML node to search. |
[in] | tag | Name of the child to search for. |
|
protectedvirtual |
Reads and parses the XML file.
[in] | stream | The contents of the XML file. |
[out] | dest | The formed XML file. |
|
protectedvirtual |
Reads an XMl node attribute as a string.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a boolean.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as an integer.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a quaternion.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a real.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a 2-dimension vector.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a 3-dimension vector.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a 4-dimension vector.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as a string.
[in] | node | The XML node. |
[in] | attribute | The name of the attribute to read. |
[out] | dest | The value of the specified attribute. If the attribute doesn't exists, the value of def will be set here. |
[in] | def | Default value. |
Reimplemented in VGears::Background2DFileXMLSerializer.