CBMC
parse_options.h
Go to the documentation of this file.
1 /*******************************************************************\
2 
3 Module:
4 
5 Author: Daniel Kroening, kroening@kroening.com
6 
7 \*******************************************************************/
8 
9 
10 #ifndef CPROVER_UTIL_PARSE_OPTIONS_H
11 #define CPROVER_UTIL_PARSE_OPTIONS_H
12 
13 #include <string>
14 
15 #include "cmdline.h"
16 #include "message.h"
17 #include "ui_message.h"
18 
20 {
21 public:
23  const std::string &optstring,
24  int argc,
25  const char **argv,
26  const std::string &program);
27 
29 
30  virtual void help();
31  virtual void usage_error();
32 
33  virtual int doit()=0;
34 
35  virtual int main();
36  virtual ~parse_options_baset() { }
37 
39  void log_version_and_architecture(const std::string &front_end);
40 
41 private:
43 
44 protected:
47 
48  virtual void register_languages()
49  {
50  }
51 
52 private:
53  void unknown_option_msg();
54 };
55 
56 std::string
57 banner_string(const std::string &front_end, const std::string &version);
58 
66 std::string align_center_with_border(const std::string &text);
67 
68 #endif // CPROVER_UTIL_PARSE_OPTIONS_H
Class that provides messages with a built-in verbosity 'level'.
Definition: message.h:155
virtual int doit()=0
virtual void register_languages()
Definition: parse_options.h:48
virtual void usage_error()
parse_options_baset(const std::string &optstring, int argc, const char **argv, const std::string &program)
void unknown_option_msg()
Print an error message mentioning the option that was not recognized when parsing the command line.
void log_version_and_architecture(const std::string &front_end)
Write version and system architecture to log.status().
virtual ~parse_options_baset()
Definition: parse_options.h:36
virtual int main()
ui_message_handlert ui_message_handler
Definition: parse_options.h:45
virtual void help()
std::string align_center_with_border(const std::string &text)
Utility for displaying help centered messages borderered by "* *".
std::string banner_string(const std::string &front_end, const std::string &version)