This class stores a list of user set options. More...
#include <IpOptionsList.hpp>
Classes | |
class | OptionValue |
Class for storing the value and counter for each option in OptionsList. More... | |
Private Member Functions | |
const std::string & | lowercase (const std::string &tag) const |
auxiliary method for converting sting to all lower-case letters | |
bool | find_tag (const std::string &tag, const std::string &prefix, std::string &value) const |
auxiliary method for finding the value for a tag in the options list | |
bool | will_allow_clobber (const std::string &tag) const |
tells whether or not we can clobber a particular option | |
bool | readnexttoken (std::istream &is, std::string &token) |
read the next token from stream is | |
Private Attributes | |
std::map< std::string, OptionValue > | options_ |
Default Constructor. | |
SmartPtr< RegisteredOptions > | reg_options_ |
list of all the registered options to validate against | |
SmartPtr< Journalist > | jnlst_ |
Journalist for writing error messages, etc. | |
std::string | lowercase_buffer_ |
auxiliary string set by lowercase method | |
This class stores a list of user set options.
Each option is identified by a case-insensitive keyword (tag). Its value is stored internally as a string (always lower case), but for convenience set and get methods are provided to obtain Index and Number type values. For each keyword we also keep track of how often the value of an option has been requested by a get method.
Definition at line 32 of file IpOptionsList.hpp.
|
inline |
Definition at line 151 of file IpOptionsList.hpp.
|
inline |
Definition at line 159 of file IpOptionsList.hpp.
|
inline |
Copy Constructor.
Definition at line 163 of file IpOptionsList.hpp.
|
inlinevirtual |
Destructor.
Definition at line 171 of file IpOptionsList.hpp.
|
inlinevirtual |
Default Assignment Operator.
Definition at line 175 of file IpOptionsList.hpp.
Method for clearing all previously set options.
Definition at line 187 of file IpOptionsList.hpp.
|
inlinevirtual |
Definition at line 194 of file IpOptionsList.hpp.
|
inlinevirtual |
Definition at line 201 of file IpOptionsList.hpp.
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
Definition at line 233 of file IpOptionsList.hpp.
Resets an option to its default value, if clobber is allowed.
|
virtual |
|
virtual |
|
virtual |
|
inlinevirtual |
Definition at line 276 of file IpOptionsList.hpp.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Get a string with the list of all options (tag, value, counter)
Get a string with the list of all options set by the user (tag, value, used/notused).
Here, options with dont_print flag set to true are not printed.
|
virtual |
Read options from the stream is.
auxiliary method for converting sting to all lower-case letters
|
private |
auxiliary method for finding the value for a tag in the options list
This method first looks for the concatenated string prefix+tag (if prefix is not ""), and if this is not found, it looks for tag. The return value is true iff prefix+tag or tag is found. In that case, the corresponding string value is copied into value.
tells whether or not we can clobber a particular option
|
private |
read the next token from stream is
|
private |
|
private |
list of all the registered options to validate against
Definition at line 365 of file IpOptionsList.hpp.
|
private |
Journalist for writing error messages, etc.
Definition at line 368 of file IpOptionsList.hpp.
|
mutableprivate |
auxiliary string set by lowercase method
Definition at line 407 of file IpOptionsList.hpp.