Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes

Provides a generic list of options (for internal use). More...

#include <options_list.hpp>

List of all members.

Classes

struct  OptionValue
struct  OptionValueBase

Public Member Functions

template<typename T >
returnValue add (OptionsName name, const T &value)
returnValue declareOptionsUnchanged ()
template<typename T >
returnValue get (OptionsName name, T &value) const
uint getNumber () const
BooleanType hasOption (OptionsName name, OptionsItemType type) const
BooleanType haveOptionsChanged () const
OptionsListoperator= (const OptionsList &rhs)
 OptionsList ()
 OptionsList (const OptionsList &rhs)
returnValue printOptionsList () const
template<typename T >
returnValue set (OptionsName name, const T &value)
 ~OptionsList ()

Private Types

typedef std::map< std::pair
< OptionsName, OptionsItemType >
, std::tr1::shared_ptr
< OptionValueBase > > 
OptionItems

Private Member Functions

template<typename T >
OptionsItemType getType () const

Private Attributes

OptionItems items
BooleanType optionsHaveChanged

Detailed Description

Provides a generic list of options (for internal use).

The class OptionsList provides a generic options list that allows to dynamically setup and extend option lists. It is intended for internal use only, as all user-functionality is encapsulated within the class Options.

Note:
Parts of the public functionality of the OptionsList class are tunnelled via the Options class into the AlgorithmicBase class to be used in derived classes. In case public functionality is modified or added to this class, the Options class as well as the AlgorithmicBase class have to be adapted accordingly.
Author:
Hans Joachim Ferreau, Boris Houska, Milan Vukov

Definition at line 71 of file options_list.hpp.


Member Typedef Documentation

typedef std::map<std::pair<OptionsName, OptionsItemType>, std::tr1::shared_ptr< OptionValueBase > > OptionsList::OptionItems [private]

Type for options items.

Definition at line 216 of file options_list.hpp.


Constructor & Destructor Documentation

Default constructor.

Definition at line 48 of file options_list.cpp.

Copy constructor (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 54 of file options_list.cpp.

Destructor.

Definition at line 61 of file options_list.cpp.


Member Function Documentation

template<typename T >
returnValue OptionsList::add ( OptionsName  name,
const T value 
) [inline]

Add an option item with a given value.

Template Parameters:
TOption data type.
Parameters:
[in]nameName of new option item.
[in]valueDefault value of new option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_ALREADY_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

Definition at line 241 of file options_list.hpp.

Declares all options to be unchanged.

Returns:
SUCCESSFUL_RETURN
template<typename T >
returnValue OptionsList::get ( OptionsName  name,
T value 
) const [inline]

Returns value of an existing option item of integer type.

Template Parameters:
TOption data type.
Parameters:
[in]nameName of option item.
[out]valueValue of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS

Definition at line 255 of file options_list.hpp.

uint OptionsList::getNumber ( ) const [inline]

Returns total number of option items in list.

Returns:
Total number of options in list
OptionsItemType OptionsList::getType< double > ( ) const [inline, private]

A helper function to determine type of an option.

Definition at line 225 of file options_list.hpp.

BooleanType OptionsList::hasOption ( OptionsName  name,
OptionsItemType  type 
) const [inline]

Determines whether a given option exists or not.

Parameters:
[in]nameName of option item.
[in]typeInternal type of option item.
Returns:
BT_TRUE iff option item exists,
BT_FALSE otherwise

Determines whether options have been modified.

Returns:
BT_TRUE iff options have been modified,
BT_FALSE otherwise
OptionsList & OptionsList::operator= ( const OptionsList rhs)

Assignment operator (deep copy).

Parameters:
[in]rhsRight-hand side object.

Definition at line 65 of file options_list.cpp.

Prints a list of all available options.

Returns:
SUCCESSFUL_RETURN

Definition at line 77 of file options_list.cpp.

template<typename T >
returnValue OptionsList::set ( OptionsName  name,
const T value 
) [inline]

Sets value of an existing option item of integer type to a given value.

Template Parameters:
TOption data type.
Parameters:
[in]nameName of option item.
[in]valueNew value of option.
Returns:
SUCCESSFUL_RETURN,
RET_OPTION_DOESNT_EXISTS,
RET_OPTIONS_LIST_CORRUPTED

Definition at line 275 of file options_list.hpp.


Member Data Documentation

Option items.

Definition at line 218 of file options_list.hpp.

Flag indicating whether the value of at least one option item has been changed.

Definition at line 191 of file options_list.hpp.


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


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Sat Jun 8 2019 19:40:25