XmlRpc::XmlRpcServerMethod Class Reference

#include <XmlRpcServerMethod.h>

Inheritance diagram for XmlRpc::XmlRpcServerMethod:

Get JoinOverlay ListMethods LocalLookup MethodHelp Put List of all members.

Detailed Description

Abstract class representing a single RPC method.


Public Member Functions

 XmlRpcServerMethod (std::string const &name, XmlRpcServer *server=0)
 Constructor.
virtual ~XmlRpcServerMethod ()
 Destructor.
std::string & name ()
 Returns the name of the method.
virtual void execute (XmlRpcValue &params, XmlRpcValue &result)=0
 Execute the method. Subclasses must provide a definition for this method.
virtual std::string help ()
 Returns a help string for the method.

Protected Attributes

std::string _name
XmlRpcServer_server


Constructor & Destructor Documentation

XmlRpc::XmlRpcServerMethod::XmlRpcServerMethod ( std::string const &  name,
XmlRpcServer server = 0 
)

Constructor.

00009   {
00010     _name = name;
00011     _server = server;
00012     if (_server) _server->addMethod(this);
00013   }

XmlRpc::XmlRpcServerMethod::~XmlRpcServerMethod (  )  [virtual]

Destructor.

00016   {
00017     if (_server) _server->removeMethod(this);
00018   }


Member Function Documentation

std::string& XmlRpc::XmlRpcServerMethod::name (  )  [inline]

Returns the name of the method.

00032 { return _name; }

virtual void XmlRpc::XmlRpcServerMethod::execute ( XmlRpcValue params,
XmlRpcValue result 
) [pure virtual]

Execute the method. Subclasses must provide a definition for this method.

Implemented in LocalLookup, Put, Get, JoinOverlay, ListMethods, and MethodHelp.

virtual std::string XmlRpc::XmlRpcServerMethod::help (  )  [inline, virtual]

Returns a help string for the method.

Subclasses should define this method if introspection is being used.

Reimplemented in LocalLookup, Put, Get, JoinOverlay, ListMethods, and MethodHelp.

00039 { return std::string(); }


Member Data Documentation

std::string XmlRpc::XmlRpcServerMethod::_name [protected]

XmlRpcServer* XmlRpc::XmlRpcServerMethod::_server [protected]


The documentation for this class was generated from the following files:
Generated on Tue Jul 24 16:51:19 2007 for ITM OverSim by  doxygen 1.5.1