Public Member Functions | Public Attributes | Protected Attributes

XMLRPC::XMLRPCRequest Struct Reference

#include <xmlrpc.h>

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

List of all members.

Public Member Functions

 XMLRPCRequest (const string &xml_str)
string get_any ()
int get_int ()
double get_double ()
bool get_bool ()
string get_string ()
ISODate get_date ()
Binary get_binary ()
XMLRPCArray get_array ()
XMLRPCStruct get_struct ()
bool more_parameters () const
XMLRPC_TYPE get_next_type () const
size_t get_parameter_types (TypeList &types) const

Public Attributes

string _method_name

Protected Attributes

XMLDoc _doc
XMLPos _pos
int _value_cnt

Detailed Description

Definition at line 328 of file xmlrpc.h.


Constructor & Destructor Documentation

XMLRPC::XMLRPCRequest::XMLRPCRequest ( const string &  xml_str )

Member Function Documentation

string XMLRPC::XMLRPCParser::get_any (  ) [inherited]

Definition at line 395 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        const string& ret = XMLRPCValue::get_any(_pos);

        _pos.back(); // </value>
        _pos.back(); // </param>

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

XMLRPCArray XMLRPC::XMLRPCParser::get_array (  ) [inherited]

Definition at line 486 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        XMLRPCArray ret = XMLRPCValue::get_array(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

Binary XMLRPC::XMLRPCParser::get_binary (  ) [inherited]

Definition at line 473 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        Binary ret = XMLRPCValue::get_binary(_pos);

        _pos.back();
        _pos.back();

        return ret; //TODO sub-optimal: invokes the copy constructor
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

bool XMLRPC::XMLRPCParser::get_bool (  ) [inherited]

Definition at line 434 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        bool ret = XMLRPCValue::get_bool(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

ISODate XMLRPC::XMLRPCParser::get_date (  ) [inherited]

Definition at line 460 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        ISODate ret = XMLRPCValue::get_date(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

double XMLRPC::XMLRPCParser::get_double (  ) [inherited]

Definition at line 421 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        double ret = XMLRPCValue::get_double(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

int XMLRPC::XMLRPCParser::get_int (  ) [inherited]

Definition at line 408 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        int ret = XMLRPCValue::get_int(_pos);

        _pos.back(); // </value>
        _pos.back(); // </param>

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

XMLRPC_TYPE XMLRPC::XMLRPCParser::get_next_type (  ) const [inherited]

Definition at line 335 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLRPC::XMLRPCParser::_value_cnt, XMLRPC::XMLRPCParser::get_param_type(), and XMLRPC::XRT_VOID.

{
    XPath xpath;
    xpath.push_back(XPathElement("param", _value_cnt));

    const XMLNode* pNode = _pos->find_relative(xpath);
    if (!pNode)
        return XRT_VOID;

    return get_param_type(pNode);
}

Here is the call graph for this function:

size_t XMLRPC::XMLRPCParser::get_parameter_types ( TypeList types ) const [inherited]

Definition at line 379 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), XMLRPC::XMLRPCParser::get_param_type(), and XMLStorage::XMLPos::iterate().

{
    int n = 0;

    XMLPos pos = _pos;

    while(pos.iterate("param", n)) {
        types.push_back(get_param_type(pos));

        pos.back();
    }

    return n;
}

Here is the call graph for this function:

string XMLRPC::XMLRPCParser::get_string (  ) [inherited]

Definition at line 447 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        string ret = XMLRPCValue::get_string(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

XMLRPCStruct XMLRPC::XMLRPCParser::get_struct (  ) [inherited]

Definition at line 499 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), and XMLRPC::XMLRPCParser::next_parameter().

{
    if (next_parameter()) {
        XMLRPCStruct ret = XMLRPCValue::get_struct(_pos);

        _pos.back();
        _pos.back();

        return ret;
    } else
        throw Exception("missing parameter value");
}

Here is the call graph for this function:

bool XMLRPC::XMLRPCParser::more_parameters (  ) const [inherited]

Definition at line 327 of file xmlrpc.cpp.

References XMLRPC::XMLRPCParser::_pos, and XMLRPC::XMLRPCParser::_value_cnt.

{
    XPath xpath;
    xpath.push_back(XPathElement("param", _value_cnt));

    return _pos->find_relative(xpath) != NULL;
}

Member Data Documentation

XMLDoc XMLRPC::XMLRPCParser::_doc [protected, inherited]

Definition at line 254 of file xmlrpc.h.

Referenced by XMLRPC::XMLRPCParser::XMLRPCParser().

Definition at line 332 of file xmlrpc.h.

XMLPos XMLRPC::XMLRPCParser::_pos [protected, inherited]
int XMLRPC::XMLRPCParser::_value_cnt [protected, inherited]

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