Zeth - Zerocash on Ethereum  0.8
Reference implementation of the Zeth protocol by Clearmatics
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
libtool::subcommand< GlobalOptionsT > Class Template Referenceabstract

Class representing a tool subcommand. More...

#include <subcommand.hpp>

Inheritance diagram for libtool::subcommand< GlobalOptionsT >:
Inheritance graph
[legend]

Public Member Functions

 subcommand (const std::string &subcommand_name, const std::string &description)
 
virtual ~subcommand ()
 
const std::string & description () const
 
int execute (const char *argv0, const std::vector< std::string > command_args, const GlobalOptionsT &global)
 Common code to parse options and invoke the virtual execute entrypoint. More...
 

Protected Member Functions

void usage (const char *argv0, const boost::program_options::options_description &options)
 
virtual void initialize_suboptions (boost::program_options::options_description &options, boost::program_options::options_description &all_options, boost::program_options::positional_options_description &pos)=0
 Instantiation can now set up the boost program_options structures. More...
 
virtual void parse_suboptions (const boost::program_options::variables_map &vm)=0
 
virtual void subcommand_usage (const char *argv0)=0
 Any command-specific output for usage. More...
 
virtual int execute_subcommand (const GlobalOptionsT &global)=0
 Execute the command using global options defined by the caller. More...
 

Protected Attributes

std::string subcommand_name
 
std::string subcommand_description
 

Detailed Description

template<typename GlobalOptionsT>
class libtool::subcommand< GlobalOptionsT >

Class representing a tool subcommand.

Definition at line 18 of file subcommand.hpp.

Constructor & Destructor Documentation

◆ subcommand()

template<typename GlobalOptionsT >
libtool::subcommand< GlobalOptionsT >::subcommand ( const std::string &  subcommand_name,
const std::string &  description 
)

◆ ~subcommand()

template<typename GlobalOptionsT >
virtual libtool::subcommand< GlobalOptionsT >::~subcommand ( )
virtual

Member Function Documentation

◆ description()

template<typename GlobalOptionsT >
const std::string& libtool::subcommand< GlobalOptionsT >::description ( ) const

◆ execute()

template<typename GlobalOptionsT >
int libtool::subcommand< GlobalOptionsT >::execute ( const char *  argv0,
const std::vector< std::string >  command_args,
const GlobalOptionsT &  global 
)

Common code to parse options and invoke the virtual execute entrypoint.

◆ execute_subcommand()

template<typename GlobalOptionsT >
virtual int libtool::subcommand< GlobalOptionsT >::execute_subcommand ( const GlobalOptionsT &  global)
protectedpure virtual

Execute the command using global options defined by the caller.

◆ initialize_suboptions()

template<typename GlobalOptionsT >
virtual void libtool::subcommand< GlobalOptionsT >::initialize_suboptions ( boost::program_options::options_description &  options,
boost::program_options::options_description &  all_options,
boost::program_options::positional_options_description &  pos 
)
protectedpure virtual

◆ parse_suboptions()

template<typename GlobalOptionsT >
virtual void libtool::subcommand< GlobalOptionsT >::parse_suboptions ( const boost::program_options::variables_map &  vm)
protectedpure virtual

◆ subcommand_usage()

template<typename GlobalOptionsT >
virtual void libtool::subcommand< GlobalOptionsT >::subcommand_usage ( const char *  argv0)
protectedpure virtual

◆ usage()

template<typename GlobalOptionsT >
void libtool::subcommand< GlobalOptionsT >::usage ( const char *  argv0,
const boost::program_options::options_description &  options 
)
protected

Member Data Documentation

◆ subcommand_description

template<typename GlobalOptionsT >
std::string libtool::subcommand< GlobalOptionsT >::subcommand_description
protected

Definition at line 55 of file subcommand.hpp.

◆ subcommand_name

template<typename GlobalOptionsT >
std::string libtool::subcommand< GlobalOptionsT >::subcommand_name
protected

Definition at line 54 of file subcommand.hpp.


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