Include file:
#include "mcrl2/utilities/tool.h
mcrl2::utilities::tools::
tool
¶Base class for command line tools. as result.
The name of the developer(s)
mcrl2::utilities::tools::tool::
m_timer
¶The timer which can be used by the tools.
mcrl2::utilities::tools::tool::
m_timing_enabled
¶Determines whether timing output should be written.
add_options
(interface_description &desc)¶Add options to an interface description.
Parameters:
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.
Parameters:
check_standard_options
(const command_line_parser &parser)¶Parse standard options.
Parameters:
parse_options
(const command_line_parser &parser)Parse non-standard options.
Parameters:
pre_run
(int&, char **)Executed only if run would be executed and invoked before run.
Returns: Whether run should still be executed
synopsis
() constReturns the synopsis of the tool.
Returns: The string “[OPTION]…n”
execute
(int argc, char *argv[])¶Run the tool with the given command line options.
Parameters:
Returns: The execution result
Post: If timing was enabled, timer().report() has been called
run
() = 0Run the tool. The options must be set manually.
Returns: True if the tool execution was successful.
timer
()¶Return reference to the timer that can be used.
timing_filename
() const¶Return the filename in which timings must be saved.
tool
(const std::string &name, const std::string &author, const std::string &what_is, const std::string &tool_description, std::string known_issues = "")¶Constructor.
~tool
()¶Destructor.