Static Public Member Functions

XMLRPC::XMLRPCValue Struct Reference

#include <xmlrpc.h>

List of all members.

Static Public Member Functions

static string get_any (const_XMLPos pos)
static int get_int (const_XMLPos pos)
static double get_double (const_XMLPos pos)
static bool get_bool (const_XMLPos pos)
static string get_string (const_XMLPos pos)
static ISODate get_date (const_XMLPos pos)
static Binary get_binary (const_XMLPos pos)
static XMLRPCArray get_array (const_XMLPos pos)
static XMLRPCStruct get_struct (const_XMLPos pos)

Detailed Description

Definition at line 265 of file xmlrpc.h.


Member Function Documentation

string XMLRPC::XMLRPCValue::get_any ( const_XMLPos  pos ) [static]

Definition at line 513 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

Referenced by XMLRPC::XMLRPCArray::XMLRPCArray(), and XMLRPC::XMLRPCStruct::XMLRPCStruct().

{
    pos.go_down();  // go to content node or skip for immediate string values

    return pos->get_content();
}

Here is the call graph for this function:

Here is the caller graph for this function:

XMLRPCArray XMLRPC::XMLRPCValue::get_array ( const_XMLPos  pos ) [static]

Definition at line 570 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("array"))
        return XMLRPCArray(pos);
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

Binary XMLRPC::XMLRPCValue::get_binary ( const_XMLPos  pos ) [static]

Definition at line 562 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("base64"))
        return Binary(pos->get_content());
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

bool XMLRPC::XMLRPCValue::get_bool ( const_XMLPos  pos ) [static]

Definition at line 536 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("boolean"))
        return XMLInt(pos->get_content()) == 1;
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

ISODate XMLRPC::XMLRPCValue::get_date ( const_XMLPos  pos ) [static]

Definition at line 554 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("dateTime.iso8601"))
        return ISODate(pos->get_content());
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

double XMLRPC::XMLRPCValue::get_double ( const_XMLPos  pos ) [static]

Definition at line 528 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("double"))
        return XMLDouble(pos->get_content());
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

int XMLRPC::XMLRPCValue::get_int ( const_XMLPos  pos ) [static]

Definition at line 520 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("i4") || pos.go_down("int"))
        return XMLInt(pos->get_content());
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

string XMLRPC::XMLRPCValue::get_string ( const_XMLPos  pos ) [static]

Definition at line 544 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("string"))
        return pos->get_content();
    else if (pos->get_children().empty())
        return pos->get_content();
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:

XMLRPCStruct XMLRPC::XMLRPCValue::get_struct ( const_XMLPos  pos ) [static]

Definition at line 578 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

{
    if (pos.go_down("struct"))
        return XMLRPCStruct(*pos);
    else
        throw Exception("wrong data type");
}

Here is the call graph for this function:


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