XmlRpcFunction.hpp 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include <string>
  2. #include <iostream>
  3. using std::string;
  4. using std::ostream;
  5. class XmlRpcFunction {
  6. // An object of this class contains everything we know about a
  7. // given XML-RPC method, and knows how to print local bindings.
  8. string mFunctionName;
  9. string mMethodName;
  10. string mHelp;
  11. XmlRpcValue mSynopsis;
  12. public:
  13. XmlRpcFunction(const string& function_name,
  14. const string& method_name,
  15. const string& help,
  16. XmlRpcValue synopsis);
  17. XmlRpcFunction (const XmlRpcFunction&);
  18. XmlRpcFunction& operator= (const XmlRpcFunction&);
  19. void printDeclarations (ostream& out) const;
  20. void printDefinitions (ostream& out, const string& className) const;
  21. private:
  22. void printParameters (ostream& out, size_t synopsis_index) const;
  23. void printDeclaration (ostream& out, size_t synopsis_index) const;
  24. void printDefinition (ostream& out,
  25. const string& className,
  26. size_t synopsis_index) const;
  27. const DataType& returnType (size_t synopsis_index) const;
  28. size_t parameterCount (size_t synopsis_index) const;
  29. const DataType& parameterType (size_t synopsis_index,
  30. size_t parameter_index) const;
  31. };