Inheritance diagram for CountTheEntities:
Public Member Functions | |
CountTheEntities (XmlRpcServer *s) | |
void | execute (XmlRpcValue ¶ms, XmlRpcValue &result) |
Execute the method. Subclasses must provide a definition for this method. | |
std::string & | name () |
Returns the name of the method. | |
virtual std::string | help () |
Protected Attributes | |
std::string | _name |
XmlRpcServer * | _server |
Definition at line 39 of file Validator.cpp.
CountTheEntities::CountTheEntities | ( | XmlRpcServer * | s | ) | [inline] |
Definition at line 42 of file Validator.cpp.
00042 : XmlRpcServerMethod("validator1.countTheEntities", s) {}
void CountTheEntities::execute | ( | XmlRpcValue & | params, | |
XmlRpcValue & | result | |||
) | [inline, virtual] |
Execute the method. Subclasses must provide a definition for this method.
Implements XmlRpc::XmlRpcServerMethod.
Definition at line 44 of file Validator.cpp.
References arg(), genRecEmupikp::i, and deljobs::string.
00045 { 00046 std::cerr << "CountTheEntities\n"; 00047 std::string& arg = params[0]; 00048 int ctLeftAngleBrackets = 0; 00049 int ctRightAngleBrackets = 0; 00050 int ctAmpersands = 0; 00051 int ctApostrophes = 0; 00052 int ctQuotes = 0; 00053 00054 int n = int(arg.length()); 00055 for (int i=0; i<n; ++i) 00056 switch (arg[i]) 00057 { 00058 case '<': ++ctLeftAngleBrackets; break; 00059 case '>': ++ctRightAngleBrackets; break; 00060 case '&': ++ctAmpersands; break; 00061 case '\'': ++ctApostrophes; break; 00062 case '\"': ++ctQuotes; break; 00063 } 00064 00065 result["ctLeftAngleBrackets"] = ctLeftAngleBrackets; 00066 result["ctRightAngleBrackets"] = ctRightAngleBrackets; 00067 result["ctAmpersands"] = ctAmpersands; 00068 result["ctApostrophes"] = ctApostrophes; 00069 result["ctQuotes"] = ctQuotes; 00070 }
virtual std::string XmlRpc::XmlRpcServerMethod::help | ( | ) | [inline, virtual, inherited] |
Returns a help string for the method. Subclasses should define this method if introspection is being used.
Reimplemented in ListMethods, MethodHelp, and Hello.
Definition at line 39 of file XmlRpcServerMethod.h.
References deljobs::string.
Referenced by MethodHelp::execute().
00039 { return std::string(); }
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().