src/tools/lvr2_slam2hdf5/Options.hpp
Go to the documentation of this file.
1 /* Copyright (C) 2011 Uni Osnabrück
2  * This file is part of the LAS VEGAS Reconstruction Toolkit,
3  *
4  * LAS VEGAS is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * LAS VEGAS is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
17  */
18 
19 
20  /*
21  * Options.h
22  *
23  * Created on: Nov 21, 2010
24  * Author: Thomas Wiemann
25  */
26 
27 #ifndef OPTIONS_H_
28 #define OPTIONS_H_
29 
30 #include <iostream>
31 #include <string>
32 #include <vector>
33 #include <boost/program_options.hpp>
34 
35 using std::ostream;
36 using std::cout;
37 using std::endl;
38 using std::string;
39 using std::vector;
40 
41 
42 namespace slam2hdf5
43 {
44 
45 using namespace boost::program_options;
46 
51 class Options {
52 public:
53 
58  Options(int argc, char** argv);
59  virtual ~Options() {};
60 
61  string inputDir() const { return m_variables["inputDir"].as<string>(); }
62 
63 private:
64 
66  variables_map m_variables;
67 
69  options_description m_descr;
70 
72  positional_options_description m_pdescr;
73 
74 };
75 
76 
78 inline ostream& operator<<(ostream& os, const Options &o)
79 {
80  cout << "##### Program options: " << endl;
81  cout << "##### Input dir \t\t: " << o.inputDir() << endl;
82  return os;
83 }
84 
85 } // namespace reconstruct
86 
87 
88 #endif /* OPTIONS_H_ */
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.
options_description m_descr
The internally used option description.
A class to parse the program options for the reconstruction executable.
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