12#ifndef MCRL2_UTILITIES_DETAIL_TRANSFORM_TOOL_H
13#define MCRL2_UTILITIES_DETAIL_TRANSFORM_TOOL_H
24template <
typename Tool>
33 std::map<std::string, std::shared_ptr<utilities::detail::command>>
commands;
37 super::parse_options(parser);
45 super::add_options(desc);
46 desc.add_option(
"algorithm", utilities::make_optional_argument<std::string>(
"NAME",
""),
"the algorithm that is to be applied",
'a');
47 desc.add_option(
"number", utilities::make_optional_argument<int>(
"NAME",
"-1"),
"the number of the algorithm that is to be applied",
'n');
48 desc.add_option(
"print-algorithms",
"print the available algorithms",
'p');
57 virtual void add_commands(
const std::vector<std::string>& options) = 0;
61 const std::string& author,
62 const std::string& what_is,
63 const std::string& tool_description,
64 std::string known_issues =
""
66 : Tool(name, author, what_is, tool_description, known_issues)
71 std::vector<std::string> options;
72 std::set<std::string> algorithms;
73 std::string algorithm;
80 algorithm = options[0];
81 options.erase(options.begin());
89 algorithms.insert(i->first);
101 std::cout <<
"The following algorithms are available:" << std::endl;
102 for (
auto const& algorithm: algorithms)
104 std::cout << index++ <<
") " << algorithm << std::endl;
113 for (
auto const& algo: algorithms)
126 throw std::runtime_error(
"Unknown algorithm " + algorithm);
128 i->second->execute();
Standard exception class for reporting runtime errors.
add your file description here.
std::vector< std::string > regex_split(const std::string &text, const std::string &sep)
Split a string using a regular expression separator.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...