24 #ifndef DISABLE_BOOST_PROGRAM_OPTIONS
26 #ifndef UQ_BOOST_INPUT_OPTIONS_H
27 #define UQ_BOOST_INPUT_OPTIONS_H
30 #include <queso/ScopedPtr.h>
31 #include <queso/BaseInputOptionsParser.h>
35 namespace program_options
37 class options_description;
77 void registerOption(std::string name, T defaultValue, std::string description);
84 void getOption(std::string & name, T & value);
87 friend std::ostream &
operator<<(std::ostream & os,
97 ScopedPtr<boost::program_options::variables_map>::Type
m_optionsMap;
105 #endif // UQ_BOOST_INPUT_OPTIONS_H
107 #endif // DISABLE_BOOST_PROGRAM_OPTIONS
ScopedPtr< boost::program_options::options_description >::Type m_optionsDescription
virtual ~BoostInputOptionsParser()
Destructor.
friend std::ostream & operator<<(std::ostream &os, const BoostInputOptionsParser &parser)
Helpful stream operator for printing the parser state.
void getOption(std::string &name, T &value)
Get option name from the parser and set value to the parsed value.
ScopedPtr< boost::program_options::variables_map >::Type m_optionsMap
BoostInputOptionsParser()
Default constructor that sets m_filename to "".
void scanInputFile()
This is the method that parses the input file.
void registerOption(std::string name, T defaultValue, std::string description)
Call this to register an option with the parser.
const std::string m_filename