55 bool HasAttr(
const char* attr)
const;
72 bool GetBool(
const char* attr)
const;
74 int GetInt(
const char* attr)
const;
76 float GetFloat(
const char* attr)
const;
88 template<
typename T> T
Get(
const char* attr)
const;
93 bool GetOptBool(
const char* attr,
bool defaultValue)
const;
95 int GetOptInt(
const char* attr,
int defaultValue)
const;
97 float GetOptFloat(
const char* attr,
float defaultValue)
const;
Stream reader classes provide a specialized read-interface for a stream.
Definition streamreader.h:24
static helper object for TinyXml-Initialization at application startup
Definition xmlreader.h:115
TinyXmlInitHelper()
constructor
Definition xmlreader.h:118
Reads XML formatted data with random access from a stream using TinyXML as backend.
Definition xmlreader.h:21
Math::vec2 GetVec2(const char *attr) const
get vec2 attribute value from current node
Definition xmlreader.cc:461
T Get(const char *attr) const
generic getter for extension types
bool HasNode(const Util::String &path) const
return true if node exists
Definition xmlreader.cc:191
Util::Array< Util::String > GetAttrs() const
return names of all attrs on current node
Definition xmlreader.cc:383
float GetFloat(const char *attr) const
get float attribute value from current node
Definition xmlreader.cc:449
virtual ~XmlReader()
destructor
Definition xmlreader.cc:42
bool SetToFirstChild(const Util::String &name="")
set current node to first child node, return false if no child exists
Definition xmlreader.cc:285
XmlReader()
constructor
Definition xmlreader.cc:32
virtual bool Open()
begin reading from the stream
Definition xmlreader.cc:56
__DeclareClass(XmlReader)
float GetOptFloat(const char *attr, float defaultValue) const
get optional float attribute value from current node
Definition xmlreader.cc:568
TiXmlElement * curNode
Definition xmlreader.h:126
int GetInt(const char *attr) const
get int attribute value from current node
Definition xmlreader.cc:438
bool HasAttr(const char *attr) const
return true if matching attribute exists on current node
Definition xmlreader.cc:370
virtual void Close()
end reading from the stream
Definition xmlreader.cc:99
Util::String GetContent() const
return embedded content of current node
Definition xmlreader.cc:670
int GetCurrentNodeLineNumber() const
returns the line number of the current node
Definition xmlreader.cc:116
Util::String GetComment() const
return trailing comment
Definition xmlreader.cc:695
Math::mat4 GetOptMat4(const char *attr, const Math::mat4 &defaultValue) const
get optional mat4 attribute value from current node
Definition xmlreader.cc:623
Math::vec4 GetVec4(const char *attr) const
get vec4 attribute value from current node
Definition xmlreader.cc:472
Util::String GetCurrentNodePath() const
get path to current node
Definition xmlreader.cc:214
int GetOptInt(const char *attr, int defaultValue) const
get optional int attribute value from current node
Definition xmlreader.cc:550
TiXmlNode * FindNode(const Util::String &path) const
find a node by path, handles relativ paths as well
Definition xmlreader.cc:130
void SetToRoot()
sets the current node to root
Definition xmlreader.cc:247
TiXmlDocument * xmlDocument
Definition xmlreader.h:125
Util::String GetString(const char *attr) const
get string attribute value from current node
Definition xmlreader.cc:403
bool GetBool(const char *attr) const
get bool attribute value from current node
Definition xmlreader.cc:427
bool SetToParent()
set current node to parent, return false if no parent exists
Definition xmlreader.cc:349
bool HasContent() const
return true if current node has embedded content
Definition xmlreader.cc:658
Math::mat4 GetMat4(const char *attr) const
get mat4 attribute value from current node
Definition xmlreader.cc:491
Math::vec4 GetOptVec4(const char *attr, const Math::vec4 &defaultValue) const
get optional vec4 attribute value from current node
Definition xmlreader.cc:605
Math::transform44 GetTransform44(const char *attr) const
get transform44 attribute value from current node
Definition xmlreader.cc:502
Math::transform44 GetOptTransform44(const char *attr, const Math::transform44 &defaultValue) const
get transform44 attribute value from current node
Definition xmlreader.cc:641
void SetToNode(const Util::String &path)
set current node as path
Definition xmlreader.cc:262
bool HasComment() const
return true if current node has trailing comment
Definition xmlreader.cc:683
bool GetOptBool(const char *attr, bool defaultValue) const
get optional bool attribute value from current node
Definition xmlreader.cc:532
static TinyXmlInitHelper initTinyXml
Definition xmlreader.h:124
bool SetToNextChild(const Util::String &name="")
set current node to next sibling node, return false if no more sibling exists
Definition xmlreader.cc:317
Math::vec2 GetOptVec2(const char *attr, const Math::vec2 &defaultValue) const
get vec2 attribute value from current node
Definition xmlreader.cc:587
Util::String GetCurrentNodeName() const
get short name of current node
Definition xmlreader.cc:201
Util::String GetOptString(const char *attr, const Util::String &defaultValue) const
get optional string attribute value from current node
Definition xmlreader.cc:514
static void SetCondenseWhiteSpace(bool condense)
The world does not agree on whether white space should be kept or not.
Definition tinyxml.h:174
Always the top level node.
Definition tinyxml.h:1228
The element is a container class.
Definition tinyxml.h:841
The parent class for everything in the Document Object Model.
Definition tinyxml.h:388
Nebula's dynamic array class.
Definition array.h:60
Instances of wrapped stream classes.
Definition orientation.cc:10
A 4x4 single point precision float matrix.
Definition mat4.h:49
A 2-component float vector class.
Definition vec2.h:21
A 4D vector.
Definition vec4.h:24
Nebula's universal string class.
Definition string.h:50