Minotaur 0.4.1
Docs for developers
|
#include <Option.h>
Public Member Functions | |
OptionDB () | |
Default constructor. | |
~OptionDB () | |
Destroy. | |
void | insert (BoolOptionPtr option, bool is_flag=false) |
Add a bool option to the database. | |
void | insert (IntOptionPtr option) |
Add an int option to the database. | |
void | insert (DoubleOptionPtr option) |
Add a double option to the database. | |
void | insert (StringOptionPtr option) |
Add a string option to the database. | |
BoolOptionPtr | findBool (const std::string &name) |
Find a bool option in the database. | |
IntOptionPtr | findInt (const std::string &name) |
Find an int option in the database. | |
DoubleOptionPtr | findDouble (const std::string &name) |
Find a double option in the database. | |
StringOptionPtr | findString (const std::string &name) |
Find a string option in the database. | |
FlagOptionPtr | findFlag (const std::string &name) |
Find a flag option in the database. | |
UInt | remove (const std::string &name) |
BoolOptionSetIter | boolBegin () |
Iterator to access the first bool option. | |
BoolOptionSetIter | boolEnd () |
Iterator to access the last bool option. | |
IntOptionSetIter | intBegin () |
Iterator to access the first integer option. | |
IntOptionSetIter | intEnd () |
Iterator to access the last integer option. | |
DoubleOptionSetIter | dblBegin () |
Iterator to access the first double option. | |
DoubleOptionSetIter | dblEnd () |
Iterator to access the last double option. | |
StringOptionSetIter | strBegin () |
Iterator to access the first string option. | |
StringOptionSetIter | strEnd () |
Iterator to access the last string option. | |
FlagOptionSetIter | flagBegin () |
Iterator to access the first flag. | |
FlagOptionSetIter | flagEnd () |
Iterator to access the last flag. | |
void | write (std::ostream &out) const |
OptionDB is a class to store a set of options. One use of this class is to save the user specified options. The user may specify options using the command line arguments, or through the API. Further, some of the options may be invalid (with typos). This class can tell if the options specified by the user are legitimate options.
UInt Minotaur::OptionDB::remove | ( | const std::string & | name | ) |
Remove from the database all options that have the provided name. Return the number of options that were removed.
void OptionDB::write | ( | std::ostream & | out | ) | const |
Write the database to the output stream. It will print the option name, the value and if it was ever used.