mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-23 12:35:50 +00:00
Split up RPCService
This commit is contained in:
34
src/ripple/rpc/impl/Handler.cpp
Normal file
34
src/ripple/rpc/impl/Handler.cpp
Normal file
@@ -0,0 +1,34 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
namespace ripple {
|
||||
namespace RPC {
|
||||
|
||||
Handler::Handler (Handler const& other)
|
||||
: m_method (other.m_method)
|
||||
, m_function (other.m_function)
|
||||
{
|
||||
}
|
||||
|
||||
Handler& Handler::operator= (Handler const& other)
|
||||
{
|
||||
m_method = other.m_method;
|
||||
m_function = other.m_function;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::string const& Handler::method() const
|
||||
{
|
||||
return m_method;
|
||||
}
|
||||
|
||||
Json::Value Handler::operator() (Json::Value const& args) const
|
||||
{
|
||||
return m_function (args);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user