BaseOption.hpp
Go to the documentation of this file.
1 
28 /*
29  * BaseOption.hpp
30  *
31  * Created on: Feb 4, 2015
32  * Author: twiemann
33  */
34 
35 #ifndef INCLUDE_LIBLVR2_CONFIG_BASEOPTION_HPP_
36 #define INCLUDE_LIBLVR2_CONFIG_BASEOPTION_HPP_
37 
38 #include <boost/program_options.hpp>
39 #include <iostream>
40 
42 
43 namespace lvr2
44 {
45 
46 using namespace boost::program_options;
47 
49 {
50 public:
51  BaseOption(int argc, char** argv);
52  virtual ~BaseOption();
53 
57  void printTransformation(std::ostream& out) const;
58 
62  float sx() const { return m_variables["sx"].as<float>();}
63 
67  float sy() const { return m_variables["sy"].as<float>();}
68 
72  float sz() const { return m_variables["sz"].as<float>();}
73 
77  int x() const { return m_variables["xPos"].as<int>();}
78 
82  int y() const { return m_variables["yPos"].as<int>();}
83 
87  int z() const { return m_variables["zPos"].as<int>();}
88 
91  CoordinateTransform<float> coordinateTransform() const;
92 
93  void printLogo() const;
94 
95 protected:
96 
98  virtual void setup();
99 
101  void setupInputTransformation();
102 
104  variables_map m_variables;
105 
107  options_description m_descr;
108 
110  positional_options_description m_pdescr;
111 
114 
116  int m_argc;
117 
119  char** m_argv;
120 
121 
122 };
123 
124 } /* namespace lvr2 */
125 
126 #endif /* INCLUDE_LIBLVR2_CONFIG_BASEOPTION_HPP_ */
lvr2::BaseOption::z
int z() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:87
lvr2::BaseOption::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: BaseOption.hpp:110
lvr2::BaseOption::x
int x() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:77
CoordinateTransform.hpp
lvr2::BaseOption
Definition: BaseOption.hpp:48
lvr2::BaseOption::m_variables
variables_map m_variables
The internally used variable map.
Definition: BaseOption.hpp:104
lvr2::BaseOption::y
int y() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:82
argc
int argc
Definition: tests_high_five_parallel.cpp:27
lvr2::BaseOption::sx
float sx() const
Returns the scaling factor for the x coordinates.
Definition: BaseOption.hpp:62
lvr2
Definition: BaseBufferManipulators.hpp:39
lvr2::BaseOption::sy
float sy() const
Returns the scaling factor for the y coordinates.
Definition: BaseOption.hpp:67
lvr2::BaseOption::m_argv
char ** m_argv
Argument values.
Definition: BaseOption.hpp:119
lvr2::BaseOption::m_coordinateTransform
CoordinateTransform< float > * m_coordinateTransform
Coordinate transform information.
Definition: BaseOption.hpp:113
lvr2::BaseOption::m_descr
options_description m_descr
The internally used option description.
Definition: BaseOption.hpp:107
lvr2::CoordinateTransform< float >
lvr2::BaseOption::sz
float sz() const
Returns the scaling factor for the z coordinates.
Definition: BaseOption.hpp:72
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
lvr2::BaseOption::m_argc
int m_argc
Argument count.
Definition: BaseOption.hpp:116


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:22