src/tools/lvr2_slam6d_merger/Options.hpp
Go to the documentation of this file.
1 
28  /*
29  * Options.h
30  *
31  * Created on: Nov 21, 2010
32  * Author: Thomas Wiemann
33  */
34 
35 #ifndef OPTIONS_H_
36 #define OPTIONS_H_
37 
38 #include <iostream>
39 #include <string>
40 #include <vector>
41 #include <boost/program_options.hpp>
42 
43 using std::ostream;
44 using std::cout;
45 using std::endl;
46 using std::string;
47 using std::vector;
48 
49 
50 namespace slam6dmerger
51 {
52 
53 using namespace boost::program_options;
54 
59 class Options {
60 public:
61 
66  Options(int argc, char** argv);
67  virtual ~Options();
68 
69  string getInputDir() const;
70  string getOutputDir() const;
71  string getMergeDir() const;
72 
73  string getTransformFile() const;
74 
75  int getStart() const { return m_variables["start"].as<int>(); }
76  int getEnd() const { return m_variables["end"].as<int>(); }
77 
78 private:
79 
81  string m_outputFile;
82 
84  variables_map m_variables;
85 
87  options_description m_descr;
88 
90  positional_options_description m_pdescr;
91 
92 };
93 
94 
96 inline ostream& operator<<(ostream& os, const Options &o)
97 {
98  cout << "##### Program options: " << endl;
99  cout << "##### Input dir \t\t: " << o.getInputDir() << endl;
100  cout << "##### Merge dir \t\t: " << o.getMergeDir() << endl;
101  cout << "##### Output dir \t\t: " << o.getOutputDir() << endl;
102  cout << "##### Transform \t\t:" << o.getTransformFile() << endl;
103  cout << "##### Start scan \t\t: " << o.getStart() << endl;
104  cout << "##### End scan \t\t\t: " << o.getStart() << endl;
105  return os;
106 }
107 
108 } // namespace reconstruct
109 
110 
111 #endif /* OPTIONS_H_ */
A class to parse the program options for the reconstruction executable.
options_description m_descr
The internally used option description.
positional_options_description m_pdescr
The internally used positional option desription.
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
variables_map m_variables
The internally used variable map.
char ** argv


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Mon Feb 28 2022 22:46:08