BOSS 7.0.7
BESIII Offline Software System
Loading...
Searching...
No Matches
XmlRpcServerMethod.h
Go to the documentation of this file.
1
2#ifndef _XMLRPCSERVERMETHOD_H_
3#define _XMLRPCSERVERMETHOD_H_
4//
5// XmlRpc++ Copyright (c) 2002-2003 by Chris Morley
6//
7#if defined(_MSC_VER)
8# pragma warning(disable:4786) // identifier was truncated in debug info
9#endif
10
11#ifndef MAKEDEPEND
12# include <string>
13#endif
14
15namespace XmlRpc {
16
17 // Representation of a parameter or result value
18 class XmlRpcValue;
19
20 // The XmlRpcServer processes client requests to call RPCs
21 class XmlRpcServer;
22
23 //! Abstract class representing a single RPC method
25 public:
26 //! Constructor
27 XmlRpcServerMethod(std::string const& name, XmlRpcServer* server = 0);
28 //! Destructor
29 virtual ~XmlRpcServerMethod();
30
31 //! Returns the name of the method
32 std::string& name() { return _name; }
33
34 //! Execute the method. Subclasses must provide a definition for this method.
35 virtual void execute(XmlRpcValue& params, XmlRpcValue& result) = 0;
36
37 //! Returns a help string for the method.
38 //! Subclasses should define this method if introspection is being used.
39 virtual std::string help() { return std::string(); }
40
41 protected:
42 std::string _name;
44 };
45} // namespace XmlRpc
46
47#endif // _XMLRPCSERVERMETHOD_H_
Abstract class representing a single RPC method.
virtual std::string help()
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 ~XmlRpcServerMethod()
Destructor.
A class to handle XML RPC requests.
Definition: XmlRpcServer.h:33
RPC method arguments and results are represented by Values.
Definition: XmlRpcValue.h:22
Definition: XmlRpc.h:35