src/tools/lvr2_hdf5_mesh_builder/Options.hpp
Go to the documentation of this file.
1 
28 #ifndef OPTIONS_H_
29 #define OPTIONS_H_
30 
31 #include <iostream>
32 #include <string>
33 #include <vector>
34 #include <boost/program_options.hpp>
35 
36 using std::ostream;
37 using std::cout;
38 using std::endl;
39 using std::string;
40 using std::vector;
41 
42 
43 namespace hdf5meshtool
44 {
45 
46 using namespace boost::program_options;
47 
52 class Options {
53 public:
54 
59  Options(int argc, char** argv);
60  virtual ~Options();
61 
62  string getInputFile() const { return m_variables["inputFile"].as<string>();}
63  string getOutputFile() const { return m_variables["outputFile"].as<string>();}
64  string getMeshName() const { return m_variables["meshName"].as<string>();}
65  size_t getEdgeCollapseNum() const { return m_variables["edgeCollapse"].as<size_t >();}
66  float getLocalRadius() const { return m_variables["localRadius"].as<float>();}
67 private:
69  variables_map m_variables;
70 
72  options_description m_descr;
73 
75  positional_options_description m_pdescr;
76 
77 };
78 
79 
81 inline ostream& operator<<(ostream& os, const Options &o)
82 {
83  cout << "##### Program options: " << endl;
84  cout << "##### Input file \t\t: " << o.getInputFile() << endl;
85  cout << "##### Output file \t\t: " << o.getOutputFile() << endl;
86  cout << "##### Mesh name \t\t: " << o.getMeshName() << endl;
87  cout << "##### Edge collapse num \t\t: " << o.getEdgeCollapseNum() << endl;
88  cout << "##### Local Radius \t\t: " << o.getLocalRadius() << endl;
89  return os;
90 }
91 
92 } // namespace reconstruct
93 
94 
95 #endif /* OPTIONS_H_ */
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded output operator.
variables_map m_variables
The internally used variable map.
options_description m_descr
The internally used option description.
positional_options_description m_pdescr
The internally used positional option desription.
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