28 #ifndef Pt_Xml_XmlFormatter_h
29 #define Pt_Xml_XmlFormatter_h
31 #include <Pt/Xml/Api.h>
32 #include <Pt/Xml/XmlWriter.h>
33 #include <Pt/Xml/XmlReader.h>
34 #include <Pt/String.h>
35 #include <Pt/NonCopyable.h>
36 #include <Pt/Formatter.h>
93 void onAddString(
const char*,
const char* type,
94 const Pt::Char* value,
const char*
id);
97 void onAddBool(
const char* name,
bool value,
101 void onAddChar(
const char* name,
const Pt::Char& value,
105 void onAddInt8(
const char* name,
Pt::int8_t value,
const char*
id);
108 void onAddInt16(
const char* name,
Pt::int16_t value,
const char*
id);
111 void onAddInt32(
const char* name,
Pt::int32_t value,
const char*
id);
114 void onAddInt64(
const char* name,
Pt::int64_t value,
const char*
id);
117 void onAddUInt8(
const char* name,
Pt::uint8_t value,
const char*
id);
120 void onAddUInt16(
const char* name,
Pt::uint16_t value,
const char*
id);
123 void onAddUInt32(
const char* name,
Pt::uint32_t value,
const char*
id);
126 void onAddUInt64(
const char* name,
Pt::uint64_t value,
const char*
id);
129 void onAddFloat(
const char* name,
float value,
133 void onAddDouble(
const char* name,
double value,
137 void onAddLongDouble(
const char* name,
long double value,
141 void onAddBinary(
const char* name,
const char* type,
142 const char* value, std::size_t length,
const char*
id);
145 void onAddReference(
const char* name,
const char* value);
148 void onBeginSequence(
const char* name,
const char* type,
152 void onBeginElement();
155 void onFinishElement();
158 void onFinishSequence();
161 void onBeginStruct(
const char* name,
const char* type,
165 void onBeginMember(
const char* name);
168 void onFinishMember();
171 void onFinishStruct();
174 void onBeginParse(
Composer& composer);
184 void addValue(
const char*,
const char* type,
185 const Pt::Char* value,
const char*
id);
188 void OnBegin(
const Node& node);
191 void OnReferenceBegin(
const Node& node);
194 void OnMemberBegin(
const Node& node);
197 void OnValue(
const Node& node);
200 void OnMemberEnd(
const Node& node);
225 ProcessNode _processNode;
uint_type uint16_t
Unsigned 16-bit integer type.
Definition: Types.h:30
Represents a closing element tag in an XML document.
Definition: EndElement.h:44
int_type int16_t
Signed 16-bit integer type.
Definition: Types.h:24
Protects derived classes from being copied.
Definition: NonCopyable.h:54
Composes types during serialization.
Definition: Composer.h:42
Reads XML as a Stream of XML Nodes.
Definition: XmlReader.h:79
Writes XML to a text stream.
Definition: XmlWriter.h:52
int_type int32_t
Signed 32-bit integer type.
Definition: Types.h:36
Unicode character type.
Definition: String.h:66
int_type int64_t
Signed 64-bit integer type.
Definition: Types.h:48
int_type int8_t
Signed 8-bit integer type.
Definition: Types.h:12
uint_type uint64_t
Unsigned 64-bit integer type.
Definition: Types.h:54
Unicode capable basic_string.
Definition: String.h:42
uint_type uint32_t
Unsigned 32-bit integer type.
Definition: Types.h:42
uint_type uint8_t
Unsigned 8-bit integer type.
Definition: Types.h:18
XML document node.
Definition: Node.h:50
Represents the start of an element in an XML document.
Definition: StartElement.h:318