Zero  0.1.0
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Static Private Member Functions | Static Private Attributes | List of all members
Command Class Referenceabstract

#include <command.h>

Inheritance diagram for Command:
basethread_t thread_wrapper_t AddBackup DBScan GenArchive KitsCommand LogScannerCommand MergeRuns NoDBGen TruncateLog

Public Member Functions

virtual void run ()=0
 
virtual void setupOptions ()=0
 
po::options_description & getOptions ()
 
void setCommandString (string s)
 
void setOptionValues (po::variables_map &vm)
 
- Public Member Functions inherited from basethread_t
 basethread_t ()
 
virtual ~basethread_t ()
 
- Public Member Functions inherited from thread_wrapper_t
 thread_wrapper_t ()
 
virtual ~thread_wrapper_t ()
 
void spawn ()
 
void fork ()
 
void join ()
 

Static Public Member Functions

static Commandparse (int argc, char **argv)
 
static void init ()
 
static void setupSMOptions (po::options_description &options)
 Options passed down to the storage manager. More...
 
static void setSMOptions (sm_options &sm_opt, const po::variables_map &values)
 
- Static Public Member Functions inherited from basethread_t
static void start_base ()
 
static void start_buffer ()
 
static void start_log (string logdir)
 
static void start_archiver (string archdir, size_t wsize, size_t bsize)
 
static void start_merger (string archdir)
 
static void start_other ()
 
static void print_stats ()
 

Protected Member Functions

void setupCommonOptions ()
 Options common to all commands (e.g., help and config) More...
 
void helpOption ()
 
- Protected Member Functions inherited from basethread_t
void begin_xct ()
 
void commit_xct ()
 
virtual void before_run ()
 
virtual void after_run ()
 

Protected Attributes

po::options_description options
 
po::variables_map optionValues
 
string commandString
 

Private Types

typedef map< string, Command *(*)()> ConstructorMap
 

Static Private Member Functions

static void showCommands ()
 
template<typename T >
static auto check_range (const T &min, const T &max, const std::string &opt_name)
 

Static Private Attributes

static ConstructorMap constructorMap
 

Additional Inherited Members

- Public Attributes inherited from basethread_t
bool finished
 
- Static Protected Attributes inherited from basethread_t
static sm_options _options
 

Member Typedef Documentation

§ ConstructorMap

typedef map<string, Command* (*)()> Command::ConstructorMap
private

Member Function Documentation

§ check_range()

template<typename T >
static auto Command::check_range ( const T min,
const T max,
const std::string &  opt_name 
)
inlinestaticprivate

§ getOptions()

po::options_description& Command::getOptions ( )
inline

§ helpOption()

void Command::helpOption ( )
protected

§ init()

void Command::init ( )
static

§ parse()

Command * Command::parse ( int  argc,
char **  argv 
)
static

§ run()

virtual void Command::run ( )
pure virtual

§ setCommandString()

void Command::setCommandString ( string  s)
inline

§ setOptionValues()

void Command::setOptionValues ( po::variables_map &  vm)
inline

§ setSMOptions()

void Command::setSMOptions ( sm_options sm_opt,
const po::variables_map &  values 
)
static

§ setupCommonOptions()

void Command::setupCommonOptions ( )
protected

Options common to all commands (e.g., help and config)

§ setupOptions()

virtual void Command::setupOptions ( )
pure virtual

§ setupSMOptions()

void Command::setupSMOptions ( po::options_description &  options)
static

Options passed down to the storage manager.

SM Options

§ showCommands()

void Command::showCommands ( )
staticprivate

Member Data Documentation

§ commandString

string Command::commandString
protected

§ constructorMap

Command::ConstructorMap Command::constructorMap
staticprivate

§ options

po::options_description Command::options
protected

§ optionValues

po::variables_map Command::optionValues
protected

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