Static Public Member Functions

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 262 of file xmlrpc.h.


Member Function Documentation

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

Definition at line 510 of file xmlrpc.cpp.

References XMLStorage::const_XMLPos::go_down().

Referenced by XMLRPCArray::XMLRPCArray(), and 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 XMLRPCValue::get_array ( const_XMLPos  pos ) [static]

Definition at line 567 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 XMLRPCValue::get_binary ( const_XMLPos  pos ) [static]

Definition at line 559 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 XMLRPCValue::get_bool ( const_XMLPos  pos ) [static]

Definition at line 533 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 XMLRPCValue::get_date ( const_XMLPos  pos ) [static]

Definition at line 551 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 XMLRPCValue::get_double ( const_XMLPos  pos ) [static]

Definition at line 525 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 XMLRPCValue::get_int ( const_XMLPos  pos ) [static]

Definition at line 517 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 XMLRPCValue::get_string ( const_XMLPos  pos ) [static]

Definition at line 541 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 XMLRPCValue::get_struct ( const_XMLPos  pos ) [static]

Definition at line 575 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: