Go to the documentation of this file.
7 #ifndef __IPOPTLIST_HPP__
8 #define __IPOPTLIST_HPP__
54 allow_clobber_(allow_clobber),
55 dont_print_(dont_print)
63 : value_(copy.value_),
64 counter_(copy.counter_),
65 initialized_(copy.initialized_),
66 allow_clobber_(copy.allow_clobber_),
67 dont_print_(copy.dont_print_)
117 return allow_clobber_;
154 : reg_options_(reg_options),
199 reg_options_ = reg_options;
213 const std::string& tag,
214 const std::string& value,
215 bool allow_clobber =
true,
216 bool dont_print =
false
220 const std::string& tag,
222 bool allow_clobber =
true,
223 bool dont_print =
false
227 const std::string& tag,
229 bool allow_clobber =
true,
230 bool dont_print =
false
238 const std::string& tag,
239 const std::string& value,
240 bool allow_clobber =
true,
241 bool dont_print =
false
245 const std::string& tag,
247 bool allow_clobber =
true,
248 bool dont_print =
false
252 const std::string& tag,
254 bool allow_clobber =
true,
255 bool dont_print =
false
264 const std::string& tag,
266 const std::string& prefix
270 const std::string& tag,
272 const std::string& prefix
276 const std::string& tag,
278 const std::string& prefix
282 const std::string& tag,
284 const std::string& prefix
288 const std::string& tag,
290 const std::string& prefix
315 bool allow_clobber =
false
343 const std::string tag
355 const std::string& tag,
356 const std::string& prefix,
365 const std::string& tag
OptionValue(std::string value, bool allow_clobber, bool dont_print)
Constructor given the value.
OptionsList(const OptionsList ©)
Copy Constructor.
virtual bool GetIntegerValue(const std::string &tag, Index &value, const std::string &prefix) const
~OptionValue()
Default Destructor.
virtual bool SetStringValueIfUnset(const std::string &tag, const std::string &value, bool allow_clobber=true, bool dont_print=false)
virtual void SetJournalist(const SmartPtr< Journalist > jnlst)
virtual void PrintList(std::string &list) const
Get a string with the list of all options (tag, value, counter)
bool readnexttoken(std::istream &is, std::string &token)
read the next token from stream is
virtual void clear()
Method for clearing all previously set options.
virtual void PrintUserOptions(std::string &list) const
Get a string with the list of all options set by the user (tag, value, used/notused).
virtual void SetRegisteredOptions(const SmartPtr< RegisteredOptions > reg_options)
std::string value_
Value for this option.
virtual bool ReadFromStream(const Journalist &jnlst, std::istream &is, bool allow_clobber=false)
Read options from the stream is.
This file contains a base class for all exceptions and a set of macros to help with exceptions.
double Number
Type of all numbers.
SmartPtr< Journalist > jnlst_
Journalist for writing error messages, etc.
Index counter_
Counter for requests.
virtual bool GetBoolValue(const std::string &tag, bool &value, const std::string &prefix) const
std::string GetValue() const
Method for retrieving the value of an option.
virtual bool SetIntegerValue(const std::string &tag, Index value, bool allow_clobber=true, bool dont_print=false)
std::string lowercase_buffer_
auxiliary string set by lowercase method
const std::string & lowercase(const std::string tag) const
auxiliary method for converting sting to all lower-case letters
int Index
Type of all indices of vectors, matrices etc.
virtual bool SetNumericValue(const std::string &tag, Number value, bool allow_clobber=true, bool dont_print=false)
Index Counter() const
Method for accessing current value of the request counter.
bool DontPrint() const
True if this option is not to show up in the print_user_options output.
virtual bool GetNumericValue(const std::string &tag, Number &value, const std::string &prefix) const
Template class for Smart Pointers.
bool allow_clobber_
True if the option can be overwritten.
SmartPtr< RegisteredOptions > reg_options_
list of all the registered options to validate against
bool initialized_
for debugging
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
virtual bool SetStringValue(const std::string &tag, const std::string &value, bool allow_clobber=true, bool dont_print=false)
bool AllowClobber() const
True if the option can be overwritten.
void operator=(const OptionValue ©)
Equals operator.
Class responsible for all message output.
virtual ~OptionsList()
Destructor.
virtual bool SetNumericValueIfUnset(const std::string &tag, Number value, bool allow_clobber=true, bool dont_print=false)
bool will_allow_clobber(const std::string &tag) const
tells whether or not we can clobber a particular option
Class for storing the value and counter for each option in OptionsList.
virtual bool GetStringValue(const std::string &tag, std::string &value, const std::string &prefix) const
virtual void operator=(const OptionsList &source)
Default Assignment Operator.
virtual bool SetIntegerValueIfUnset(const std::string &tag, Index value, bool allow_clobber=true, bool dont_print=false)
std::map< std::string, OptionValue > options_
Default Constructor.
DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)
OptionValue(const OptionValue ©)
Copy Constructor.
This class stores a list of user set options.
bool dont_print_
True if this option is not to show up in the print_user_options output.
OptionValue()
Default constructor.
std::string Value() const
Method for retrieving the value without increasing the counter.
Storing the reference count of all the smart pointers that currently reference it.
virtual bool GetEnumValue(const std::string &tag, Index &value, const std::string &prefix) const
OptionsList(SmartPtr< RegisteredOptions > reg_options, SmartPtr< Journalist > jnlst)