Computer Assisted Medical Intervention Tool Kit version 6.0
 
Loading...
Searching...
No Matches
actionstatemachine/CommandLineOptions.ixx
Go to the documentation of this file.
1#include <utility>
2
3#include <utility>
4
5// This code was generated by CLI, a command line interface
6// compiler for C++.
7//
8
9namespace cli
10{
11 // unknown_mode
12 //
15 : v_ (v)
16 {
17 }
18
19 // exception
20 //
21 inline std::ostream&
22 operator<< (std::ostream& os, const exception& e)
23 {
24 e.print (os);
25 return os;
26 }
27
28 // unknown_option
29 //
31 unknown_option (std::string option)
32 : option_ (std::move(std::move(option)))
33 {
34 }
35
36 inline const std::string& unknown_option::
37 option () const
38 {
39 return option_;
40 }
41
42 // unknown_argument
43 //
45 unknown_argument (std::string argument)
46 : argument_ (std::move(std::move(argument)))
47 {
48 }
49
50 inline const std::string& unknown_argument::
51 argument () const
52 {
53 return argument_;
54 }
55
56 // missing_value
57 //
59 missing_value (std::string option)
60 : option_ (std::move(std::move(option)))
61 {
62 }
63
64 inline const std::string& missing_value::
65 option () const
66 {
67 return option_;
68 }
69
70 // invalid_value
71 //
73 invalid_value (std::string option,
74 std::string value)
75 : option_ (std::move(std::move(option))), value_ (std::move(std::move(value)))
76 {
77 }
78
79 inline const std::string& invalid_value::
80 option () const
81 {
82 return option_;
83 }
84
85 inline const std::string& invalid_value::
86 value () const
87 {
88 return value_;
89 }
90
91 // argv_scanner
92 //
94 argv_scanner (int& argc, char** argv, bool erase)
95 : i_ (1), argc_ (argc), argv_ (argv), erase_ (erase)
96 {
97 }
98
100 argv_scanner (int start, int& argc, char** argv, bool erase)
101 : i_ (start), argc_ (argc), argv_ (argv), erase_ (erase)
102 {
103 }
104
105 inline int argv_scanner::
106 end () const
107 {
108 return i_;
109 }
110}
111
112// options
113//
114
115inline const bool& options::
116help () const
117{
118 return this->help_;
119}
120
121inline const bool& options::
122version () const
123{
124 return this->version_;
125}
126
127inline const std::string& options::
128file () const
129{
130 return this->file_;
131}
132
133inline const std::string& options::
134output_dir () const
135{
136 return this->output_dir_;
137}
138
139inline const bool& options::
140autonext () const
141{
142 return this->autonext_;
143}
144
int end() const
Definition actionstatemachine/CommandLineOptions.ixx:106
argv_scanner(int &argc, char **argv, bool erase=false)
Definition actionstatemachine/CommandLineOptions.ixx:94
Definition actionstatemachine/CommandLineOptions.hxx:39
virtual void print(std::ostream &) const =0
invalid_value(std::string option, std::string value)
Definition actionstatemachine/CommandLineOptions.ixx:73
const std::string & value() const
Definition actionstatemachine/CommandLineOptions.ixx:86
const std::string & option() const
Definition actionstatemachine/CommandLineOptions.ixx:80
const std::string & option() const
Definition actionstatemachine/CommandLineOptions.ixx:65
missing_value(std::string option)
Definition actionstatemachine/CommandLineOptions.ixx:59
unknown_argument(std::string argument)
Definition actionstatemachine/CommandLineOptions.ixx:45
const std::string & argument() const
Definition actionstatemachine/CommandLineOptions.ixx:51
value
Definition actionstatemachine/CommandLineOptions.hxx:18
unknown_mode(value v)
Definition actionstatemachine/CommandLineOptions.ixx:14
unknown_option(std::string option)
Definition actionstatemachine/CommandLineOptions.ixx:31
const std::string & option() const
Definition actionstatemachine/CommandLineOptions.ixx:37
const bool & version() const
Definition actionstatemachine/CommandLineOptions.ixx:122
std::string file_
Definition actionstatemachine/CommandLineOptions.hxx:265
std::string output_dir_
Definition actionstatemachine/CommandLineOptions.hxx:266
const bool & autonext() const
Definition actionstatemachine/CommandLineOptions.ixx:140
const bool & help() const
Definition actionstatemachine/CommandLineOptions.ixx:116
bool version_
Definition actionstatemachine/CommandLineOptions.hxx:264
const std::string & file() const
Definition actionstatemachine/CommandLineOptions.ixx:128
const std::string & output_dir() const
Definition actionstatemachine/CommandLineOptions.ixx:134
bool autonext_
Definition actionstatemachine/CommandLineOptions.hxx:267
bool help_
Definition actionstatemachine/CommandLineOptions.hxx:263
Definition actionstatemachine/CommandLineOptions.cxx:15
std::ostream & operator<<(std::ostream &, const exception &)
Definition actionstatemachine/CommandLineOptions.ixx:22
STL namespace.