#include <CEGUIXMLAttributes.h>
Public Member Functions | |
XMLAttributes (void) | |
XMLAttributes constructor. | |
virtual | ~XMLAttributes (void) |
XMLAttributes Destructor. | |
void | add (const String &attrName, const String &attrValue) |
Adds an attribute to the attribute block. If the attribute value already exists, it is replaced with the new value. | |
void | remove (const String &attrName) |
Removes an attribute from the attribute block. | |
bool | exists (const String &attrName) const |
Return whether the named attribute exists within the attribute block. | |
size_t | getCount (void) const |
Return the number of attributes in the attribute block. | |
const String & | getName (size_t index) const |
Return the name of an attribute based upon its index within the attribute block. | |
const String & | getValue (size_t index) const |
Return the value string of an attribute based upon its index within the attribute block. | |
const String & | getValue (const String &attrName) const |
Return the value string for attribute attrName. | |
const String & | getValueAsString (const String &attrName, const String &def="") const |
Return the value of attribute attrName as a string. | |
bool | getValueAsBool (const String &attrName, bool def=false) const |
Return the value of attribute attrName as a boolean value. | |
int | getValueAsInteger (const String &attrName, int def=0) const |
Return the value of attribute attrName as a integer value. | |
float | getValueAsFloat (const String &attrName, float def=0.0f) const |
Return the value of attribute attrName as a floating point value. | |
Protected Types | |
typedef std::map< String, String > | AttributeMap |
Protected Attributes | |
AttributeMap | d_attrs |
Definition at line 43 of file CEGUIXMLAttributes.h.
|
Definition at line 233 of file CEGUIXMLAttributes.h. |
|
XMLAttributes constructor.
Definition at line 32 of file CEGUIXMLAttributes.cpp. |
|
XMLAttributes Destructor.
Definition at line 35 of file CEGUIXMLAttributes.cpp. |
|
Adds an attribute to the attribute block. If the attribute value already exists, it is replaced with the new value.
Definition at line 38 of file CEGUIXMLAttributes.cpp. References d_attrs. Referenced by CEGUI::XercesParser::populateAttributesBlock(), and CEGUI::TinyXMLDocument::processElement(). |
|
Return whether the named attribute exists within the attribute block.
Definition at line 51 of file CEGUIXMLAttributes.cpp. References d_attrs. Referenced by getValueAsBool(), getValueAsFloat(), getValueAsInteger(), and getValueAsString(). |
|
Return the number of attributes in the attribute block.
Definition at line 56 of file CEGUIXMLAttributes.cpp. References d_attrs. |
|
Return the name of an attribute based upon its index within the attribute block.
Definition at line 61 of file CEGUIXMLAttributes.cpp. References d_attrs. |
|
Return the value string for attribute attrName.
Definition at line 87 of file CEGUIXMLAttributes.cpp. References d_attrs. |
|
Return the value string of an attribute based upon its index within the attribute block.
Definition at line 74 of file CEGUIXMLAttributes.cpp. References d_attrs. Referenced by getValueAsBool(), getValueAsFloat(), getValueAsInteger(), and getValueAsString(). |
|
Return the value of attribute attrName as a boolean value.
Definition at line 107 of file CEGUIXMLAttributes.cpp. References exists(), and getValue(). Referenced by CEGUI::Imageset_xmlHandler::elementStart(), CEGUI::Font_xmlHandler::elementStart(), and CEGUI::Falagard_xmlHandler::elementStart(). |
|
Return the value of attribute attrName as a floating point value.
Definition at line 151 of file CEGUIXMLAttributes.cpp. References exists(), and getValue(). Referenced by CEGUI::Falagard_xmlHandler::elementStart(). |
|
Return the value of attribute attrName as a integer value.
Definition at line 130 of file CEGUIXMLAttributes.cpp. References exists(), and getValue(). Referenced by CEGUI::Imageset_xmlHandler::elementStart(), CEGUI::Font_xmlHandler::elementStart(), and CEGUI::Falagard_xmlHandler::elementStart(). |
|
Return the value of attribute attrName as a string.
Definition at line 101 of file CEGUIXMLAttributes.cpp. References exists(), and getValue(). Referenced by CEGUI::Scheme_xmlHandler::elementStart(), CEGUI::Imageset_xmlHandler::elementStart(), CEGUI::GUILayout_xmlHandler::elementStart(), CEGUI::Font_xmlHandler::elementStart(), CEGUI::Falagard_xmlHandler::elementStart(), and CEGUI::Config_xmlHandler::elementStart(). |
|
Removes an attribute from the attribute block.
Definition at line 43 of file CEGUIXMLAttributes.cpp. References d_attrs. |
|
Definition at line 234 of file CEGUIXMLAttributes.h. Referenced by add(), exists(), getCount(), getName(), getValue(), and remove(). |