mCRL2
Loading...
Searching...
No Matches
mcrl2::utilities::tools::input_output_output_tool Class Reference

Base class for tools that optionally takes one file as input, and writes the results to two output files. More...

#include <input_output_output_tool.h>

Inheritance diagram for mcrl2::utilities::tools::input_output_output_tool:
mcrl2::utilities::tools::tool

Public Member Functions

 input_output_output_tool (const std::string &name, const std::string &author, const std::string &what_is, const std::string &tool_description, std::string known_issues="")
 Constructor.
 
const std::string & input_filename () const
 Returns a const reference to the input filename.
 
std::string & input_filename ()
 
const std::string & output_filename1 () const
 Returns a const reference to the first output filename.
 
std::string & output_filename1 ()
 
const std::string & output_filename2 () const
 Returns a const reference to the second output filename.
 
std::string & output_filename2 ()
 
- Public Member Functions inherited from mcrl2::utilities::tools::tool
 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_timertimer ()
 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

void check_positional_options (const command_line_parser &parser)
 Checks if the number of positional options is OK.
 
std::string synopsis () const
 Returns the synopsis of the tool.
 
void parse_options (const command_line_parser &parser)
 Parse non-standard options.
 
std::string output_file_message () const
 Returns a message about the output filename.
 
std::string make_tool_description (const std::string &description) const
 Adds a message about input and output files to the given description.
 
- Protected Member Functions inherited from mcrl2::utilities::tools::tool
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_input_filename
 The input file name.
 
std::string m_output_filename1
 The output file names.
 
std::string m_output_filename2
 
- Protected Attributes inherited from mcrl2::utilities::tools::tool
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.
 

Detailed Description

Base class for tools that optionally takes one file as input, and writes the results to two output files.

Definition at line 26 of file input_output_output_tool.h.

Constructor & Destructor Documentation

◆ input_output_output_tool()

mcrl2::utilities::tools::input_output_output_tool::input_output_output_tool ( const std::string &  name,
const std::string &  author,
const std::string &  what_is,
const std::string &  tool_description,
std::string  known_issues = "" 
)
inline

Constructor.

Definition at line 92 of file input_output_output_tool.h.

Member Function Documentation

◆ check_positional_options()

void mcrl2::utilities::tools::input_output_output_tool::check_positional_options ( const command_line_parser &  parser)
inlineprotectedvirtual

Checks if the number of positional options is OK.

Parameters
parserA command line parser

Reimplemented from mcrl2::utilities::tools::tool.

Definition at line 38 of file input_output_output_tool.h.

◆ input_filename() [1/2]

std::string & mcrl2::utilities::tools::input_output_output_tool::input_filename ( )
inline

Definition at line 103 of file input_output_output_tool.h.

◆ input_filename() [2/2]

const std::string & mcrl2::utilities::tools::input_output_output_tool::input_filename ( ) const
inline

Returns a const reference to the input filename.

Definition at line 102 of file input_output_output_tool.h.

◆ make_tool_description()

std::string mcrl2::utilities::tools::input_output_output_tool::make_tool_description ( const std::string &  description) const
inlineprotected

Adds a message about input and output files to the given description.

Definition at line 85 of file input_output_output_tool.h.

◆ output_file_message()

std::string mcrl2::utilities::tools::input_output_output_tool::output_file_message ( ) const
inlineprotected

Returns a message about the output filename.

Definition at line 77 of file input_output_output_tool.h.

◆ output_filename1() [1/2]

std::string & mcrl2::utilities::tools::input_output_output_tool::output_filename1 ( )
inline

Definition at line 107 of file input_output_output_tool.h.

◆ output_filename1() [2/2]

const std::string & mcrl2::utilities::tools::input_output_output_tool::output_filename1 ( ) const
inline

Returns a const reference to the first output filename.

Definition at line 106 of file input_output_output_tool.h.

◆ output_filename2() [1/2]

std::string & mcrl2::utilities::tools::input_output_output_tool::output_filename2 ( )
inline

Definition at line 111 of file input_output_output_tool.h.

◆ output_filename2() [2/2]

const std::string & mcrl2::utilities::tools::input_output_output_tool::output_filename2 ( ) const
inline

Returns a const reference to the second output filename.

Definition at line 110 of file input_output_output_tool.h.

◆ parse_options()

void mcrl2::utilities::tools::input_output_output_tool::parse_options ( const command_line_parser &  parser)
inlineprotectedvirtual

Parse non-standard options.

Parameters
parserA command line parser

Reimplemented from mcrl2::utilities::tools::tool.

Definition at line 54 of file input_output_output_tool.h.

◆ synopsis()

std::string mcrl2::utilities::tools::input_output_output_tool::synopsis ( ) const
inlineprotectedvirtual

Returns the synopsis of the tool.

Reimplemented from mcrl2::utilities::tools::tool.

Definition at line 47 of file input_output_output_tool.h.

Member Data Documentation

◆ m_input_filename

std::string mcrl2::utilities::tools::input_output_output_tool::m_input_filename
protected

The input file name.

Definition at line 30 of file input_output_output_tool.h.

◆ m_output_filename1

std::string mcrl2::utilities::tools::input_output_output_tool::m_output_filename1
protected

The output file names.

Definition at line 33 of file input_output_output_tool.h.

◆ m_output_filename2

std::string mcrl2::utilities::tools::input_output_output_tool::m_output_filename2
protected

Definition at line 34 of file input_output_output_tool.h.


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