#include <xmlrpc.h>


Public Member Functions | |
| XMLRPCResult (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 | _fault |
Protected Attributes | |
| XMLDoc | _doc |
| XMLPos | _pos |
| int | _value_cnt |
Definition at line 280 of file xmlrpc.h.
| XMLRPC::XMLRPCResult::XMLRPCResult | ( | const string & | xml_str ) |
Definition at line 60 of file xmlrpc_clnt.cpp.
References XMLRPC::XMLRPCParser::_pos, XMLStorage::XMLPos::back(), XMLStorage::XMLPos::go(), and XMLStorage::XMLPos::go_down().
: XMLRPCParser(xml_str, "methodResponse") { if (_pos.go_down("params")) { // We are now prepared to call the get_int/double/string/...() functions } else if (_pos.go_down("fault")) { if (_pos.go("value/struct")) { XMLRPCStruct members(*_pos); int faultCode = atoi(members["faultCode"].c_str()); string faultString = members["faultString"]; throw XMLRPCFault(faultCode, faultString); _pos.back(); } _pos.back(); } }

| 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");
}

| 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");
}

| 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");
}

| 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");
}

| 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");
}

| 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");
}

| 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");
}

| 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);
}

| 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;
}

| 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");
}

| 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");
}

| 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;
}
XMLDoc XMLRPC::XMLRPCParser::_doc [protected, inherited] |
Definition at line 254 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCParser::XMLRPCParser().
| string XMLRPC::XMLRPCResult::_fault |
XMLPos XMLRPC::XMLRPCParser::_pos [protected, inherited] |
Definition at line 255 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCParser::get_any(), XMLRPC::XMLRPCParser::get_array(), XMLRPC::XMLRPCParser::get_binary(), XMLRPC::XMLRPCParser::get_bool(), XMLRPC::XMLRPCParser::get_date(), XMLRPC::XMLRPCParser::get_double(), XMLRPC::XMLRPCParser::get_int(), XMLRPC::XMLRPCParser::get_next_type(), XMLRPC::XMLRPCParser::get_parameter_types(), XMLRPC::XMLRPCParser::get_string(), XMLRPC::XMLRPCParser::get_struct(), XMLRPC::XMLRPCParser::more_parameters(), XMLRPC::XMLRPCParser::next_parameter(), XMLRPC::XMLRPCParser::XMLRPCParser(), and XMLRPCResult().
int XMLRPC::XMLRPCParser::_value_cnt [protected, inherited] |
Definition at line 256 of file xmlrpc.h.
Referenced by XMLRPC::XMLRPCParser::get_next_type(), XMLRPC::XMLRPCParser::more_parameters(), and XMLRPC::XMLRPCParser::next_parameter().
1.7.2