29#ifndef Pt_Xml_Characters_h
30#define Pt_Xml_Characters_h
32#include <Pt/Xml/Api.h>
33#include <Pt/Xml/Node.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);
Unicode capable basic_string.
Definition Api-String.h:67
void setContent(const String &content)
Sets the content.
Definition Characters.h:122
Characters()
Constructs an empty node.
Definition Characters.h:52
void append(Char ch)
Appends a character to the text.
Definition Characters.h:102
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
String & content()
Returns the text.
Definition Characters.h:117
bool isSpace() const
Returns true if the text consists only of whitespace.
Definition Characters.h:97
bool isChunk() const
Indicates that text might be split up.
Definition Characters.h:92
bool empty() const
Returns true if empty.
Definition Characters.h:72
const Characters & toCharacters(const Node &node)
Casts a generic node to a Characters node.
Definition Characters.h:167
bool isCData() const
Indicates that text was in a CDATA section.
Definition Characters.h:82
void setCData(bool cdata)
Indicates that text was in a CDATA section.
Definition Characters.h:77
void clear()
Clears all content.
Definition Characters.h:62
Characters & toCharacters(Node &node)
Casts a generic node to a Characters node.
Definition Characters.h:158
void setChunk(bool val)
Indicates that text might be split up.
Definition Characters.h:87
const String & content() const
Returns the text.
Definition Characters.h:112
Node(Type type)
Constructs a new Node object with the specified node type.
Definition Node.h:80
Read and write XML ducuments.
Core module.
Definition Allocator.h:33
Unicode character type.
Definition String.h:67