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_ */
char ** m_argv
Argument values.
Definition: BaseOption.hpp:119
float sz() const
Returns the scaling factor for the z coordinates.
Definition: BaseOption.hpp:72
float sy() const
Returns the scaling factor for the y coordinates.
Definition: BaseOption.hpp:67
CoordinateTransform< float > * m_coordinateTransform
Coordinate transform information.
Definition: BaseOption.hpp:113
options_description m_descr
The internally used option description.
Definition: BaseOption.hpp:107
int y() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:82
float sx() const
Returns the scaling factor for the x coordinates.
Definition: BaseOption.hpp:62
positional_options_description m_pdescr
The internally used positional option desription.
Definition: BaseOption.hpp:110
variables_map m_variables
The internally used variable map.
Definition: BaseOption.hpp:104
int z() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:87
int x() const
Returns the position of the x coordinate in the data.
Definition: BaseOption.hpp:77
int m_argc
Argument count.
Definition: BaseOption.hpp:116
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:06