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;
212 virtual bool SetStringValue(
213 const std::string& tag,
214 const std::string& value,
215 bool allow_clobber =
true,
216 bool dont_print =
false
219 virtual bool SetNumericValue(
220 const std::string& tag,
222 bool allow_clobber =
true,
223 bool dont_print =
false
226 virtual bool SetIntegerValue(
227 const std::string& tag,
229 bool allow_clobber =
true,
230 bool dont_print =
false
237 virtual bool SetStringValueIfUnset(
238 const std::string& tag,
239 const std::string& value,
240 bool allow_clobber =
true,
241 bool dont_print =
false
244 virtual bool SetNumericValueIfUnset(
245 const std::string& tag,
247 bool allow_clobber =
true,
248 bool dont_print =
false
251 virtual bool SetIntegerValueIfUnset(
252 const std::string& tag,
254 bool allow_clobber =
true,
255 bool dont_print =
false
263 virtual bool GetStringValue(
264 const std::string& tag,
266 const std::string& prefix
269 virtual bool GetEnumValue(
270 const std::string& tag,
272 const std::string& prefix
275 virtual bool GetBoolValue(
276 const std::string& tag,
278 const std::string& prefix
281 virtual bool GetNumericValue(
282 const std::string& tag,
284 const std::string& prefix
287 virtual bool GetIntegerValue(
288 const std::string& tag,
290 const std::string& prefix
295 virtual void PrintList(
304 virtual void PrintUserOptions(
312 virtual bool ReadFromStream(
315 bool allow_clobber =
false
342 const std::string& lowercase(
343 const std::string tag
355 const std::string& tag,
356 const std::string& prefix,
364 bool will_allow_clobber(
365 const std::string& tag
OptionValue(std::string value, bool allow_clobber, bool dont_print)
Constructor given the value.
OptionsList(const OptionsList ©)
Copy Constructor.
~OptionValue()
Default Destructor.
virtual void SetJournalist(const SmartPtr< Journalist > jnlst)
virtual void clear()
Method for clearing all previously set options.
virtual void SetRegisteredOptions(const SmartPtr< RegisteredOptions > reg_options)
std::string value_
Value for this option.
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.
std::string GetValue() const
Method for retrieving the value of an option.
std::string lowercase_buffer_
auxiliary string set by lowercase method
int Index
Type of all indices of vectors, matrices etc.
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.
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 AllowClobber() const
True if the option can be overwritten.
void operator=(const OptionValue ©)
Equals operator.
Class responsible for all message output.
virtual ~OptionsList()
Destructor.
Class for storing the value and counter for each option in OptionsList.
virtual void operator=(const OptionsList &source)
Default Assignment Operator.
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.
OptionsList(SmartPtr< RegisteredOptions > reg_options, SmartPtr< Journalist > jnlst)