Kagome
Polkadot Runtime Engine in C++17
Command Class Referenceabstract
Inheritance diagram for Command:
Collaboration diagram for Command:

Public Member Functions

 Command (std::string name, std::string description)
 
virtual ~Command ()=default
 
virtual void execute (std::ostream &out, const ArgumentList &args)=0
 
std::string_view getName () const
 
std::string_view getDescription () const
 

Protected Member Functions

void assertArgumentCount (const ArgumentList &args, int min, int max)
 
template<typename... Ts>
void throwError (const char *fmt, Ts &&...ts) const
 
template<typename T >
unwrapResult (std::string_view context, outcome::result< T > &&res) const
 

Private Attributes

std::string name
 
std::string description
 

Detailed Description

Definition at line 49 of file storage_explorer.cpp.

Constructor & Destructor Documentation

Command::Command ( std::string  name,
std::string  description 
)
inline

Definition at line 51 of file storage_explorer.cpp.

virtual Command::~Command ( )
virtualdefault

Member Function Documentation

void Command::assertArgumentCount ( const ArgumentList args,
int  min,
int  max 
)
inlineprotected

Definition at line 67 of file storage_explorer.cpp.

virtual void Command::execute ( std::ostream &  out,
const ArgumentList args 
)
pure virtual
std::string_view Command::getDescription ( ) const
inline

Definition at line 62 of file storage_explorer.cpp.

std::string_view Command::getName ( ) const
inline

Definition at line 58 of file storage_explorer.cpp.

template<typename... Ts>
void Command::throwError ( const char *  fmt,
Ts &&...  ts 
) const
inlineprotected

Definition at line 79 of file storage_explorer.cpp.

template<typename T >
T Command::unwrapResult ( std::string_view  context,
outcome::result< T > &&  res 
) const
inlineprotected

Definition at line 85 of file storage_explorer.cpp.

Member Data Documentation

std::string Command::description
private

Definition at line 92 of file storage_explorer.cpp.

std::string Command::name
private

Definition at line 91 of file storage_explorer.cpp.


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