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_ */
slam6dmerger::Options::m_outputFile
string m_outputFile
Output file name.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:81
slam6dmerger::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:87
slam6dmerger::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:90
slam6dmerger::Options
A class to parse the program options for the reconstruction executable.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:59
slam6dmerger::Options::getInputDir
string getInputDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:70
slam6dmerger::Options::getStart
int getStart() const
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:75
slam6dmerger::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:96
argc
int argc
Definition: tests_high_five_parallel.cpp:27
slam6dmerger
Definition: src/tools/lvr2_slam6d_merger/Main.cpp:65
slam6dmerger::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:84
slam6dmerger::Options::getTransformFile
string getTransformFile() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:85
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
slam6dmerger::Options::getOutputDir
string getOutputDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:80
slam6dmerger::Options::getEnd
int getEnd() const
Definition: src/tools/lvr2_slam6d_merger/Options.hpp:76
slam6dmerger::Options::getMergeDir
string getMergeDir() const
Definition: src/tools/lvr2_slam6d_merger/Options.cpp:75


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 Wed Mar 2 2022 00:37:24