V-Gears 0
Free Final Fantasy VII engine.
VGears::WalkmeshFileXMLSerializer Class Reference

Handles the serialization of walkmesh files. More...

#include <VGearsWalkmeshFileXMLSerializer.h>

Inheritance diagram for VGears::WalkmeshFileXMLSerializer:
Collaboration diagram for VGears::WalkmeshFileXMLSerializer:

Public Types

typedef WalkmeshFile::Triangle Triangle
 
typedef WalkmeshFile::TriangleList TriangleList
 

Public Member Functions

 WalkmeshFileXMLSerializer ()
 Constructor. More...
 
virtual ~WalkmeshFileXMLSerializer ()
 Destructor. More...
 
virtual void ImportWalkmeshFile (Ogre::DataStreamPtr &stream, WalkmeshFile *dest)
 Imports a walkmesh file. More...
 
- Public Member Functions inherited from VGears::XMLSerializer
 XMLSerializer ()
 Constructor. More...
 
virtual ~XMLSerializer ()
 Destructor. More...
 

Protected Member Functions

virtual void ReadHeader (TiXmlNode *node)
 Reads a file header from an XML node and sets the instance data. More...
 
virtual void readObject (TiXmlNode &node, Triangle &dest)
 Reads an XML node as a triangle. More...
 
template<typename ValueType >
void ReadVector (TiXmlNode &node, std::vector< ValueType > &dest, const String &tag)
 Reads a XML node as a vector. More...
 
- Protected Member Functions inherited from VGears::XMLSerializer
virtual void Parse (Ogre::DataStreamPtr &stream, TiXmlDocument &dest)
 Reads and parses the XML file. More...
 
virtual const StringReadAttribute (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...
 

Detailed Description

Handles the serialization of walkmesh files.

Member Typedef Documentation

◆ Triangle

◆ TriangleList

Constructor & Destructor Documentation

◆ WalkmeshFileXMLSerializer()

VGears::WalkmeshFileXMLSerializer::WalkmeshFileXMLSerializer ( )

Constructor.

◆ ~WalkmeshFileXMLSerializer()

VGears::WalkmeshFileXMLSerializer::~WalkmeshFileXMLSerializer ( )
virtual

Destructor.

Member Function Documentation

◆ ImportWalkmeshFile()

void VGears::WalkmeshFileXMLSerializer::ImportWalkmeshFile ( Ogre::DataStreamPtr &  stream,
WalkmeshFile dest 
)
virtual

Imports a walkmesh file.

Parameters
[in]streamThe contents of the map file.
[out]destThe formed walkmesh file.

◆ ReadHeader()

void VGears::WalkmeshFileXMLSerializer::ReadHeader ( TiXmlNode *  node)
protectedvirtual

Reads a file header from an XML node and sets the instance data.

Parameters
[in]nodeThe XML node to read.

◆ readObject()

void VGears::WalkmeshFileXMLSerializer::readObject ( TiXmlNode &  node,
WalkmeshFileXMLSerializer::Triangle dest 
)
protectedvirtual

Reads an XML node as a triangle.

Parameters
[in]nodeThe XML node to read.
[out]destThe formed triangle data.

◆ ReadVector()

template<typename ValueType >
void VGears::WalkmeshFileXMLSerializer::ReadVector ( TiXmlNode &  node,
std::vector< ValueType > &  dest,
const String tag 
)
inlineprotected

Reads a XML node as a vector.

Parameters
[in]nodeThe XML node to read.
[out]destThe vector data will be loaded here.
[in]tagXML tag to read.

The documentation for this class was generated from the following files: