You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

42 lines
1.2 KiB

  1. #ifndef STORM_UTILITY_CLI_H_
  2. #define STORM_UTILITY_CLI_H_
  3. #include <string>
  4. namespace storm {
  5. namespace cli {
  6. /*!
  7. * Processes the options and returns the exit code.
  8. */
  9. int64_t process(const int argc, const char** argv);
  10. /*!
  11. * For a command-line argument, returns a quoted version
  12. * with single quotes if it contains unsafe characters.
  13. * Otherwise, just returns the unquoted argument.
  14. */
  15. std::string shellQuoteSingleIfNecessary(const std::string& arg);
  16. void printHeader(std::string const& name, const int argc, const char** argv);
  17. void printVersion(std::string const& name);
  18. void printTimeAndMemoryStatistics(uint64_t wallclockMilliseconds = 0);
  19. /*!
  20. * Parses the given command line arguments.
  21. *
  22. * @param argc The argc argument of main().
  23. * @param argv The argv argument of main().
  24. * @return True iff the program should continue to run after parsing the options.
  25. */
  26. bool parseOptions(const int argc, const char* argv[]);
  27. void processOptions();
  28. void setUrgentOptions();
  29. }
  30. }
  31. #endif