BOSS 8.0.0
BESIII Offline Software System
Loading...
Searching...
No Matches
Sum Class Reference
Inheritance diagram for Sum:

Public Member Functions

 Sum (XmlRpcServer *s)
void execute (XmlRpcValue &params, XmlRpcValue &result)
 Execute the method. Subclasses must provide a definition for this method.
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.
virtual std::string help ()

Additional Inherited Members

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

Detailed Description

Definition at line 37 of file HelloServer.cpp.

Constructor & Destructor Documentation

◆ Sum()

Sum::Sum ( XmlRpcServer * s)
inline

Definition at line 39 of file HelloServer.cpp.

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

Member Function Documentation

◆ execute()

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

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

Implements XmlRpc::XmlRpcServerMethod.

Definition at line 41 of file HelloServer.cpp.

41 {
42 int nArgs = params.size();
43 double sum = 0.0;
44 for ( int i = 0; i < nArgs; ++i ) sum += double( params[i] );
45 result = sum;
46 }
int size() const
Return the size for string, base64, array, and struct values.

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