CGEM BOSS 6.6.5.i
BESIII Offline Software System
Loading...
Searching...
No Matches
MethodHelp Class Reference
+ Inheritance diagram for MethodHelp:

Public Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from XmlRpc::XmlRpcServerMethod
std::string _name
 
XmlRpcServer_server
 

Detailed Description

Definition at line 222 of file XmlRpcServer.cpp.

Constructor & Destructor Documentation

◆ MethodHelp()

MethodHelp::MethodHelp ( XmlRpcServer * s)
inline

Definition at line 225 of file XmlRpcServer.cpp.

225: XmlRpcServerMethod(METHOD_HELP, s) {}
XmlRpcServer s
XmlRpcServerMethod(std::string const &name, XmlRpcServer *server=0)
Constructor.

Member Function Documentation

◆ execute()

void MethodHelp::execute ( XmlRpcValue & params,
XmlRpcValue & result )
inlinevirtual

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

Implements XmlRpc::XmlRpcServerMethod.

Definition at line 227 of file XmlRpcServer.cpp.

228 {
229 if (params[0].getType() != XmlRpcValue::TypeString)
230 throw XmlRpcException(METHOD_HELP + ": Invalid argument type");
231
232 XmlRpcServerMethod* m = _server->findMethod(params[0]);
233 if ( ! m)
234 throw XmlRpcException(METHOD_HELP + ": Unknown method name");
235
236 result = m->help();
237 }
Abstract class representing a single RPC method.
virtual std::string help()
XmlRpcServerMethod * findMethod(const std::string &name) const
Look up a method by name.

◆ help()

std::string MethodHelp::help ( )
inlinevirtual

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.

239{ return std::string("Retrieve the help string for a named method"); }

The documentation for this class was generated from the following file: