Inheritance diagram for MethodHelp:
Public Member Functions | |
MethodHelp (XmlRpcServer *s) | |
void | execute (XmlRpcValue ¶ms, XmlRpcValue &result) |
Execute the method. Subclasses must provide a definition for this method. | |
std::string | help () |
std::string & | name () |
Returns the name of the method. | |
Protected Attributes | |
std::string | _name |
XmlRpcServer * | _server |
Definition at line 222 of file XmlRpcServer.cpp.
MethodHelp::MethodHelp | ( | XmlRpcServer * | s | ) | [inline] |
void MethodHelp::execute | ( | XmlRpcValue & | params, | |
XmlRpcValue & | result | |||
) | [inline, virtual] |
Execute the method. Subclasses must provide a definition for this method.
Implements XmlRpc::XmlRpcServerMethod.
Definition at line 227 of file XmlRpcServer.cpp.
References XmlRpc::XmlRpcServerMethod::help(), METHOD_HELP(), and XmlRpc::XmlRpcValue::TypeString.
00228 { 00229 if (params[0].getType() != XmlRpcValue::TypeString) 00230 throw XmlRpcException(METHOD_HELP + ": Invalid argument type"); 00231 00232 XmlRpcServerMethod* m = _server->findMethod(params[0]); 00233 if ( ! m) 00234 throw XmlRpcException(METHOD_HELP + ": Unknown method name"); 00235 00236 result = m->help(); 00237 }
std::string MethodHelp::help | ( | ) | [inline, virtual] |
Returns a help string for the method. Subclasses should define this method if introspection is being used.
Reimplemented from XmlRpc::XmlRpcServerMethod.
Definition at line 239 of file XmlRpcServer.cpp.
References deljobs::string.
00239 { return std::string("Retrieve the help string for a named method"); }
std::string& XmlRpc::XmlRpcServerMethod::name | ( | void | ) | [inline, inherited] |
Returns the name of the method.
Definition at line 32 of file XmlRpcServerMethod.h.
References XmlRpc::XmlRpcServerMethod::_name.
Referenced by XmlRpc::XmlRpcServer::addMethod(), and XmlRpc::XmlRpcServer::removeMethod().
00032 { return _name; }
std::string XmlRpc::XmlRpcServerMethod::_name [protected, inherited] |
Definition at line 42 of file XmlRpcServerMethod.h.
Referenced by XmlRpc::XmlRpcServerMethod::name(), and XmlRpc::XmlRpcServerMethod::XmlRpcServerMethod().
XmlRpcServer* XmlRpc::XmlRpcServerMethod::_server [protected, inherited] |
Definition at line 43 of file XmlRpcServerMethod.h.
Referenced by XmlRpc::XmlRpcServerMethod::XmlRpcServerMethod(), and XmlRpc::XmlRpcServerMethod::~XmlRpcServerMethod().