Ipopt::RegisteredOption Class Reference

Base class for registered options. More...

#include <IpRegOptions.hpp>

Inheritance diagram for Ipopt::RegisteredOption:
Ipopt::ReferencedObject

List of all members.

Classes

class  string_entry
 class to hold the valid string settings for a string option More...

Public Member Functions

 DECLARE_STD_EXCEPTION (ERROR_CONVERTING_STRING_TO_ENUM)
virtual void OutputDescription (const Journalist &jnlst) const
 output a description of the option
virtual void OutputShortDescription (const Journalist &jnlst) const
 output a more concise version
virtual void OutputLatexDescription (const Journalist &jnlst) const
 output a latex version

 RegisteredOption ()
 Constructors / Destructors.
 RegisteredOption (const std::string &name, const std::string &short_description, const std::string &long_description, const std::string &registering_category)
 Constructors / Destructors.
 RegisteredOption (const RegisteredOption &copy)
 Constructors / Destructors.
virtual ~RegisteredOption ()
 Constructors / Destructors.

virtual const std::string & Name () const
 Standard Get / Set Methods.
virtual void SetName (const std::string &name)
 Set the option's name (tag in the input file).
virtual const std::string & ShortDescription () const
 Get the short description.
virtual const std::string & LongDescription () const
 Get the long description.
virtual void SetShortDescription (const std::string &short_description)
 Set the short description.
virtual void SetLongDescription (const std::string &long_description)
 Set the long description.
virtual const std::string & RegisteringCategory () const
 Get the registering class.
virtual void SetRegisteringCategory (const std::string &registering_category)
 Set the registering class.
virtual const
RegisteredOptionType
Type () const
 Get the Option's type.
virtual void SetType (const RegisteredOptionType &type)
 Get the Option's type.
virtual Index Counter () const
 Counter.
Get / Set methods valid for specific types - NOTE: the Type

must be set before calling these methods.

virtual const bool & HasLower () const
 check if the option has a lower bound - can be called for OT_Number & OT_Integer
virtual const bool & LowerStrict () const
 check if the lower bound is strict - can be called for OT_Number
virtual Number LowerNumber () const
 get the Number version of the lower bound - can be called for OT_Number
virtual void SetLowerNumber (const Number &lower, const bool &strict)
 set the Number version of the lower bound - can be called for OT_Number
virtual Index LowerInteger () const
 get the Integer version of the lower bound can be called for OT_Integer
virtual void SetLowerInteger (const Index &lower)
 set the Integer version of the lower bound - can be called for OT_Integer
virtual const bool & HasUpper () const
 check if the option has an upper bound - can be called for OT_Number & OT_Integer
virtual const bool & UpperStrict () const
 check if the upper bound is strict - can be called for OT_Number
virtual Number UpperNumber () const
 get the Number version of the upper bound - can be called for OT_Number
virtual void SetUpperNumber (const Number &upper, const bool &strict)
 set the Number version of the upper bound - can be called for OT_Number
virtual Index UpperInteger () const
 get the Integer version of the upper bound - can be called for OT_Integer
virtual void SetUpperInteger (const Index &upper)
 set the Integer version of the upper bound - can be called for OT_Integer
virtual void AddValidStringSetting (const std::string value, const std::string description)
 method to add valid string entries - can be called for OT_String
virtual Number DefaultNumber () const
 get the default as a Number - can be called for OT_Number
virtual void SetDefaultNumber (const Number &default_value)
 Set the default as a Number - can be called for OT_Number.
virtual Index DefaultInteger () const
 get the default as an Integer - can be called for OT_Integer
virtual void SetDefaultInteger (const Index &default_value)
 Set the default as an Integer - can be called for OT_Integer.
virtual std::string DefaultString () const
 get the default as a string - can be called for OT_String
virtual Index DefaultStringAsEnum () const
 get the default as a string, but as the index of the string in the list - helps map from a string to an enum- can be called for OT_String
virtual void SetDefaultString (const std::string &default_value)
 Set the default as a string - can be called for OT_String.
virtual bool IsValidNumberSetting (const Number &value) const
 Check if the Number value is a valid setting - can be called for OT_Number.
virtual bool IsValidIntegerSetting (const Index &value) const
 Check if the Integer value is a valid setting - can be called for OT_Integer.
virtual bool IsValidStringSetting (const std::string &value) const
 Check if the String value is a valid setting - can be called for OT_String.
virtual std::string MapStringSetting (const std::string &value) const
 Map a user setting (allowing any case) to the case used when the setting was registered.
virtual Index MapStringSettingToEnum (const std::string &value) const
 Map a user setting (allowing any case) to the index of the matched setting in the list of string settings.

Private Member Functions

void MakeValidLatexString (std::string source, std::string &dest) const
std::string MakeValidLatexNumber (Number value) const
bool string_equal_insensitive (const std::string &s1, const std::string &s2) const
 Compare two strings and return true if they are equal (case insensitive comparison).

Private Attributes

