You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// the timeout variable needs to be tested beyond fitting the Duration-type
19
+
options
20
+
.set_width(120)
21
+
.add_options()
22
+
("w,workers", "the number of worker threads used by the scheduler", cxxopts::value<unsigned>(workers)->default_value(std::to_string(workers)), "'unsigned'")
23
+
("o,timeout", "Time after which the execution is aborted.", cxxopts::value<reactor::Duration>(timeout)->default_value(time_to_string(timeout)), "'FLOAT UNIT'")
24
+
("f,fast", "Allow logical time to run faster than physical time.", cxxopts::value<bool>(fast)->default_value("false"))
25
+
("v,visualize", "Generate graph.dot file of the topology.", cxxopts::value<bool>(visualize)->default_value("false"))
26
+
("help", "Print help");
27
+
28
+
cxxopts::ParseResult result{};
29
+
bool parse_error{false};
30
+
try {
31
+
result = options.parse(argc, argv);
32
+
} catch (const cxxopts::OptionException& e) {
33
+
reactor::log::Error() << e.what();
34
+
parse_error = true;
35
+
}
14
36
15
-
bool visualize = false;
16
-
17
-
if (argc > 1) {
18
-
string v_str = argv[1];
19
-
visualize = (v_str == "true") ? true : false;
37
+
// if parameter --help was used or there was a parse error, print help
// the timeout variable needs to be tested beyond fitting the Duration-type
19
+
options
20
+
.set_width(120)
21
+
.add_options()
22
+
("w,workers", "the number of worker threads used by the scheduler", cxxopts::value<unsigned>(workers)->default_value(std::to_string(workers)), "'unsigned'")
23
+
("o,timeout", "Time after which the execution is aborted.", cxxopts::value<reactor::Duration>(timeout)->default_value(time_to_string(timeout)), "'FLOAT UNIT'")
24
+
("f,fast", "Allow logical time to run faster than physical time.", cxxopts::value<bool>(fast)->default_value("false"))
25
+
("v,visualize", "Generate graph.dot file of the topology.", cxxopts::value<bool>(visualize)->default_value("false"))
26
+
("help", "Print help");
27
+
28
+
cxxopts::ParseResult result{};
29
+
bool parse_error{false};
30
+
try {
31
+
result = options.parse(argc, argv);
32
+
} catch (const cxxopts::OptionException& e) {
33
+
reactor::log::Error() << e.what();
34
+
parse_error = true;
35
+
}
14
36
15
-
bool visualize = false;
16
-
17
-
if (argc > 1) {
18
-
string v_str = argv[1];
19
-
visualize = (v_str == "true") ? true : false;
37
+
// if parameter --help was used or there was a parse error, print help
// the timeout variable needs to be tested beyond fitting the Duration-type
19
+
options
20
+
.set_width(120)
21
+
.add_options()
22
+
("w,workers", "the number of worker threads used by the scheduler", cxxopts::value<unsigned>(workers)->default_value(std::to_string(workers)), "'unsigned'")
23
+
("o,timeout", "Time after which the execution is aborted.", cxxopts::value<reactor::Duration>(timeout)->default_value(time_to_string(timeout)), "'FLOAT UNIT'")
24
+
("f,fast", "Allow logical time to run faster than physical time.", cxxopts::value<bool>(fast)->default_value("false"))
25
+
("v,visualize", "Generate graph.dot file of the topology.", cxxopts::value<bool>(visualize)->default_value("false"))
26
+
("help", "Print help");
27
+
28
+
cxxopts::ParseResult result{};
29
+
bool parse_error{false};
30
+
try {
31
+
result = options.parse(argc, argv);
32
+
} catch (const cxxopts::OptionException& e) {
33
+
reactor::log::Error() << e.what();
34
+
parse_error = true;
35
+
}
14
36
15
-
bool visualize = false;
16
-
17
-
if (argc > 1) {
18
-
string v_str = argv[1];
19
-
visualize = (v_str == "true") ? true : false;
37
+
// if parameter --help was used or there was a parse error, print help
0 commit comments