#include <src/tinyxml/tinyxml.h>
Public Member Functions | |
virtual bool | Accept (TiXmlVisitor *content) const |
bool | CDATA () const |
Queries whether this represents text using a CDATA section. | |
void | operator= (const TiXmlText &base) |
virtual const char * | Parse (const char *p, TiXmlParsingData *data, TiXmlEncoding encoding) |
virtual void | Print (FILE *cfile, int depth) const |
void | SetCDATA (bool _cdata) |
Turns on or off a CDATA representation of text. | |
TiXmlText (const TiXmlText ©) | |
TiXmlText (const char *initValue) | |
virtual TiXmlText * | ToText () |
Cast to a more defined type. Will return null not of the requested type. | |
virtual const TiXmlText * | ToText () const |
Cast to a more defined type. Will return null not of the requested type. | |
virtual | ~TiXmlText () |
Protected Member Functions | |
bool | Blank () const |
virtual TiXmlNode * | Clone () const |
[internal use] Creates a new Element and returns it. | |
void | CopyTo (TiXmlText *target) const |
Private Attributes | |
bool | cdata |
Friends | |
class | TiXmlElement |
TiXmlText::TiXmlText | ( | const char * | initValue | ) | [inline] |
Constructor for text element. By default, it is treated as normal, encoded text. If you want it be output as a CDATA text element, set the parameter _cdata to 'true'
References cdata, and TiXmlNode::SetValue().
Referenced by Clone().
virtual TiXmlText::~TiXmlText | ( | ) | [inline, virtual] |
bool TiXmlText::Accept | ( | TiXmlVisitor * | content | ) | const [virtual] |
Walk the XML tree visiting this node and all of its children.
Implements TiXmlNode.
References TiXmlVisitor::Visit().
bool TiXmlText::Blank | ( | ) | const [protected] |
References TiXmlBase::IsWhiteSpace(), and TiXmlNode::value.
Referenced by TiXmlElement::ReadValue().
bool TiXmlText::CDATA | ( | ) | const [inline] |
Queries whether this represents text using a CDATA section.
References cdata.
Referenced by TiXmlPrinter::Visit(), and TiXmlPrinter::VisitEnter().
TiXmlNode * TiXmlText::Clone | ( | ) | const [protected, virtual] |
[internal use] Creates a new Element and returns it.
Implements TiXmlNode.
References CopyTo(), and TiXmlText().
void TiXmlText::CopyTo | ( | TiXmlText * | target | ) | const [protected] |
const char * TiXmlText::Parse | ( | const char * | p, | |
TiXmlParsingData * | data, | |||
TiXmlEncoding | encoding | |||
) | [virtual] |
Implements TiXmlBase.
References cdata, TiXmlParsingData::Cursor(), TiXmlNode::GetDocument(), TiXmlBase::location, TiXmlBase::ReadText(), TiXmlDocument::SetError(), TiXmlParsingData::Stamp(), TiXmlBase::StringEqual(), TiXmlBase::TIXML_ERROR_PARSING_CDATA, TIXML_STRING, and TiXmlNode::value.
Referenced by TiXmlElement::ReadValue().
void TiXmlText::Print | ( | FILE * | cfile, | |
int | depth | |||
) | const [virtual] |
All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.) Either or both cfile and str can be null.
This is a formatted print, and will insert tabs and newlines.
(For an unformatted stream, use the << operator.)
Implements TiXmlBase.
References cdata, TiXmlBase::EncodeString(), TIXML_STRING, and TiXmlNode::value.
void TiXmlText::SetCDATA | ( | bool | _cdata | ) | [inline] |
Turns on or off a CDATA representation of text.
References cdata.
Referenced by TiXmlNode::Identify().
virtual TiXmlText* TiXmlText::ToText | ( | ) | [inline, virtual] |
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from TiXmlNode.
virtual const TiXmlText* TiXmlText::ToText | ( | ) | const [inline, virtual] |
Cast to a more defined type. Will return null not of the requested type.
Reimplemented from TiXmlNode.
friend class TiXmlElement [friend] |
Reimplemented from TiXmlNode.
bool TiXmlText::cdata [private] |
Referenced by CDATA(), CopyTo(), Parse(), Print(), SetCDATA(), and TiXmlText().