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
std::string Value() const
Method for retrieving the value without increasing the counter.
virtual void SetJournalist(const SmartPtr< Journalist > jnlst)
OptionValue(std::string value, bool allow_clobber, bool dont_print)
Constructor given the value.
OptionValue(const OptionValue ©)
Copy Constructor.
DECLARE_STD_EXCEPTION(FATAL_ERROR_IN_LINEAR_SOLVER)
double Number
Type of all numbers.
virtual void operator=(const OptionsList &source)
Default Assignment Operator.
~OptionValue()
Default Destructor.
bool dont_print_
True if this option is not to show up in the print_user_options output.
OptionsList(const OptionsList ©)
Copy Constructor.
Template class for Smart Pointers.
Storing the reference count of all the smart pointers that currently reference it.
This class stores a list of user set options.
Index counter_
Counter for requests.
OptionsList(SmartPtr< RegisteredOptions > reg_options, SmartPtr< Journalist > jnlst)
bool AllowClobber() const
True if the option can be overwritten.
bool allow_clobber_
True if the option can be overwritten.
Index Counter() const
Method for accessing current value of the request counter.
std::map< std::string, OptionValue > options_
Default Constructor.
std::string lowercase_buffer_
auxiliary string set by lowercase method
int Index
Type of all indices of vectors, matrices etc.
bool DontPrint() const
True if this option is not to show up in the print_user_options output.
bool initialized_
for debugging
virtual void SetRegisteredOptions(const SmartPtr< RegisteredOptions > reg_options)
Class for storing the value and counter for each option in OptionsList.
Class responsible for all message output.
virtual ~OptionsList()
Destructor.
std::string GetValue() const
Method for retrieving the value of an option.
SmartPtr< Journalist > jnlst_
Journalist for writing error messages, etc.
OptionValue()
Default constructor.
void operator=(const OptionValue ©)
Equals operator.
SmartPtr< RegisteredOptions > reg_options_
list of all the registered options to validate against
std::string value_
Value for this option.
virtual void clear()
Method for clearing all previously set options.