29 #ifndef Pt_XmlRpc_Formatter_h
30 #define Pt_XmlRpc_Formatter_h
32 #include <Pt/XmlRpc/Api.h>
33 #include <Pt/Xml/XmlReader.h>
34 #include <Pt/Composer.h>
35 #include <Pt/Formatter.h>
36 #include <Pt/String.h>
37 #include <Pt/NonCopyable.h>
52 Formatter(std::basic_ostream<Char>& os);
56 void attach(Xml::XmlReader& reader);
58 void attach(std::basic_ostream<Char>& os);
66 void onAddString(
const char* name,
const char* type,
67 const Pt::Char* value,
const char*
id);
69 void onAddBool(
const char* name,
bool value,
72 void onAddChar(
const char* name,
const Pt::Char& value,
75 void onAddInt8(
const char* name,
Pt::int8_t value,
78 void onAddInt16(
const char* name,
Pt::int16_t value,
81 void onAddInt32(
const char* name,
Pt::int32_t value,
84 void onAddInt64(
const char* name,
Pt::int64_t value,
87 void onAddUInt8(
const char* name,
Pt::uint8_t value,
const char*
id);
89 void onAddUInt16(
const char* name,
Pt::uint16_t value,
const char*
id);
91 void onAddUInt32(
const char* name,
Pt::uint32_t value,
const char*
id);
93 void onAddUInt64(
const char* name,
Pt::uint64_t value,
const char*
id);
95 void onAddFloat(
const char* name,
float value,
98 void onAddDouble(
const char* name,
double value,
101 void onAddLongDouble(
const char* name,
long double value,
104 void onAddBinary(
const char* name,
const char* type,
105 const char* value, std::size_t length,
const char*
id);
107 void onAddReference(
const char* name,
const char*
id);
109 void onBeginSequence(
const char* name,
const char* type,
112 virtual void onBeginElement();
114 virtual void onFinishElement();
116 void onFinishSequence();
118 void onBeginStruct(
const char* name,
const char* type,
121 void onBeginMember(
const char* name);
123 void onFinishMember();
125 void onFinishStruct();
128 void onBeginParse(Composer& composer);
158 Xml::XmlReader* _reader;
162 std::basic_ostream<Char>* _os;
173 #endif // Pt_XmlRpc_Formatter_h
uint_type uint16_t
Unsigned 16-bit integer type.
Definition: Types.h:30
int_type int16_t
Signed 16-bit integer type.
Definition: Types.h:24
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