![]() |
V-Gears 0
Free Final Fantasy VII engine.
|
Handles the serialization of 2D background XML files. More...
#include <VGearsBackground2DFileXMLSerializer.h>
Public Member Functions | |
Background2DFileXMLSerializer () | |
Constructor. More... | |
virtual | ~Background2DFileXMLSerializer () |
Destructor. More... | |
virtual void | ImportBackground2DFile (Ogre::DataStreamPtr &stream, Background2DFile *dest) |
Imports a 2D background XML file. More... | |
![]() | |
XMLSerializer () | |
Constructor. More... | |
virtual | ~XMLSerializer () |
Destructor. More... | |
Protected Member Functions | |
virtual void | ReadHeader (TiXmlNode *node) |
Reads a file header and sets the instance data. More... | |
virtual bool | ReadAttribute (TiXmlNode &node, const String &attribute, Blending &dest, const Blending &def) |
Reads an XMl node attribute as tile blending information. More... | |
virtual void | readObject (TiXmlNode &node, Tile &dest) |
Reads an XML node as a tile. More... | |
virtual void | readObject (TiXmlNode &node, Animation &dest) |
Reads an XML node as an animation. More... | |
virtual void | readObject (TiXmlNode &node, KeyFrame &dest) |
Reads an XML node as a key frame. More... | |
template<typename ValueType > | |
void | ReadVector (TiXmlNode &node, const String &tag, std::vector< ValueType > &dest) |
Reads a XML node as a vector. More... | |
template<typename KeyType , typename ValueType > | |
void | ReadMap (TiXmlNode &node, const String &tag, const String &key_attribute, std::map< KeyType, ValueType > &dest) |
Reads a XML node as a map. 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 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... | |
Static Protected Attributes | |
static const String | BLENDING_ALPHA |
Alpha-type blending key. More... | |
static const String | BLENDING_ADD |
Add-type blending key. More... | |
static const String | BLENDING_SUBTRACT |
Substract-type blending key. More... | |
Handles the serialization of 2D background XML files.
VGears::Background2DFileXMLSerializer::Background2DFileXMLSerializer | ( | ) |
Constructor.
|
virtual |
Destructor.
|
virtual |
Imports a 2D background XML file.
[in] | stream | The contents of the background file. |
[out] | dest | The formed background 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 from VGears::XMLSerializer.
|
protectedvirtual |
Reads an XMl node attribute as tile blending information.
[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. |
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
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 from VGears::XMLSerializer.
|
protectedvirtual |
Reads a file header and sets the instance data.
[in] | node | The XML node to read from. |
|
inlineprotected |
Reads a XML node as a map.
[in] | node | The XML node to read. |
[in] | tag | XML tag to read. |
[in] | key_attribute |
[out] | dest | The map data will be loaded here. |
|
protectedvirtual |
Reads an XML node as an animation.
[in] | node | The XML node to read. |
[out] | dest | The formed animation data. |
|
protectedvirtual |
Reads an XML node as a key frame.
[in] | node | The XML node to read. |
[out] | dest | The formed key frame data. |
|
protectedvirtual |
Reads an XML node as a tile.
[in] | node | The XML node to read. |
[out] | dest | The formed tile data. |
|
inlineprotected |
Reads a XML node as a vector.
[in] | node | The XML node to read. |
[in] | tag | XML tag to read. |
[out] | dest | The vector data will be loaded here. |
|
staticprotected |
Add-type blending key.
|
staticprotected |
Alpha-type blending key.
|
staticprotected |
Substract-type blending key.