Dash Core Source Documentation (0.16.0.1)

Find detailed information regarding the Dash Core source code.

Dash 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 std::string &strSubCommand, 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

Dash RPC command dispatcher.

Definition at line 140 of file server.h.

Constructor & Destructor Documentation

◆ CRPCTable()

CRPCTable::CRPCTable ( )

Definition at line 333 of file server.cpp.

References mapCommands, CRPCCommand::name, and vRPCCommands.

Member Function Documentation

◆ appendCommand()

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 353 of file server.cpp.

References IsRPCRunning(), mapCommands, and name.

Referenced by RegisterBlockchainRPCCommands(), RegisterEvoRPCCommands(), RegisterGovernanceRPCCommands(), RegisterMasternodeRPCCommands(), RegisterMiningRPCCommands(), RegisterMiscRPCCommands(), RegisterNetRPCCommands(), RegisterPrivateSendRPCCommands(), RegisterQuorumsRPCCommands(), RegisterRawTransactionRPCCommands(), and RegisterWalletRPCCommands().

◆ execute()

UniValue CRPCTable::execute ( const JSONRPCRequest request) const

◆ help()

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

Note: This interface may still be subject to change.

Definition at line 203 of file server.cpp.

References CRPCCommand::actor, CRPCCommand::category, mapCommands, CRPCCommand::name, and strprintf.

Referenced by help().

◆ listCommands()

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

Returns a list of registered commands.

Returns
List of registered commands.

Definition at line 567 of file server.cpp.

References mapCommands.

Referenced by RPCConsole::setClientModel().

◆ operator[]()

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

Definition at line 345 of file server.cpp.

References mapCommands, and name.

Member Data Documentation

◆ mapCommands

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

Definition at line 143 of file server.h.

Referenced by appendCommand(), CRPCTable(), help(), listCommands(), and operator[]().


The documentation for this class was generated from the following files:
Released under the MIT license