xmlrpcMethod.hpp 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. #ifndef XMLRPCMETHOD_HPP
  2. #define XMLRPCMETHOD_HPP
  3. #include <string>
  4. #include <iostream>
  5. #include <xmlrpc-c/base.hpp>
  6. class xmlrpcMethod {
  7. // An object of this class contains everything we know about a
  8. // given XML-RPC method, and knows how to print local bindings.
  9. std::string mFunctionName;
  10. std::string mMethodName;
  11. std::string mHelp;
  12. xmlrpc_c::value_array mSynopsis;
  13. public:
  14. xmlrpcMethod(std::string const& function_name,
  15. std::string const& method_name,
  16. std::string const& help,
  17. xmlrpc_c::value_array const& signatureList);
  18. xmlrpcMethod(xmlrpcMethod const& f);
  19. xmlrpcMethod& operator= (xmlrpcMethod const& f);
  20. void
  21. printDeclarations(std::ostream& out) const;
  22. void
  23. printDefinitions(std::ostream & out,
  24. std::string const& className) const;
  25. private:
  26. void
  27. printParameters(std::ostream & out,
  28. size_t const synopsis_index) const;
  29. void
  30. printDeclaration(std::ostream & out,
  31. size_t const synopsis_index) const;
  32. void
  33. printDefinition(std::ostream & out,
  34. std::string const& className,
  35. size_t const synopsis_index) const;
  36. const xmlrpcType&
  37. returnType(size_t const synopsis_index) const;
  38. size_t
  39. parameterCount(size_t const synopsis_index) const;
  40. const xmlrpcType&
  41. parameterType(size_t const synopsis_index,
  42. size_t const parameter_index) const;
  43. };
  44. #endif