Bitcoin Core  0.15.99
P2P Digital Currency
Public Member Functions | Private Attributes | List of all members
CRPCTable Class Reference

Bitcoin RPC command dispatcher. More...

#include <server.h>

Public Member Functions

 CRPCTable ()
 
const CRPCCommandoperator[] (const std::string &name) const
 
std::string help (const std::string &name, const JSONRPCRequest &helpreq) const
 Note: This interface may still be subject to change. More...
 
UniValue execute (const JSONRPCRequest &request) const
 Execute a method. More...
 
std::vector< std::string > listCommands () const
 Returns a list of registered commands. More...
 
bool appendCommand (const std::string &name, const CRPCCommand *pcmd)
 Appends a CRPCCommand to the dispatch table. More...
 

Private Attributes

std::map< std::string, const CRPCCommand * > mapCommands
 

Detailed Description

Bitcoin RPC command dispatcher.

Definition at line 142 of file server.h.

Constructor & Destructor Documentation

CRPCTable::CRPCTable ( )

Definition at line 273 of file server.cpp.

Member Function Documentation

bool CRPCTable::appendCommand ( const std::string &  name,
const CRPCCommand pcmd 
)

Appends a CRPCCommand to the dispatch table.

Returns false if RPC server is already running (dump concurrency protection). Commands cannot be overwritten (returns false).

Definition at line 293 of file server.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

UniValue CRPCTable::execute ( const JSONRPCRequest request) const

Execute a method.

Parameters
requestThe JSONRPCRequest to execute
Returns
Result of the call.
Exceptions
anexception (UniValue) when an error happens.

Definition at line 468 of file server.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

std::string CRPCTable::help ( const std::string &  name,
const JSONRPCRequest helpreq 
) const

Note: This interface may still be subject to change.

Definition at line 156 of file server.cpp.

Here is the caller graph for this function:

std::vector< std::string > CRPCTable::listCommands ( ) const

Returns a list of registered commands.

Returns
List of registered commands.

Definition at line 499 of file server.cpp.

Here is the caller graph for this function:

const CRPCCommand * CRPCTable::operator[] ( const std::string &  name) const

Definition at line 285 of file server.cpp.

Member Data Documentation

std::map<std::string, const CRPCCommand*> CRPCTable::mapCommands
private

Definition at line 145 of file server.h.


The documentation for this class was generated from the following files: