CatapultServer  v0.5.0.1 (Elephant)
Tool.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "CommandParser.h"
23 
24 namespace catapult { namespace tools {
25 
27  class Tool : public CommandParser {
28  public:
30  virtual inline bool allowUnregisteredOptions() const {
31  return false;
32  }
33 
35  virtual inline CommandParser* subCommandParser(const Options&) const {
36  return nullptr;
37  }
38 
40  virtual int run(const Options& options) = 0;
41  };
42 }}
catapult::tools::Options
boost::program_options::variables_map Options
Provides access to parsed options.
Definition: Options.h:34
catapult::tools::Tool::allowUnregisteredOptions
virtual bool allowUnregisteredOptions() const
Tool should return true if command line parser should allow unregistered options.
Definition: Tool.h:30
catapult::tools::Tool
Interface for the tools.
Definition: Tool.h:27
CommandParser.h
catapult::tools::CommandParser
Interface for command line parsing.
Definition: CommandParser.h:27
catapult::tools::Tool::subCommandParser
virtual CommandParser * subCommandParser(const Options &) const
Tool should return sub command parser.
Definition: Tool.h:35
catapult::tools::Tool::run
virtual int run(const Options &options)=0
Run the tool passing options collected from the command line.
catapult
Definition: AddressExtractionExtension.cpp:28