src/tools/lvr2_slam2hdf5/Options.cpp
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.cpp
22  *
23  * Created on: Nov 21, 2010
24  * Author: Thomas Wiemann
25  */
26 
27 #include "Options.hpp"
28 
29 namespace slam2hdf5
30 {
31 
32 Options::Options(int argc, char** argv) : m_descr("Supported options")
33 {
34 
35  // Create option descriptions
36 
37  m_descr.add_options()
38  ("help", "Produce help message")
39  ("inputDir", value<string>()->default_value("./"), "A directory containg .ply files to merge.")
40  ;
41 
42  m_pdescr.add("inputDir", -1);
43 
44  // Parse command line and generate variables map
45  store(command_line_parser(argc, argv).options(m_descr).positional(m_pdescr).run(), m_variables);
46  notify(m_variables);
47 
48  if(m_variables.count("help")) {
49  ::std::cout<< m_descr << ::std::endl;
50  exit(-1);
51  }
52 
53 
54 }
55 
56 } // namespace ply_merger
options
const kaboom::Options * options
Definition: src/tools/lvr2_kaboom/Main.cpp:45
slam2hdf5::Options::m_descr
options_description m_descr
The internally used option description.
Definition: src/tools/lvr2_slam2hdf5/Options.hpp:69
slam2hdf5::Options::Options
Options(int argc, char **argv)
Ctor. Parses the command parameters given to the main function of the program.
Definition: src/tools/lvr2_slam2hdf5/Options.cpp:32
argc
int argc
Definition: tests_high_five_parallel.cpp:27
slam2hdf5
Definition: src/tools/lvr2_slam2hdf5/Options.cpp:29
slam2hdf5::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: src/tools/lvr2_slam2hdf5/Options.hpp:66
slam2hdf5::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: src/tools/lvr2_slam2hdf5/Options.hpp:72
Options.hpp
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28


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