#include <xmlrpc.h>


Public Member Functions | |
| XMLRPCWriter () | |
| string | flush () |
Protected Member Functions | |
| void | write_string_param (const string &value) |
| void | write_param (const string &type, const string &value) |
| void | write_param (const XMLRPCArray &arr) |
| void | write_param (const XMLRPCStruct &str) |
| void | write_struct (const XMLRPCStruct &str, const string &keyword) |
Protected Attributes | |
| ostringstream | _buffer |
| XMLWriter | _writer |
| int | _params |
Definition at line 288 of file xmlrpc.h.
| XMLRPC::XMLRPCWriter::XMLRPCWriter | ( | ) | [inline] |
| string XMLRPC::XMLRPCWriter::flush | ( | ) |
Definition at line 219 of file xmlrpc.cpp.
References _buffer, _params, _writer, and XMLStorage::XMLWriter::back().
Referenced by XMLRPC::XMLRPCClient::call().
{
if (_params)
_writer.back(); // </params>
_writer.back(); // </methodCall> bzw. </methodResponse>
return _buffer.str();
}


| void XMLRPC::XMLRPCWriter::write_param | ( | const XMLRPCArray & | arr ) | [protected] |
Definition at line 255 of file xmlrpc.cpp.
References _params, _writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.create("array");
_writer.create("data");
for(XMLRPCArray::const_iterator it=arr.begin(); it!=arr.end(); ++it) {
_writer.create("value");
_writer.set_content(*it);
_writer.back();
}
_writer.back();
_writer.back();
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_param | ( | const XMLRPCStruct & | str ) | [protected] |
Definition at line 277 of file xmlrpc.cpp.
References _params, _writer, XMLStorage::XMLWriter::create(), and write_struct().
{
if (!_params++)
_writer.create("params");
write_struct(str, "param");
}

| void XMLRPC::XMLRPCWriter::write_param | ( | const string & | type, |
| const string & | value | ||
| ) | [protected] |
Definition at line 241 of file xmlrpc.cpp.
References _params, _writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.create(type);
_writer.set_content(value);
_writer.back();
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_string_param | ( | const string & | value ) | [protected] |
Definition at line 229 of file xmlrpc.cpp.
References _params, _writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
{
if (!_params++)
_writer.create("params");
_writer.create("param");
_writer.create("value");
_writer.set_content(value);
_writer.back();
_writer.back();
}

| void XMLRPC::XMLRPCWriter::write_struct | ( | const XMLRPCStruct & | str, |
| const string & | keyword | ||
| ) | [protected] |
Definition at line 287 of file xmlrpc.cpp.
References _writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().
Referenced by write_param().
{
_writer.create(keyword);
_writer.create("value");
_writer.create("struct");
for(XMLRPCStruct::const_iterator it=str.begin(); it!=str.end(); ++it) {
_writer.create("member");
_writer.create("name");
_writer.set_content(it->first);
_writer.back();
_writer.create("value");
_writer.set_content(it->second);
_writer.back();
_writer.back();
}
_writer.back();
_writer.back();
_writer.back();
}


ostringstream XMLRPC::XMLRPCWriter::_buffer [protected] |
int XMLRPC::XMLRPCWriter::_params [protected] |
Definition at line 303 of file xmlrpc.h.
Referenced by flush(), write_param(), and write_string_param().
XMLWriter XMLRPC::XMLRPCWriter::_writer [protected] |
Definition at line 302 of file xmlrpc.h.
Referenced by flush(), XMLRPC::XMLRPCCall::init(), write_param(), write_string_param(), and write_struct().
1.7.2