mCRL2
|
Base class for command line tools. as result. More...
#include <tool.h>
Public Member Functions | |
tool (const std::string &name, const std::string &author, const std::string &what_is, const std::string &tool_description, std::string known_issues="") | |
Constructor. | |
virtual | ~tool () |
Destructor. | |
virtual bool | run ()=0 |
Run the tool. The options must be set manually. | |
const std::string & | timing_filename () const |
Return the filename in which timings must be saved. | |
execution_timer & | timer () |
Return reference to the timer that can be used. | |
int | execute (int argc, char *argv[]) |
Run the tool with the given command line options. | |
Protected Member Functions | |
virtual void | add_options (interface_description &desc) |
Add options to an interface description. | |
virtual void | parse_options (const command_line_parser &parser) |
Parse non-standard options. | |
virtual bool | pre_run (int &, char **) |
Executed only if run would be executed and invoked before run. | |
virtual void | check_standard_options (const command_line_parser &parser) |
Parse standard options. | |
virtual void | check_positional_options (const command_line_parser &parser) |
Checks if the number of positional options is OK. By default this function handles standard options: -v, -d and -q Furthermore, it checks that all options occur at most once. | |
virtual std::string | synopsis () const |
Returns the synopsis of the tool. | |
Protected Attributes | |
std::string | m_name |
The name of the tool. | |
std::string | m_author |
The name of the developer(s) | |
std::string | m_what_is |
One-line "what is" description of the tool. | |
std::string | m_tool_description |
The description of the tool. | |
std::string | m_known_issues |
Known issues of the tool. | |
std::string | m_timing_filename |
The filename to which timings must be written. | |
execution_timer | m_timer |
The timer which can be used by the tools. | |
bool | m_timing_enabled |
Determines whether timing output should be written. | |
|
inline |
|
inlinevirtual |
|
inlineprotectedvirtual |
|
inlineprotectedvirtual |
Checks if the number of positional options is OK. By default this function handles standard options: -v, -d and -q Furthermore, it checks that all options occur at most once.
parser | A command line parser |
Reimplemented in mcrl2::utilities::tools::input_input_output_tool, mcrl2::utilities::tools::input_input_tool, mcrl2::utilities::tools::input_output_output_tool, mcrl2::utilities::tools::input_output_tool, mcrl2::utilities::tools::input_tool, mcrl2::utilities::tools::xinput_output_tool, and mcrl2::utilities::tools::xinput_tool.
|
inlineprotectedvirtual |
|
inline |
|
inlineprotectedvirtual |
Parse non-standard options.
parser | A command line parser |
Reimplemented in mcrl2::utilities::tools::input_input_output_tool, mcrl2::utilities::tools::input_input_tool, mcrl2::utilities::tools::input_output_output_tool, mcrl2::utilities::tools::input_output_tool, mcrl2::utilities::tools::input_tool, mcrl2::utilities::tools::xinput_output_tool, and mcrl2::utilities::tools::xinput_tool.
|
inlineprotectedvirtual |
|
pure virtual |
Run the tool. The options must be set manually.
|
inlineprotectedvirtual |
Returns the synopsis of the tool.
Reimplemented in mcrl2::utilities::tools::input_input_output_tool, mcrl2::utilities::tools::input_input_tool, mcrl2::utilities::tools::input_output_output_tool, mcrl2::utilities::tools::input_output_tool, mcrl2::utilities::tools::input_tool, mcrl2::utilities::tools::xinput_output_tool, and mcrl2::utilities::tools::xinput_tool.
|
inline |
|
inline |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |