Crazy Eddies GUI System
0.7.9
|
Class used to create XML Document. More...
Public Member Functions | |
XMLSerializer (OutStream &out, size_t indentSpace=4) | |
XMLSerializer constructor. More... | |
virtual | ~XMLSerializer (void) |
XMLSerializer destructor. | |
XMLSerializer & | openTag (const String &name) |
Start a new tag in the xml document. More... | |
XMLSerializer & | closeTag (void) |
Close the current tag. More... | |
XMLSerializer & | attribute (const String &name, const String &value) |
After an opening tag you can populate attribute list with this function. More... | |
XMLSerializer & | text (const String &text) |
Create a text node. More... | |
unsigned int | getTagCount () const |
report the nimber of tags created in the document More... | |
operator bool () const | |
Check wether the XML Serializer status is valid. More... | |
bool | operator! () const |
Check wether the XML Serializer status is invalid. More... | |
Class used to create XML Document.
This class hides the complexity of formatting valid XML files. The class provides automatic substitution of entities, XML indenting in respect of the spaces. It does not contains any codes specific to CEGUI taking appart the CEGUI::String class. The following example show the code needed to exports parts of an XML document similar to what can be found in a layout.
CEGUI::XMLSerializer::XMLSerializer | ( | OutStream & | out, |
size_t | indentSpace = 4 |
||
) |
XMLSerializer constructor.
out | The stream to use to export the result |
indentSpace | The indentation level (0 to disable indentation) |
XMLSerializer& CEGUI::XMLSerializer::attribute | ( | const String & | name, |
const String & | value | ||
) |
After an opening tag you can populate attribute list with this function.
name | The name of the attribute |
value | The value of the attribute |
XMLSerializer& CEGUI::XMLSerializer::closeTag | ( | void | ) |
Close the current tag.
unsigned int CEGUI::XMLSerializer::getTagCount | ( | ) | const |
report the nimber of tags created in the document
XMLSerializer& CEGUI::XMLSerializer::openTag | ( | const String & | name | ) |
Start a new tag in the xml document.
name | The name of the tag |
|
inline |
Check wether the XML Serializer status is valid.
|
inline |
Check wether the XML Serializer status is invalid.
XMLSerializer& CEGUI::XMLSerializer::text | ( | const String & | text | ) |
Create a text node.
text | the content of the node |