std::string name_
std::string short_description_
std::string long_description_
std::string registering_category_
RegisteredOptionType type_
bool has_lower_
bool lower_strict_
Number lower_
bool has_upper_
bool upper_strict_
Number upper_
Number default_number_
std::vector< string_entryvalid_strings_
std::string default_string_
const Index counter_
 Has the information as how many-th option this one was registered.

Static Private Attributes

static Index next_counter_

Detailed Description

Base class for registered options.

The derived types are more specific to a string option or a Number (real) option, etc.

Definition at line 33 of file IpRegOptions.hpp.


Constructor & Destructor Documentation

Ipopt::RegisteredOption::RegisteredOption (  )  [inline]

Constructors / Destructors.

Definition at line 38 of file IpRegOptions.hpp.

Ipopt::RegisteredOption::RegisteredOption ( const std::string &  name,
const std::string &  short_description,
const std::string &  long_description,
const std::string &  registering_category 
) [inline]

Constructors / Destructors.

Definition at line 46 of file IpRegOptions.hpp.

Ipopt::RegisteredOption::RegisteredOption ( const RegisteredOption copy  )  [inline]

Constructors / Destructors.

Definition at line 61 of file IpRegOptions.hpp.

virtual Ipopt::RegisteredOption::~RegisteredOption (  )  [inline, virtual]

Constructors / Destructors.

Definition at line 76 of file IpRegOptions.hpp.


Member Function Documentation

Ipopt::RegisteredOption::DECLARE_STD_EXCEPTION ( ERROR_CONVERTING_STRING_TO_ENUM   ) 
virtual const std::string& Ipopt::RegisteredOption::Name (  )  const [inline, virtual]

Standard Get / Set Methods.

Get the option's name (tag in the input file)

Definition at line 85 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetName ( const std::string &  name  )  [inline, virtual]

Set the option's name (tag in the input file).

Definition at line 90 of file IpRegOptions.hpp.

virtual const std::string& Ipopt::RegisteredOption::ShortDescription (  )  const [inline, virtual]

Get the short description.

Definition at line 95 of file IpRegOptions.hpp.

virtual const std::string& Ipopt::RegisteredOption::LongDescription (  )  const [inline, virtual]

Get the long description.

Definition at line 100 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetShortDescription ( const std::string &  short_description  )  [inline, virtual]

Set the short description.

Definition at line 105 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetLongDescription ( const std::string &  long_description  )  [inline, virtual]

Set the long description.

Definition at line 110 of file IpRegOptions.hpp.

virtual const std::string& Ipopt::RegisteredOption::RegisteringCategory (  )  const [inline, virtual]

Get the registering class.

Definition at line 115 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetRegisteringCategory ( const std::string &  registering_category  )  [inline, virtual]

Set the registering class.

Definition at line 120 of file IpRegOptions.hpp.

virtual const RegisteredOptionType& Ipopt::RegisteredOption::Type (  )  const [inline, virtual]

Get the Option's type.

Definition at line 125 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetType ( const RegisteredOptionType type  )  [inline, virtual]

Get the Option's type.

Definition at line 130 of file IpRegOptions.hpp.

virtual Index Ipopt::RegisteredOption::Counter (  )  const [inline, virtual]

Counter.

Definition at line 135 of file IpRegOptions.hpp.

virtual const bool& Ipopt::RegisteredOption::HasLower (  )  const [inline, virtual]

check if the option has a lower bound - can be called for OT_Number & OT_Integer

Definition at line 147 of file IpRegOptions.hpp.

virtual const bool& Ipopt::RegisteredOption::LowerStrict (  )  const [inline, virtual]

check if the lower bound is strict - can be called for OT_Number

Definition at line 154 of file IpRegOptions.hpp.

virtual Number Ipopt::RegisteredOption::LowerNumber (  )  const [inline, virtual]

get the Number version of the lower bound - can be called for OT_Number

Definition at line 161 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetLowerNumber ( const Number lower,
const bool &  strict 
) [inline, virtual]

set the Number version of the lower bound - can be called for OT_Number

Definition at line 168 of file IpRegOptions.hpp.

virtual Index Ipopt::RegisteredOption::LowerInteger (  )  const [inline, virtual]

get the Integer version of the lower bound can be called for OT_Integer

Definition at line 176 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetLowerInteger ( const Index lower  )  [inline, virtual]

set the Integer version of the lower bound - can be called for OT_Integer

Definition at line 183 of file IpRegOptions.hpp.

virtual const bool& Ipopt::RegisteredOption::HasUpper (  )  const [inline, virtual]

check if the option has an upper bound - can be called for OT_Number & OT_Integer

Definition at line 191 of file IpRegOptions.hpp.

virtual const bool& Ipopt::RegisteredOption::UpperStrict (  )  const [inline, virtual]

check if the upper bound is strict - can be called for OT_Number

Definition at line 198 of file IpRegOptions.hpp.

virtual Number Ipopt::RegisteredOption::UpperNumber (  )  const [inline, virtual]

get the Number version of the upper bound - can be called for OT_Number

Definition at line 205 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetUpperNumber ( const Number upper,
const bool &  strict 
) [inline, virtual]

