Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions

XMLRPC::XMLRPCCall Struct Reference

#include <xmlrpc.h>

Inheritance diagram for XMLRPC::XMLRPCCall:
Inheritance graph
[legend]
Collaboration diagram for XMLRPC::XMLRPCCall:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 XMLRPCCall (const char *name)
XMLRPCCalloperator% (int i4)
XMLRPCCalloperator% (double d)
XMLRPCCalloperator% (bool b)
XMLRPCCalloperator% (const string &s)
XMLRPCCalloperator% (const char *s)
XMLRPCCalloperator% (const ISODate &date)
XMLRPCCalloperator% (const Binary &bin)
XMLRPCCalloperator% (const XMLRPCArray &arr)
XMLRPCCalloperator% (const XMLRPCStruct &str)
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

Private Member Functions

void init (const char *name)

Detailed Description

Definition at line 308 of file xmlrpc.h.


Constructor & Destructor Documentation

XMLRPC::XMLRPCCall::XMLRPCCall ( const char *  name )

Definition at line 45 of file xmlrpc_clnt.cpp.

References init().

{
    init(name);
}

Here is the call graph for this function:


Member Function Documentation

string XMLRPC::XMLRPCWriter::flush (  ) [inherited]

Definition at line 219 of file xmlrpc.cpp.

References XMLRPC::XMLRPCWriter::_buffer, XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, and XMLStorage::XMLWriter::back().

Referenced by XMLRPC::XMLRPCClient::call().

{
    if (_params)
        _writer.back(); // </params>

    _writer.back(); // </methodCall> bzw. </methodResponse>

    return _buffer.str();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void XMLRPC::XMLRPCCall::init ( const char *  name ) [private]

Definition at line 50 of file xmlrpc_clnt.cpp.

References XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().

Referenced by XMLRPCCall().

{
    _writer.create("methodCall");
        _writer.create("methodName");
            _writer.set_content(name);
        _writer.back();
    // The <methodCall> tag is closed in XMLRPCWriter::flush().
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const string &  s ) [inline]

Definition at line 315 of file xmlrpc.h.

{write_string_param(s);                         return *this;}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const XMLRPCArray arr ) [inline]

Definition at line 319 of file xmlrpc.h.

{write_param(arr);}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const XMLRPCStruct str ) [inline]

Definition at line 320 of file xmlrpc.h.

{write_param(str);}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( int  i4 ) [inline]

Definition at line 312 of file xmlrpc.h.

{write_param("i4", XMLInt(i4));                 return *this;}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const char *  s ) [inline]

Definition at line 316 of file xmlrpc.h.

{write_string_param(s);                         return *this;}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( double  d ) [inline]

Definition at line 313 of file xmlrpc.h.

{write_param("double", XMLDouble(d));           return *this;}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( bool  b ) [inline]

Definition at line 314 of file xmlrpc.h.

{write_param("boolean", b? "1": "0");           return *this;}
XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const ISODate date ) [inline]

Definition at line 317 of file xmlrpc.h.

References XMLRPC::ISODate::str().

{write_param("dateTime.iso8601", date.str());   return *this;}

Here is the call graph for this function:

XMLRPCCall& XMLRPC::XMLRPCCall::operator% ( const Binary bin ) [inline]

Definition at line 318 of file xmlrpc.h.

References XMLRPC::Binary::str().

{write_param("base64", bin.str());              return *this;}

Here is the call graph for this function:

void XMLRPC::XMLRPCWriter::write_param ( const XMLRPCArray arr ) [protected, inherited]

Definition at line 255 of file xmlrpc.cpp.

References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_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();
}

Here is the call graph for this function:

void XMLRPC::XMLRPCWriter::write_param ( const string &  type,
const string &  value 
) [protected, inherited]
void XMLRPC::XMLRPCWriter::write_param ( const XMLRPCStruct str ) [protected, inherited]

Definition at line 277 of file xmlrpc.cpp.

References XMLRPC::XMLRPCWriter::_params, XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::create(), and XMLRPC::XMLRPCWriter::write_struct().

{
    if (!_params++)
        _writer.create("params");

    write_struct(str, "param");
}

Here is the call graph for this function:

void XMLRPC::XMLRPCWriter::write_string_param ( const string &  value ) [protected, inherited]
void XMLRPC::XMLRPCWriter::write_struct ( const XMLRPCStruct str,
const string &  keyword 
) [protected, inherited]

Definition at line 287 of file xmlrpc.cpp.

References XMLRPC::XMLRPCWriter::_writer, XMLStorage::XMLWriter::back(), XMLStorage::XMLWriter::create(), and XMLStorage::XMLWriter::set_content().

Referenced by XMLRPC::XMLRPCWriter::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();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

ostringstream XMLRPC::XMLRPCWriter::_buffer [protected, inherited]

Definition at line 301 of file xmlrpc.h.

Referenced by XMLRPC::XMLRPCWriter::flush().

int XMLRPC::XMLRPCWriter::_params [protected, inherited]
XMLWriter XMLRPC::XMLRPCWriter::_writer [protected, inherited]

The documentation for this struct was generated from the following files: