29 #ifndef Pt_Soap_Formatter_h
30 #define Pt_Soap_Formatter_h
32 #include <Pt/Soap/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>
54 Formatter(std::basic_ostream<Char>& os);
58 void setParameter(
const Parameter& p);
60 void attach(Xml::XmlReader& reader);
62 void attach(std::basic_ostream<Char>& os);
70 void onAddString(
const char* name,
const char* type,
71 const Pt::Char* value,
const char*
id);
73 void onAddBool(
const char* name,
bool value,
76 void onAddChar(
const char* name,
const Pt::Char& value,
79 void onAddInt8(
const char* name,
Pt::int8_t value,
82 void onAddInt16(
const char* name,
Pt::int16_t value,
85 void onAddInt32(
const char* name,
Pt::int32_t value,
88 void onAddInt64(
const char* name,
Pt::int64_t value,
91 void onAddUInt8(
const char* name,
Pt::uint8_t value,
const char*
id);
93 void onAddUInt16(
const char* name,
Pt::uint16_t value,
const char*
id);
95 void onAddUInt32(
const char* name,
Pt::uint32_t value,
const char*
id);
97 void onAddUInt64(
const char* name,
Pt::uint64_t value,
const char*
id);
99 void onAddFloat(
const char* name,
float value,
102 void onAddDouble(
const char* name,
double value,
105 void onAddLongDouble(
const char* name,
long double value,
108 void onAddBinary(
const char* name,
const char* type,
109 const char* value, std::size_t length,
const char*
id);
111 void onAddReference(
const char* name,
const char*
id);
113 void onBeginSequence(
const char* name,
const char* type,
116 virtual void onBeginElement();
118 virtual void onFinishElement();
120 void onFinishSequence();
122 void onBeginStruct(
const char* name,
const char* type,
125 void onBeginMember(
const char* name);
127 void onFinishMember();
129 void onFinishStruct();
131 virtual void onBeginDict(
const char* name,
const char* type,
134 virtual void onBeginDictElement();
136 virtual void onBeginDictKey();
138 virtual void onFinishDictKey();
140 virtual void onBeginDictValue();
142 virtual void onFinishDictValue();
144 virtual void onFinishDictElement();
146 virtual void onFinishDict();
149 void onBeginParse(Composer& composer);
166 Xml::XmlReader* _reader;
167 std::vector<const Parameter*> _paramStack;
170 std::basic_ostream<Char>* _os;
172 std::vector<char> _data;
182 #endif // Pt_Soap_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