RegisteredOption Class Reference

#include <IpRegOptions.hpp>

Inheritance diagram for RegisteredOption:

ReferencedObject

List of all members.


Detailed Description

Base class for registered options.

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

Public Member Functions

 DECLARE_STD_EXCEPTION (ERROR_CONVERTING_STRING_TO_ENUM)
void OutputDescription (const Journalist &jnlst) const
 output a description of the option
void OutputShortDescription (const Journalist &jnlst) const
 output a more concise version
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.
const std::string & Name () const
 Standard Get / Set Methods.
void SetName (const std::string &name)
 Set the option's name (tag in the input file).
const std::string & ShortDescription () const
 Get the short description.
const std::string & LongDescription () const
 Get the long description.
void SetShortDescription (const std::string &short_description)
 Set the short description.
void SetLongDescription (const std::string &long_description)
 Set the long description.
const std::string & RegisteringCategory () const
 Get the registering class.
void SetRegisteringCategory (const std::string &registering_category)
 Set the registering class.
const RegisteredOptionTypeType () const
 Get the Option's type.
void SetType (const RegisteredOptionType &type)
 Get the Option's type.
Index Counter () const
 Counter.
Get / Set methods valid for specific types - NOTE: the Type
must be set before calling these methods.

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

Classes

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


Constructor & Destructor Documentation

RegisteredOption (  )  [inline]

Constructors / Destructors.

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

Constructors / Destructors.

RegisteredOption ( const RegisteredOption copy  )  [inline]

Constructors / Destructors.

virtual ~RegisteredOption (  )  [inline, virtual]

Constructors / Destructors.


Member Function Documentation

DECLARE_STD_EXCEPTION ( ERROR_CONVERTING_STRING_TO_ENUM   ) 

const std::string& Name (  )  const [inline]

Standard Get / Set Methods.

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

void SetName ( const std::string &  name  )  [inline]

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

const std::string& ShortDescription (  )  const [inline]

Get the short description.

const std::string& LongDescription (  )  const [inline]

Get the long description.

void SetShortDescription ( const std::string &  short_description  )  [inline]

Set the short description.

void SetLongDescription ( const std::string &  long_description  )  [inline]

Set the long description.

const std::string& RegisteringCategory (  )  const [inline]

Get the registering class.

void SetRegisteringCategory ( const std::string &  registering_category  )  [inline]

Set the registering class.

const RegisteredOptionType& Type (  )  const [inline]

Get the Option's type.

void SetType ( const RegisteredOptionType type  )  [inline]

Get the Option's type.

Index Counter (  )  const [inline]

Counter.

const bool& HasLower (  )  const [inline]

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

References DBG_ASSERT, Ipopt::OT_Integer, and Ipopt::OT_Number.

const bool& LowerStrict (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

Number LowerNumber (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

void SetLowerNumber ( const Number lower,
const bool &  strict 
) [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

Index LowerInteger (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

void SetLowerInteger ( const Index lower  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

const bool& HasUpper (  )  const [inline]

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

References DBG_ASSERT, Ipopt::OT_Integer, and Ipopt::OT_Number.

const bool& UpperStrict (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

Number UpperNumber (  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

void SetUpperNumber ( const Number upper,
const bool &  strict 
) [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

Index UpperInteger (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

void SetUpperInteger ( const Index upper  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

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

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

References DBG_ASSERT, and Ipopt::OT_String.

Number DefaultNumber (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

void SetDefaultNumber ( const Number default_value  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

Index DefaultInteger (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

void SetDefaultInteger ( const Index default_value  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

std::string DefaultString (  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_String.

Index DefaultStringAsEnum (  )  const [inline]

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

References DBG_ASSERT, RegisteredOption::MapStringSettingToEnum(), and Ipopt::OT_String.

void SetDefaultString ( const std::string &  default_value  )  [inline]

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

References DBG_ASSERT, and Ipopt::OT_String.

bool IsValidNumberSetting ( const Number value  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Number.

bool IsValidIntegerSetting ( const Index value  )  const [inline]

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

References DBG_ASSERT, and Ipopt::OT_Integer.

bool IsValidStringSetting ( const std::string &  value  )  const

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

References DBG_ASSERT, fkinkryx::i, and Ipopt::OT_String.

std::string MapStringSetting ( const std::string &  value  )  const

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

References DBG_ASSERT, fkinkryx::i, and Ipopt::OT_String.

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.

Helps map a string setting to an enumeration.

References ASSERT_EXCEPTION, DBG_ASSERT, fkinkryx::i, and Ipopt::OT_String.

Referenced by RegisteredOption::DefaultStringAsEnum().

void OutputDescription ( const Journalist jnlst  )  const

void OutputShortDescription ( const Journalist jnlst  )  const

void OutputLatexDescription ( const Journalist jnlst  )  const


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

Generated on Fri Sep 26 07:44:27 2008 for SimTKcore by  doxygen 1.5.6