XmlRpc::XmlRpcServerMethod Class Reference

Abstract class representing a single RPC method. More...

#include <XmlRpcServerMethod.h>

Inheritance diagram for XmlRpc::XmlRpcServerMethod:

ArrayOfStructsTest CountTheEntities EasyStructTest EchoStructTest Hello HelloName ListMethods ManyTypesTest MethodHelp ModerateSizeArrayCheck NestedStructTest SimpleStructReturnTest Sum TestBase64 List of all members.

Public Member Functions

 XmlRpcServerMethod (std::string const &name, XmlRpcServer *server=0)
 Constructor.
virtual ~XmlRpcServerMethod ()
 Destructor.
std::stringname ()
 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 ()

Protected Attributes

std::string _name
XmlRpcServer_server

Detailed Description

Abstract class representing a single RPC method.

Definition at line 24 of file XmlRpcServerMethod.h.


Constructor & Destructor Documentation

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

Constructor.

Definition at line 8 of file XmlRpcServerMethod.cpp.

References _name, _server, and XmlRpc::XmlRpcServer::addMethod().

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

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

Destructor.

Definition at line 15 of file XmlRpcServerMethod.cpp.

References _server, and XmlRpc::XmlRpcServer::removeMethod().

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


Member Function Documentation

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

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

Implemented in ListMethods, MethodHelp, Hello, HelloName, Sum, TestBase64, ArrayOfStructsTest, CountTheEntities, EasyStructTest, EchoStructTest, ManyTypesTest, ModerateSizeArrayCheck, NestedStructTest, and SimpleStructReturnTest.

Referenced by XmlRpc::XmlRpcServerConnection::executeMethod().

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 ListMethods, MethodHelp, and Hello.

Definition at line 39 of file XmlRpcServerMethod.h.

References deljobs::string.

Referenced by MethodHelp::execute().

00039 { return std::string(); }

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

Returns the name of the method.

Definition at line 32 of file XmlRpcServerMethod.h.

References _name.

Referenced by XmlRpc::XmlRpcServer::addMethod(), and XmlRpc::XmlRpcServer::removeMethod().

00032 { return _name; }


Member Data Documentation

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

Definition at line 42 of file XmlRpcServerMethod.h.

Referenced by name(), and XmlRpcServerMethod().

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

Definition at line 43 of file XmlRpcServerMethod.h.

Referenced by XmlRpcServerMethod(), and ~XmlRpcServerMethod().


Generated on Tue Nov 29 23:36:39 2016 for BOSS_7.0.2 by  doxygen 1.4.7