29 #ifndef Pt_Xml_Characters_h
30 #define Pt_Xml_Characters_h
32 #include <Pt/Xml/Api.h>
33 #include <Pt/Xml/Node.h>
34 #include <Pt/String.h>
73 {
return _content.
empty(); }
104 if(_isSpace && ch !=
' ' && ch !=
'\t' && ch !=
'\n' && ch !=
'\r')
126 inline static const Node::Type nodeId()
127 {
return Node::Characters; }
142 return nodeCast<Characters>(node);
151 return nodeCast<Characters>(node);
160 return nodeCast<Characters>(node);
169 return nodeCast<Characters>(node);
176 #endif // Pt_Xml_Characters_h
bool isSpace() const
Returns true if the text consists only of whitespace.
Definition: Characters.h:97
void append(Char ch)
Appends a character to the text.
Definition: Characters.h:102
const Characters & toCharacters(const Node &node)
Casts a generic node to a Characters node.
Definition: Characters.h:167
void setCData(bool cdata)
Indicates that text was in a CDATA section.
Definition: Characters.h:77
bool isCData() const
Indicates that text was in a CDATA section.
Definition: Characters.h:82
Characters & toCharacters(Node &node)
Casts a generic node to a Characters node.
Definition: Characters.h:158
bool empty() const
Returns true if empty.
Definition: Characters.h:72
void clear()
Clears the string.
Definition: String.h:367
const String & content() const
Returns the text.
Definition: Characters.h:112
void setContent(const String &content)
Sets the content.
Definition: Characters.h:122
A Character node represents text in an XML document.
Definition: Characters.h:47
bool empty() const
Returns true if empty.
Definition: String.h:244
Unicode character type.
Definition: String.h:66
void setChunk(bool val)
Indicates that text might be split up.
Definition: Characters.h:87
Characters()
Constructs an empty node.
Definition: Characters.h:52
void clear()
Clears all content.
Definition: Characters.h:62
Unicode capable basic_string.
Definition: String.h:42
XML document node.
Definition: Node.h:50
Characters * toCharacters(Node *node)
Casts a generic node to a Characters node.
Definition: Characters.h:140
const Characters * toCharacters(const Node *node)
Casts a generic node to a Characters node.
Definition: Characters.h:149
bool isChunk() const
Indicates that text might be split up.
Definition: Characters.h:92
String & content()
Returns the text.
Definition: Characters.h:117