Ipopt Documentation  
 
Loading...
Searching...
No Matches
Ipopt::RegisteredOption Class Reference

Option that has been registered. More...

#include <IpRegOptions.hpp>

+ Inheritance diagram for Ipopt::RegisteredOption:

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
 
virtual void OutputDoxygenDescription (const Journalist &jnlst) const
 output a doxygen version
 
 RegisteredOption (Index counter)
 Constructors / Destructors.
 
 RegisteredOption (const std::string &name, const std::string &short_description, const std::string &long_description, const SmartPtr< RegisteredCategory > &registering_category, Index counter, bool advanced=false)
 
 RegisteredOption (const RegisteredOption &copy)
 
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 RegisteredCategoryRegisteringCategory () const
 Get the registering class.
 
virtual const RegisteredOptionTypeType () const
 Get the Option's type.
 
virtual void SetType (const RegisteredOptionType &type)
 Set the Option's type.
 
virtual bool Advanced () const
 Get the advanced flag.
 
virtual void SetAdvanced (bool advanced=true)
 Set the advanced flag.
 
virtual Index Counter () const
 Counter.
 
Get / Set methods valid for specific types
Note
The Type must be set before calling these methods.
virtual const boolHasLower () const
 check if the option has a lower bound
 
virtual const boolLowerStrict () const
 check if the lower bound is strict
 
virtual Number LowerNumber () const
 get the Number version of the lower bound
 
virtual void SetLowerNumber (const Number &lower, const bool &strict)
 set the Number version of the lower bound
 
virtual Index LowerInteger () const
 get the Integer version of the lower bound
 
virtual void SetLowerInteger (const Index &lower)
 set the Integer version of the lower bound
 
virtual const boolHasUpper () const
 check if the option has an upper bound
 
virtual const boolUpperStrict () const
 check if the upper bound is strict
 
virtual Number UpperNumber () const
 get the Number version of the upper bound
 
virtual void SetUpperNumber (const Number &upper, const bool &strict)
 set the Number version of the upper bound
 
virtual Index UpperInteger () const
 get the Integer version of the upper bound
 
virtual void SetUpperInteger (const Index &upper)
 set the Integer version of the upper bound
 
virtual void AddValidStringSetting (const std::string &value, const std::string &description)
 method to add valid string entries
 
virtual Number DefaultNumber () const
 get the default as a Number
 
virtual void SetDefaultNumber (const Number &default_value)
 Set the default as a Number.
 
virtual Index DefaultInteger () const
 get the default as an Integer
 
virtual void SetDefaultInteger (const Index &default_value)
 Set the default as an Integer.
 
virtual std::string DefaultString () const
 get the default as a string
 
virtual Index DefaultStringAsEnum () const
 get the default as a string, but as the index of the string in the list
 
virtual void SetDefaultString (const std::string &default_value)
 Set the default as a string.
 
virtual std::vector< string_entryGetValidStrings () const
 get the valid string settings
 
virtual bool IsValidNumberSetting (const Number &value) const
 Check if the Number value is a valid setting.
 
virtual bool IsValidIntegerSetting (const Index &value) const
 Check if the Integer value is a valid setting.
 
virtual bool IsValidStringSetting (const std::string &value) const
 Check if the String value is a valid setting.
 
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.
 
- Public Member Functions inherited from Ipopt::ReferencedObject
 ReferencedObject ()
 
virtual ~ReferencedObject ()
 
Index ReferenceCount () const
 
void AddRef (const Referencer *referencer) const
 
void ReleaseRef (const Referencer *referencer) const
 

Private Member Functions

void MakeValidLatexString (const std::string &source, std::string &dest) const
 
std::string MakeValidLatexNumber (Number value) const
 
