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_ */
hdf5meshtool::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded output operator.
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:81
hdf5meshtool::Options
A class to parse the program options for the reconstruction executable.
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:52
hdf5meshtool::Options::getMeshName
string getMeshName() const
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:64
hdf5meshtool::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:69
hdf5meshtool
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.cpp:30
hdf5meshtool::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:72
hdf5meshtool::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:75
hdf5meshtool::Options::getOutputFile
string getOutputFile() const
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:63
argc
int argc
Definition: tests_high_five_parallel.cpp:27
hdf5meshtool::Options::getInputFile
string getInputFile() const
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:62
hdf5meshtool::Options::getEdgeCollapseNum
size_t getEdgeCollapseNum() const
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:65
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
hdf5meshtool::Options::getLocalRadius
float getLocalRadius() const
Definition: src/tools/lvr2_hdf5_mesh_builder/Options.hpp:66


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