set the Number version of the upper bound - can be called for OT_Number

Definition at line 212 of file IpRegOptions.hpp.

virtual Index Ipopt::RegisteredOption::UpperInteger (  )  const [inline, virtual]

get the Integer version of the upper bound - can be called for OT_Integer

Definition at line 221 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetUpperInteger ( const Index upper  )  [inline, virtual]

set the Integer version of the upper bound - can be called for OT_Integer

Definition at line 228 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::AddValidStringSetting ( const std::string  value,
const std::string  description 
) [inline, virtual]

method to add valid string entries - can be called for OT_String

Definition at line 236 of file IpRegOptions.hpp.

virtual Number Ipopt::RegisteredOption::DefaultNumber (  )  const [inline, virtual]

get the default as a Number - can be called for OT_Number

Definition at line 243 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetDefaultNumber ( const Number default_value  )  [inline, virtual]

Set the default as a Number - can be called for OT_Number.

Definition at line 249 of file IpRegOptions.hpp.

virtual Index Ipopt::RegisteredOption::DefaultInteger (  )  const [inline, virtual]

get the default as an Integer - can be called for OT_Integer

Definition at line 255 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetDefaultInteger ( const Index default_value  )  [inline, virtual]

Set the default as an Integer - can be called for OT_Integer.

Definition at line 262 of file IpRegOptions.hpp.

virtual std::string Ipopt::RegisteredOption::DefaultString (  )  const [inline, virtual]

get the default as a string - can be called for OT_String

Definition at line 268 of file IpRegOptions.hpp.

virtual Index Ipopt::RegisteredOption::DefaultStringAsEnum (  )  const [inline, virtual]

get the default as a string, but as the index of the string in the list - helps map from a string to an enum- can be called for OT_String

Definition at line 276 of file IpRegOptions.hpp.

virtual void Ipopt::RegisteredOption::SetDefaultString ( const std::string &  default_value  )  [inline, virtual]

Set the default as a string - can be called for OT_String.

Definition at line 282 of file IpRegOptions.hpp.

virtual bool Ipopt::RegisteredOption::IsValidNumberSetting ( const Number value  )  const [inline, virtual]

Check if the Number value is a valid setting - can be called for OT_Number.

Definition at line 289 of file IpRegOptions.hpp.

virtual bool Ipopt::RegisteredOption::IsValidIntegerSetting ( const Index value  )  const [inline, virtual]

Check if the Integer value is a valid setting - can be called for OT_Integer.

Definition at line 304 of file IpRegOptions.hpp.

virtual bool Ipopt::RegisteredOption::IsValidStringSetting ( const std::string &  value  )  const [virtual]

Check if the String value is a valid setting - can be called for OT_String.

virtual std::string Ipopt::RegisteredOption::MapStringSetting ( const std::string &  value  )  const [virtual]

Map a user setting (allowing any case) to the case used when the setting was registered.

virtual Index Ipopt::RegisteredOption::MapStringSettingToEnum ( const std::string &  value  )  const [virtual]

Map a user setting (allowing any case) to the index of the matched setting in the list of string settings.

Helps map a string setting to an enumeration.

virtual void Ipopt::RegisteredOption::OutputDescription ( const Journalist jnlst  )  const [virtual]

output a description of the option

virtual void Ipopt::RegisteredOption::OutputShortDescription ( const Journalist jnlst  )  const [virtual]

output a more concise version

virtual void Ipopt::RegisteredOption::OutputLatexDescription ( const Journalist jnlst  )  const [virtual]

output a latex version

void Ipopt::RegisteredOption::MakeValidLatexString ( std::string  source,
std::string &  dest 
) const [private]
std::string Ipopt::RegisteredOption::MakeValidLatexNumber ( Number  value  )  const [private]
bool Ipopt::RegisteredOption::string_equal_insensitive ( const std::string &  s1,
const std::string &  s2 
) const [private]

Compare two strings and return true if they are equal (case insensitive comparison).


Member Data Documentation

std::string Ipopt::RegisteredOption::name_ [private]

Definition at line 339 of file IpRegOptions.hpp.

Definition at line 340 of file IpRegOptions.hpp.

Definition at line 341 of file IpRegOptions.hpp.

Definition at line 342 of file IpRegOptions.hpp.

Definition at line 343 of file IpRegOptions.hpp.

Definition at line 345 of file IpRegOptions.hpp.

Definition at line 346 of file IpRegOptions.hpp.

Definition at line 347 of file IpRegOptions.hpp.

Definition at line 348 of file IpRegOptions.hpp.

Definition at line 349 of file IpRegOptions.hpp.

Definition at line 350 of file IpRegOptions.hpp.

Definition at line 351 of file IpRegOptions.hpp.

Definition at line 372 of file IpRegOptions.hpp.

Definition at line 373 of file IpRegOptions.hpp.

Has the information as how many-th option this one was registered.

Definition at line 377 of file IpRegOptions.hpp.

Definition at line 379 of file IpRegOptions.hpp.


The documentation for this class was generated from the following file:

Generated by  doxygen 1.6.2