std::string MakeValidHTMLNumber (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_
 
SmartPtr< RegisteredCategoryregistering_category_
 
RegisteredOptionType type_
 
bool advanced_
 
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.
 

Friends

class RegisteredOptions
 

Detailed Description

Option that has been registered.

Definition at line 149 of file IpRegOptions.hpp.

Constructor & Destructor Documentation

◆ RegisteredOption() [1/3]

Ipopt::RegisteredOption::RegisteredOption ( Index  counter)
inline

Constructors / Destructors.

Definition at line 171 of file IpRegOptions.hpp.

◆ RegisteredOption() [2/3]

Ipopt::RegisteredOption::RegisteredOption ( const std::string &  name,
const std::string &  short_description,
const std::string &  long_description,
const SmartPtr< RegisteredCategory > &  registering_category,
Index  counter,
bool  advanced = false 
)
inline
Parameters
nameoption name
short_descriptionshort description
long_descriptionlong description
registering_categoryoption category
Since
3.14.0
Parameters
counteroption counter
advancedwhether option is advanced
Since
3.14.0

Definition at line 181 of file IpRegOptions.hpp.

◆ RegisteredOption() [3/3]

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

Definition at line 200 of file IpRegOptions.hpp.

◆ ~RegisteredOption()

virtual Ipopt::RegisteredOption::~RegisteredOption ( )
inlinevirtual

Definition at line 217 of file IpRegOptions.hpp.

Member Function Documentation

◆ DECLARE_STD_EXCEPTION()

Ipopt::RegisteredOption::DECLARE_STD_EXCEPTION ( ERROR_CONVERTING_STRING_TO_ENUM  )

◆ Name()

virtual const std::string & Ipopt::RegisteredOption::Name ( ) const
inlinevirtual

Standard Get / Set Methods.

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

Definition at line 226 of file IpRegOptions.hpp.

◆ SetName()

virtual void Ipopt::RegisteredOption::SetName ( const std::string &  name)
inlinevirtual

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

Definition at line 231 of file IpRegOptions.hpp.

◆ ShortDescription()

virtual const std::string & Ipopt::RegisteredOption::ShortDescription ( ) const
inlinevirtual

Get the short description.

Definition at line 238 of file IpRegOptions.hpp.

◆ LongDescription()

virtual const std::string & Ipopt::RegisteredOption::LongDescription ( ) const
inlinevirtual

Get the long description.

Definition at line 244 of file IpRegOptions.hpp.

◆ SetShortDescription()

virtual void Ipopt::RegisteredOption::SetShortDescription ( const std::string &  short_description)
inlinevirtual

Set the short description.

Definition at line 250 of file IpRegOptions.hpp.

◆ SetLongDescription()

virtual void Ipopt::RegisteredOption::SetLongDescription ( const std::string &  long_description)
inlinevirtual

Set the long description.

Definition at line 258 of file IpRegOptions.hpp.

◆ RegisteringCategory()

virtual const RegisteredCategory & Ipopt::RegisteredOption::RegisteringCategory ( ) const
inlinevirtual

Get the registering class.

Since
3.14.0

Definition at line 268 of file IpRegOptions.hpp.

◆ Type()

virtual const RegisteredOptionType & Ipopt::RegisteredOption::Type ( ) const
inlinevirtual

Get the Option's type.

Definition at line 274 of file IpRegOptions.hpp.

◆ SetType()

virtual void Ipopt::RegisteredOption::SetType ( const RegisteredOptionType type)
inlinevirtual

Set the Option's type.

Definition at line 280 of file IpRegOptions.hpp.

◆ Advanced()

virtual bool Ipopt::RegisteredOption::Advanced ( ) const
inlinevirtual

Get the advanced flag.

Since
3.14.0

Definition at line 290 of file IpRegOptions.hpp.

◆ SetAdvanced()

virtual void Ipopt::RegisteredOption::SetAdvanced ( bool  advanced = true)
inlinevirtual

Set the advanced flag.

Since
3.14.0

Definition at line 297 of file IpRegOptions.hpp.

◆ Counter()

virtual Index Ipopt::RegisteredOption::Counter ( ) const
inlinevirtual

Counter.

Definition at line 305 of file IpRegOptions.hpp.

◆ HasLower()

virtual const bool & Ipopt::RegisteredOption::HasLower ( ) const
inlinevirtual

check if the option has a lower bound

can be called for OT_Number & OT_Integer

Definition at line 320 of file IpRegOptions.hpp.

◆ LowerStrict()

virtual const bool & Ipopt::RegisteredOption::LowerStrict ( ) const
inlinevirtual

check if the lower bound is strict

can be called for OT_Number

Definition at line 330 of file IpRegOptions.hpp.

◆ LowerNumber()

virtual Number Ipopt::RegisteredOption::LowerNumber ( ) const
inlinevirtual

get the Number version of the lower bound

can be called for OT_Number

Definition at line 340 of file IpRegOptions.hpp.

◆ SetLowerNumber()

virtual void Ipopt::RegisteredOption::SetLowerNumber ( const Number lower,
const bool strict 
)
inlinevirtual

set the Number version of the lower bound

can be called for OT_Number

Definition at line 350 of file IpRegOptions.hpp.

◆ LowerInteger()

virtual Index Ipopt::RegisteredOption::LowerInteger ( ) const
inlinevirtual

get the Integer version of the lower bound

can be called for OT_Integer

Definition at line 364 of file IpRegOptions.hpp.

◆ SetLowerInteger()

virtual void Ipopt::RegisteredOption::SetLowerInteger ( const Index lower)
inlinevirtual

set the Integer version of the lower bound

can be called for OT_Integer

Definition at line 374 of file IpRegOptions.hpp.

◆ HasUpper()

virtual const bool & Ipopt::RegisteredOption::HasUpper ( ) const
inlinevirtual

check if the option has an upper bound

can be called for OT_Number & OT_Integer

Definition at line 387 of file IpRegOptions.hpp.

◆ UpperStrict()

virtual const bool & Ipopt::RegisteredOption::UpperStrict ( ) const
inlinevirtual

check if the upper bound is strict

can be called for OT_Number

Definition at line 397 of file IpRegOptions.hpp.

◆ UpperNumber()

virtual Number Ipopt::RegisteredOption::UpperNumber ( ) const
inlinevirtual

get the Number version of the upper bound

can be called for OT_Number

Definition at line 407 of file IpRegOptions.hpp.

◆ SetUpperNumber()

virtual void Ipopt::RegisteredOption::SetUpperNumber ( const Number upper,
const bool strict 
)
inlinevirtual

set the Number version of the upper bound

can be called for OT_Number

Definition at line 417 of file IpRegOptions.hpp.

◆ UpperInteger()

virtual Index Ipopt::RegisteredOption::UpperInteger ( ) const
inlinevirtual

get the Integer version of the upper bound

can be called for OT_Integer

Definition at line 432 of file IpRegOptions.hpp.

◆ SetUpperInteger()

virtual void Ipopt::RegisteredOption::SetUpperInteger ( const Index upper)
inlinevirtual

set the Integer version of the upper bound

can be called for OT_Integer

Definition at line 442 of file IpRegOptions.hpp.

◆ AddValidStringSetting()

virtual void Ipopt::RegisteredOption::AddValidStringSetting ( const std::string &  value,
const std::string &  description 
)
inlinevirtual

method to add valid string entries

can be called for OT_String

Definition at line 455 of file IpRegOptions.hpp.

◆ DefaultNumber()

virtual Number Ipopt::RegisteredOption::DefaultNumber ( ) const
inlinevirtual

get the default as a Number

can be called for OT_Number

Definition at line 467 of file IpRegOptions.hpp.

◆ SetDefaultNumber()

virtual void Ipopt::RegisteredOption::SetDefaultNumber ( const Number default_value)
inlinevirtual

Set the default as a Number.

can be called for OT_Number

Definition at line 477 of file IpRegOptions.hpp.

◆ DefaultInteger()

virtual Index Ipopt::RegisteredOption::DefaultInteger ( ) const
inlinevirtual

get the default as an Integer

can be called for OT_Integer

Definition at line 489 of file IpRegOptions.hpp.

◆ SetDefaultInteger()

virtual void Ipopt::RegisteredOption::SetDefaultInteger ( const Index default_value)
inlinevirtual

Set the default as an Integer.

can be called for OT_Integer

Definition at line 499 of file IpRegOptions.hpp.

◆ DefaultString()

virtual std::string Ipopt::RegisteredOption::DefaultString ( ) const
inlinevirtual

get the default as a string

can be called for OT_String

Definition at line 511 of file IpRegOptions.hpp.

◆ DefaultStringAsEnum()

virtual Index Ipopt::RegisteredOption::DefaultStringAsEnum ( ) const
inlinevirtual

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 523 of file IpRegOptions.hpp.

◆ SetDefaultString()

virtual void Ipopt::RegisteredOption::SetDefaultString ( const std::string &  default_value)
inlinevirtual

Set the default as a string.

can be called for OT_String

Definition at line 533 of file IpRegOptions.hpp.

◆ GetValidStrings()

virtual std::vector< string_entry > Ipopt::RegisteredOption::GetValidStrings ( ) const
inlinevirtual

get the valid string settings

can be called for OT_String

Definition at line 545 of file IpRegOptions.hpp.

◆ IsValidNumberSetting()

virtual bool Ipopt::RegisteredOption::IsValidNumberSetting ( const Number value) const
inlinevirtual

Check if the Number value is a valid setting.

can be called for OT_Number

Definition at line 555 of file IpRegOptions.hpp.

◆ IsValidIntegerSetting()

virtual bool Ipopt::RegisteredOption::IsValidIntegerSetting ( const Index value) const
inlinevirtual

Check if the Integer value is a valid setting.

can be called for OT_Integer

Definition at line 575 of file IpRegOptions.hpp.

◆ IsValidStringSetting()

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

◆ MapStringSetting()

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.

◆ MapStringSettingToEnum()

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.

◆ OutputDescription()

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

output a description of the option

◆ OutputShortDescription()

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

output a more concise version

◆ OutputLatexDescription()

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

output a latex version

◆ OutputDoxygenDescription()

virtual void Ipopt::RegisteredOption::OutputDoxygenDescription ( const Journalist jnlst) const
virtual

output a doxygen version

◆ MakeValidLatexString()

void Ipopt::RegisteredOption::MakeValidLatexString ( const std::string &  source,
std::string &  dest 
) const
private

◆ MakeValidLatexNumber()

std::string Ipopt::RegisteredOption::MakeValidLatexNumber ( Number  value) const
private

◆ MakeValidHTMLNumber()

std::string Ipopt::RegisteredOption::MakeValidHTMLNumber ( Number  value) const
private

◆ string_equal_insensitive()

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)

