- Main Page
- Namespaces
- Classes
- Files

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Ipopt::DependentResult< T > Class Template Reference

Templated class which stores one entry for the CachedResult class. More...

`#include <IpCachedResults.hpp>`

Inheritance diagram for Ipopt::DependentResult< T >:

[legend]
Collaboration diagram for Ipopt::DependentResult< T >:

[legend]
List of all members.

## Public Member Functions
bool | DependentsIdentical (const std::vector< const TaggedObject * > &dependents, const std::vector< Number > &scalar_dependents) const
| This method returns true if the dependencies provided to this function are identical to the ones stored with the DependentResult.
void | DebugPrint () const
| Print information about this DependentResults.
Constructor, Destructors
| DependentResult (const T &result, const std::vector< const TaggedObject * > &dependents, const std::vector< Number > &scalar_dependents)
| Constructor, given all information about the result.
| ~DependentResult ()
| Destructor.
Accessor method.
bool | IsStale () const
| This returns true, if the DependentResult is no longer valid.
void | Invalidate ()
| Invalidates the cached result.
const T & | GetResult () const
| Returns the cached result.
## Protected Member Functions
virtual void | RecieveNotification (NotifyType notify_type, const Subject *subject)
| This method is overloading the pure virtual method from the Observer base class.
## Private Member Functions
Default Compiler Generated Methods
(Hidden to avoid implicit creation/calling). These methods are not implemented and we do not want the compiler to implement them for us, so we declare them private and do not define them. This ensures that they will not be implicitly created/called.
| DependentResult ()
| Default Constructor.
| DependentResult (const DependentResult &)
| Copy Constructor.
void | operator= (const DependentResult &)
| Overloaded Equals Operator.
## Private Attributes
bool | stale_
| Flag indicating, if the cached result is still valid.
const T | result_
| The value of the dependent results.
std::vector< TaggedObject::Tag > | dependent_tags_
| Dependencies in form of TaggedObjects.
std::vector< Number > | scalar_dependents_
| Dependencies in form a Numbers.

## Detailed Description

### template<class T>
class Ipopt::DependentResult< T >

Templated class which stores one entry for the CachedResult class.

It stores the result (of type T), together with its dependencies (vector of TaggedObjects and vector of Numbers). It also stores a priority.

Definition at line 245 of file IpCachedResults.hpp.

## Constructor & Destructor Documentation

template<class T>

Ipopt::DependentResult< T >::DependentResult | ( | const T & | result,
|  | const std::vector< const TaggedObject * > & | dependents,
|  | const std::vector< Number > & | scalar_dependents |
| ) |  |  |

Constructor, given all information about the result.

Definition at line 338 of file IpCachedResults.hpp.

References DBG_START_METH, Ipopt::DependentResult< T >::dependent_tags_, Ipopt::Observer::NT_Changed, and Ipopt::Observer::RequestAttach().

template<class T>

Ipopt::DependentResult< T >::~DependentResult | ( |  | ) |

Destructor.

Definition at line 371 of file IpCachedResults.hpp.

References DBG_START_METH.

template<class T>

Ipopt::DependentResult< T >::DependentResult | ( |  | ) | `[private]`

Default Constructor.

template<class T>

Ipopt::DependentResult< T >::DependentResult | ( | const DependentResult< T > & |  | ) | `[private]`

Copy Constructor.

## Member Function Documentation

template<class T>

bool Ipopt::DependentResult< T >::IsStale | ( |  | ) | const

This returns true, if the DependentResult is no longer valid.

Definition at line 383 of file IpCachedResults.hpp.

References Ipopt::DependentResult< T >::stale_.

template<class T>

void Ipopt::DependentResult< T >::Invalidate | ( |  | ) |

Invalidates the cached result.

Definition at line 389 of file IpCachedResults.hpp.

References Ipopt::DependentResult< T >::stale_.

template<class T>

const T & Ipopt::DependentResult< T >::GetResult | ( |  | ) | const

Returns the cached result.

Definition at line 447 of file IpCachedResults.hpp.

References DBG_ASSERT, DBG_START_METH, Ipopt::DependentResult< T >::result_, and Ipopt::DependentResult< T >::stale_.

template<class T>

bool Ipopt::DependentResult< T >::DependentsIdentical | ( | const std::vector< const TaggedObject * > & | dependents,
|  | const std::vector< Number > & | scalar_dependents |
| ) |  |  | const

This method returns true if the dependencies provided to this function are identical to the ones stored with the DependentResult.

Definition at line 409 of file IpCachedResults.hpp.

References DBG_ASSERT, DBG_START_METH, Ipopt::DependentResult< T >::dependent_tags_, Ipopt::DependentResult< T >::scalar_dependents_, and Ipopt::DependentResult< T >::stale_.

template<class T>

void Ipopt::DependentResult< T >::DebugPrint | ( |  | ) | const

Print information about this DependentResults.

Definition at line 458 of file IpCachedResults.hpp.

References DBG_START_METH.

template<class T>

void Ipopt::DependentResult< T >::RecieveNotification | ( | NotifyType | notify_type,
|  | const Subject * | subject |
| ) |  |  | `[protected, virtual]`

This method is overloading the pure virtual method from the Observer base class.

This method is called when a Subject registered for this Observer sends a notification. In this particular case, if this method is called with notify_type==NT_Changed or NT_BeingDeleted, then this results is marked as stale.

Definition at line 395 of file IpCachedResults.hpp.

References DBG_START_METH, Ipopt::Observer::NT_BeingDestroyed, Ipopt::Observer::NT_Changed, and Ipopt::DependentResult< T >::stale_.

template<class T>

void Ipopt::DependentResult< T >::operator= | ( | const DependentResult< T > & |  | ) | `[private]`

Overloaded Equals Operator.

## Member Data Documentation

template<class T>

bool Ipopt::DependentResult< T >::stale_`[private]`

Flag indicating, if the cached result is still valid.

A result becomes invalid, if the RecieveNotification method is called with NT_Changed

Definition at line 319 of file IpCachedResults.hpp.

Referenced by Ipopt::DependentResult< T >::DependentsIdentical(), Ipopt::DependentResult< T >::GetResult(), Ipopt::DependentResult< T >::Invalidate(), Ipopt::DependentResult< T >::IsStale(), and Ipopt::DependentResult< T >::RecieveNotification().

template<class T>

const T Ipopt::DependentResult< T >::result_`[private]`

The value of the dependent results.

Definition at line 321 of file IpCachedResults.hpp.

Referenced by Ipopt::DependentResult< T >::GetResult().

template<class T>

std::vector<TaggedObject::Tag> Ipopt::DependentResult< T >::dependent_tags_`[private]`

Dependencies in form of TaggedObjects.

Definition at line 323 of file IpCachedResults.hpp.

Referenced by Ipopt::DependentResult< T >::DependentResult(), and Ipopt::DependentResult< T >::DependentsIdentical().

template<class T>

std::vector<Number> Ipopt::DependentResult< T >::scalar_dependents_`[private]`

Dependencies in form a Numbers.

Definition at line 325 of file IpCachedResults.hpp.

Referenced by Ipopt::DependentResult< T >::DependentsIdentical().

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

- /home/coin/SVN-release/Ipopt-3.2.1/Ipopt/src/Common/IpCachedResults.hpp