Public Member Functions | Protected Member Functions | List of all members
iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject > Class Template Referenceabstract

#include <TMorphLockedProducerBase.h>

Inheritance diagram for iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >:
iproc::TILockedProducer< Key, CacheObject > istd::IPolymorphic

Public Member Functions

 TMorphLockedProducerBase ()
 
double GetMaxCumulatedWeight () const
 
void SetMaxCumulatedWeight (double value)
 
virtual const CacheObject * ProduceLockedObject (const Key &key)
 Begin of accessing to cached element. More...
 
virtual void UnlockObject (const CacheObject *objectPtr)
 End of accessing to cached element. More...
 

Protected Member Functions

void CleanElementList ()
 Remove elements from list if cumulated weight is above defined maximum. More...
 
virtual double CalcCacheObject (const Key &key, const SourceObject &source, CacheObject &cache) const =0
 Calculate cache object from source object. More...
 
virtual const SourceObject * LockSourceObject (const Key &key)=0
 
virtual void UnlockSourceObject (const Key &key, const SourceObject *sourcePtr)=0
 

Detailed Description

template<class Key, class CacheObject, class SourceObject>
class iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >

Definition at line 18 of file TMorphLockedProducerBase.h.

Constructor & Destructor Documentation

template<class Key , class CacheObject , class SourceObject >
iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::TMorphLockedProducerBase ( )

Definition at line 75 of file TMorphLockedProducerBase.h.

Member Function Documentation

template<class Key , class CacheObject , class SourceObject >
virtual double iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::CalcCacheObject ( const Key &  key,
const SourceObject &  source,
CacheObject &  cache 
) const
protectedpure virtual

Calculate cache object from source object.

Returns
positive weight value if succeded of negative value (-1) if failed.
template<class Key , class CacheObject , class SourceObject >
void iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::CleanElementList ( )
protected

Remove elements from list if cumulated weight is above defined maximum.

Definition at line 164 of file TMorphLockedProducerBase.h.

template<class Key , class CacheObject , class SourceObject >
double iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::GetMaxCumulatedWeight ( ) const

Definition at line 82 of file TMorphLockedProducerBase.h.

template<class Key , class CacheObject , class SourceObject >
virtual const SourceObject* iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::LockSourceObject ( const Key &  key)
protectedpure virtual
template<class Key , class CacheObject , class SourceObject >
const CacheObject * iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::ProduceLockedObject ( const Key &  key)
virtual

Begin of accessing to cached element.

Returns
cached object, if it was possible to produce it for specified key.

Implements iproc::TILockedProducer< Key, CacheObject >.

Definition at line 100 of file TMorphLockedProducerBase.h.

References istd::TDelPtr< Type, Accessor >::IsValid(), and NULL.

template<class Key , class CacheObject , class SourceObject >
void iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::SetMaxCumulatedWeight ( double  value)

Definition at line 89 of file TMorphLockedProducerBase.h.

template<class Key , class CacheObject , class SourceObject >
void iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::UnlockObject ( const CacheObject *  objectPtr)
virtual

End of accessing to cached element.

Implements iproc::TILockedProducer< Key, CacheObject >.

Definition at line 145 of file TMorphLockedProducerBase.h.

template<class Key , class CacheObject , class SourceObject >
virtual void iproc::TMorphLockedProducerBase< Key, CacheObject, SourceObject >::UnlockSourceObject ( const Key &  key,
const SourceObject *  sourcePtr 
)
protectedpure virtual

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

© 2007-2017 Witold Gantzke and Kirill Lepskiy