A Creator object which forgets its data when memory is going low.
More...
#include </home/werner/origo/vish/memcore/AlzheimerCreator.hpp>
List of all members.
Public Member Functions
- AlzheimerCreator (const RefPtr< Object > &D, const WeakPtr< Cache > &cache)
- Construct a creator with optional data object.
-
void assignData (const WeakPtr< Object > &newData)
-
void assignData (Object *newData)
-
override RefPtr< Object > create ()
- Object creation function (just returns the object which was specified during construction).
-
override RefPtr< Object > get () const
- A passive function to return the current Data object if it exists.
-
override CacheablePtr getCacheable () const
-
const type_info & getType ()
- It is assumed that the Data object provides a getType() function retrieving the actual operational value type id.
-
override bool hasData () const
- Tell whether data exist here.
-
override
Creature::ReasonForReleasal release ()
- Release operation, forget the data.
-
override RefPtr< Object > take ()
- An active function to take the strong pointer out of here.
Protected Attributes
Detailed Description
A Creator object which forgets its data when memory is going low.
Derive from Creator<Object> instead?
Constructor & Destructor Documentation
MemCore::AlzheimerCreator::AlzheimerCreator |
( |
const RefPtr< Object > & |
D, |
|
|
const WeakPtr< Cache > & |
cache |
|
) |
| [inline] |
Construct a creator with optional data object.
- Note:
- The constructor does not yet activate memory management for the data object. The activateCaching() needs to be called explicitely AFTER there exists at least one strong reference pointer to the data object and to the Creator object (`this' object). This cannot be done at the constructor, because there is not yet any strong reference pointer that keeps the Creator object alive!
The documentation for this class was generated from the following file:
- memcore/AlzheimerCreator.hpp