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

Public Member Functions

 CountTheEntities (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 34 of file Validator.cpp.

Constructor & Destructor Documentation

◆ CountTheEntities()

CountTheEntities::CountTheEntities ( XmlRpcServer * s)
inline

Definition at line 36 of file Validator.cpp.

37 : XmlRpcServerMethod( "validator1.countTheEntities", s ) {}
XmlRpcServer s
Definition Validator.cpp:8
XmlRpcServerMethod(std::string const &name, XmlRpcServer *server=0)
Constructor.

Member Function Documentation

◆ execute()

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

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

Implements XmlRpc::XmlRpcServerMethod.

Definition at line 39 of file Validator.cpp.

39 {
40 std::cerr << "CountTheEntities\n";
41 std::string& arg = params[0];
42 int ctLeftAngleBrackets = 0;
43 int ctRightAngleBrackets = 0;
44 int ctAmpersands = 0;
45 int ctApostrophes = 0;
46 int ctQuotes = 0;
47
48 int n = int( arg.length() );
49 for ( int i = 0; i < n; ++i ) switch ( arg[i] )
50 {
51 case '<': ++ctLeftAngleBrackets; break;
52 case '>': ++ctRightAngleBrackets; break;
53 case '&': ++ctAmpersands; break;
54 case '\'': ++ctApostrophes; break;
55 case '\"': ++ctQuotes; break;
56 }
57
58 result["ctLeftAngleBrackets"] = ctLeftAngleBrackets;
59 result["ctRightAngleBrackets"] = ctRightAngleBrackets;
60 result["ctAmpersands"] = ctAmpersands;
61 result["ctApostrophes"] = ctApostrophes;
62 result["ctQuotes"] = ctQuotes;
63 }
const Int_t n
double arg(const EvtComplex &c)

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