Friends And Related Symbol Documentation

◆ RegisteredOptions

Definition at line 151 of file IpRegOptions.hpp.

Member Data Documentation

◆ name_

std::string Ipopt::RegisteredOption::name_
private

Definition at line 637 of file IpRegOptions.hpp.

◆ short_description_

std::string Ipopt::RegisteredOption::short_description_
private

Definition at line 638 of file IpRegOptions.hpp.

◆ long_description_

std::string Ipopt::RegisteredOption::long_description_
private

Definition at line 639 of file IpRegOptions.hpp.

◆ registering_category_

SmartPtr<RegisteredCategory> Ipopt::RegisteredOption::registering_category_
private

Definition at line 640 of file IpRegOptions.hpp.

◆ type_

RegisteredOptionType Ipopt::RegisteredOption::type_
private

Definition at line 641 of file IpRegOptions.hpp.

◆ advanced_

bool Ipopt::RegisteredOption::advanced_
private

Definition at line 642 of file IpRegOptions.hpp.

◆ has_lower_

bool Ipopt::RegisteredOption::has_lower_
private

Definition at line 644 of file IpRegOptions.hpp.

◆ lower_strict_

bool Ipopt::RegisteredOption::lower_strict_
private

Definition at line 645 of file IpRegOptions.hpp.

◆ lower_

Number Ipopt::RegisteredOption::lower_
private

Definition at line 646 of file IpRegOptions.hpp.

◆ has_upper_

bool Ipopt::RegisteredOption::has_upper_
private

Definition at line 647 of file IpRegOptions.hpp.

◆ upper_strict_

bool Ipopt::RegisteredOption::upper_strict_
private

Definition at line 648 of file IpRegOptions.hpp.

◆ upper_

Number Ipopt::RegisteredOption::upper_
private

Definition at line 649 of file IpRegOptions.hpp.

◆ default_number_

Number Ipopt::RegisteredOption::default_number_
private

Definition at line 650 of file IpRegOptions.hpp.

◆ valid_strings_

std::vector<string_entry> Ipopt::RegisteredOption::valid_strings_
private

Definition at line 652 of file IpRegOptions.hpp.

◆ default_string_

std::string Ipopt::RegisteredOption::default_string_
private

Definition at line 653 of file IpRegOptions.hpp.

◆ counter_

const Index Ipopt::RegisteredOption::counter_
private

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

Definition at line 657 of file IpRegOptions.hpp.


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