12#ifndef MCRL2_UTILITIES_TOOL_H
13#define MCRL2_UTILITIES_TOOL_H
21#ifdef MCRL2_PLATFORM_WINDOWS
69 desc.add_option(
"timings", make_optional_argument<std::string>(
"FILE",
""),
70 "append timing measurements to FILE. Measurements are written to "
71 "standard error if no FILE is provided");
78 if (parser.options.count(
"timings") > 0)
97 if (parser.options.count(
"quiet"))
99 if (parser.options.count(
"debug"))
101 parser.error(
"options -q/--quiet and -d/--debug cannot be used together\n");
103 if (parser.options.count(
"verbose"))
105 parser.error(
"options -q/--quiet and -v/--verbose cannot be used together\n");
108#ifndef MCRL2_TOOL_CLASSES_NO_CORE
109 if (parser.options.count(
"quiet"))
113 if (parser.options.count(
"verbose"))
117 if (parser.options.count(
"debug"))
121 if (parser.options.count(
"log-level"))
134 parser.check_no_duplicate_arguments();
141 return "[OPTION]...\n";
147 const std::string& author,
148 const std::string& what_is,
149 const std::string& tool_description,
150 std::string known_issues =
""
189#ifdef MCRL2_PLATFORM_WINDOWS
194 if (_fileno(stdin) >= 0 && _setmode(_fileno(stdin), _O_BINARY) == -1)
196 throw std::runtime_error(
"Cannot set stdin to binary mode");
203 command_line_parser parser(clinterface, argc, argv);
206 if (parser.continue_execution())
212 bool result =
pre_run(argc, argv);
242 catch (std::exception& e)
static void set_report_time_info()
Indicate that timing information should be printed.
static void set_reporting_level(const log_level_t level)
Set reporting level.
Standard exception class for reporting runtime errors.
Simple timer to time the CPU time used by a piece of code.
void start(const std::string &timing_name)
Start measurement with a hint.
void finish(const std::string &timing_name)
Finish a measurement with a hint.
void report()
Write all timing information that has been recorded.
Components for command line interfaces of mCRL2 tools.
Class to obtain running times of code.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
log_level_t log_level_from_string(const std::string &s)
Convert string to log level.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...