/**
* \class CallbackMethod
* \brief Abstract callback-style method.
* \see RpcMethod
*/
class CallbackMethod
{
public:
/**
* \brief Destructor.
*/
virtual ~CallbackMethod();
/**
* \brief Call the method.
* \param msg JSON-RPC request or notification
* \param response response produced (may be Json::Value::nullSingleton())
* \return true if message has been correctly processed, false otherwise
* \note Have to be implemented by subclasses
*/
virtual bool Call(const Json::Value& msg, Json::Value& response) = 0;
/**
* \brief Get the name of the methods (optional).
* \return name of the method as std::string
* \note Have to be implemented by subclasses
*/
virtual std::string GetName() const = 0;
/**
* \brief Get the description of the methods (optional).
* \return description
*/
C++模板类成员函数
最新推荐文章于 2024-06-04 10:54:26 发布