xoreos  0.0.5
Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
Common::XMLNode Class Reference

#include <xml.h>

Inheritance diagram for Common::XMLNode:
Inheritance graph
[legend]
Collaboration diagram for Common::XMLNode:
Collaboration graph
[legend]

Public Types

typedef std::map< UString, UStringProperties
 
typedef PtrList< const XMLNodeChildren
 

Public Member Functions

const UStringgetName () const
 
const UStringgetContent () const
 
const XMLNodegetParent () const
 Return the parent node, or 0 if this is the root node. More...
 
const ChildrengetChildren () const
 Return a list of children. More...
 
const XMLNodefindChild (const UString &name) const
 Find a child node by name. More...
 
const PropertiesgetProperties () const
 Return all the properties on this node. More...
 
UString getProperty (const UString &name, const UString &def="") const
 Return a certain property on this node. More...
 

Private Types

typedef std::map< UString, const XMLNode *, UString::ilessChildMap
 

Private Member Functions

 XMLNode (_xmlNode &node, bool makeLower=false, XMLNode *parent=0)
 
 ~XMLNode ()
 
void load (_xmlNode &node, bool makeLower)
 

Private Attributes

UString _name
 
UString _content
 
XMLNode_parent
 
Children _children
 
ChildMap _childMap
 
Properties _properties
 

Friends

class XMLParser
 
template<typename T >
void DeallocatorDefault::destroy (T *)
 

Detailed Description

Definition at line 69 of file xml.h.

Member Typedef Documentation

◆ ChildMap

typedef std::map<UString, const XMLNode *, UString::iless> Common::XMLNode::ChildMap
private

Definition at line 93 of file xml.h.

◆ Children

Definition at line 72 of file xml.h.

◆ Properties

Definition at line 71 of file xml.h.

Constructor & Destructor Documentation

◆ XMLNode()

Common::XMLNode::XMLNode ( _xmlNode &  node,
bool  makeLower = false,
XMLNode parent = 0 
)
private

Definition at line 113 of file xml.cpp.

References load().

Referenced by load().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~XMLNode()

Common::XMLNode::~XMLNode ( )
private

Definition at line 117 of file xml.cpp.

Member Function Documentation

◆ findChild()

const XMLNode * Common::XMLNode::findChild ( const UString name) const

Find a child node by name.

Definition at line 136 of file xml.cpp.

References _childMap.

Referenced by Engines::DragonAge::Campaign::readManifest(), and Engines::DragonAge2::Campaign::readManifest().

Here is the caller graph for this function:

◆ getChildren()

const XMLNode::Children & Common::XMLNode::getChildren ( ) const

Return a list of children.

Definition at line 132 of file xml.cpp.

References _children.

Referenced by Aurora::TextureAtlasFile::load(), and Graphics::Aurora::ModelNode_DragonAge::readMAOXML().

Here is the caller graph for this function:

◆ getContent()

const UString & Common::XMLNode::getContent ( ) const

Definition at line 124 of file xml.cpp.

References _content.

◆ getName()

const UString & Common::XMLNode::getName ( ) const

◆ getParent()

const XMLNode * Common::XMLNode::getParent ( ) const

Return the parent node, or 0 if this is the root node.

Definition at line 128 of file xml.cpp.

References _parent.

◆ getProperties()

const XMLNode::Properties & Common::XMLNode::getProperties ( ) const

Return all the properties on this node.

Definition at line 144 of file xml.cpp.

References _properties.

◆ getProperty()

UString Common::XMLNode::getProperty ( const UString name,
const UString def = "" 
) const

Return a certain property on this node.

Definition at line 148 of file xml.cpp.

References _properties.

Referenced by Engines::DragonAge::Campaign::readManifest(), and Engines::DragonAge2::Campaign::readManifest().

Here is the caller graph for this function:

◆ load()

void Common::XMLNode::load ( _xmlNode &  node,
bool  makeLower 
)
private

Definition at line 156 of file xml.cpp.

References _childMap, _children, _content, _name, _properties, Common::UString::makeLower(), and XMLNode().

Referenced by XMLNode().

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ DeallocatorDefault::destroy

template<typename T >
void DeallocatorDefault::destroy ( T *  )
friend

◆ XMLParser

friend class XMLParser
friend

Definition at line 112 of file xml.h.

Member Data Documentation

◆ _childMap

ChildMap Common::XMLNode::_childMap
private

Definition at line 101 of file xml.h.

Referenced by findChild(), and load().

◆ _children

Children Common::XMLNode::_children
private

Definition at line 100 of file xml.h.

Referenced by getChildren(), and load().

◆ _content

UString Common::XMLNode::_content
private

Definition at line 96 of file xml.h.

Referenced by getContent(), and load().

◆ _name

UString Common::XMLNode::_name
private

Definition at line 95 of file xml.h.

Referenced by getName(), and load().

◆ _parent

XMLNode* Common::XMLNode::_parent
private

Definition at line 98 of file xml.h.

Referenced by getParent().

◆ _properties

Properties Common::XMLNode::_properties
private

Definition at line 103 of file xml.h.

Referenced by getProperties(), getProperty(), and load().


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