DependentResult Class Template Reference

#include <IpCachedResults.hpp>

Inheritance diagram for DependentResult:

Observer

List of all members.


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.

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.


Constructor & Destructor Documentation

DependentResult ( const T &  result,
const std::vector< const TaggedObject * > &  dependents,
const std::vector< Number > &  scalar_dependents 
) [inline]

Constructor, given all information about the result.

References DBG_START_METH, fkinkryx::i, Observer::NT_Changed, and Observer::RequestAttach().

~DependentResult (  )  [inline]

Destructor.

References DBG_START_METH.


Member Function Documentation

bool IsStale (  )  const [inline]

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

void Invalidate (  )  [inline]

Invalidates the cached result.

const T & GetResult (  )  const [inline]

Returns the cached result.

References DBG_ASSERT, and DBG_START_METH.

bool DependentsIdentical ( const std::vector< const TaggedObject * > &  dependents,
const std::vector< Number > &  scalar_dependents 
) const [inline]

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

References DBG_ASSERT, DBG_START_METH, and fkinkryx::i.

void DebugPrint (  )  const [inline]

Print information about this DependentResults.

References DBG_START_METH.

void RecieveNotification ( NotifyType  notify_type,
const Subject subject 
) [inline, 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.

Implements Observer.

References DBG_START_METH, Observer::NT_BeingDestroyed, and Observer::NT_Changed.


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

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