Public Member Functions

Creature Class Reference
[MemCore Cache Management of Limited Resources]

An abstract base class for object creators. More...

#include <memcore/Creator.hpp>

Inheritance diagram for Creature:
Intercube Ageable CreatorBase< Domain > CreatorBase< RefType > Creator< RefType >

List of all members.

Public Member Functions


Detailed Description

An abstract base class for object creators.

A memory management repository might want to keep track of all `Creatures' and try to release some of them when memory gets tight. The virtual release() function will then ask each object to remove itself from memory. If the object dies by itself, it will be removed from the cache list if that correctly refers to the Creature via a WeakPtr<Creature>.


Member Function Documentation

bool Creature::discardCreation (  )  [virtual]

Asynchron mode: aha.

Data are under creation, but we don't want them any longer. Soo... cancel this creation request. Hopefully that works.

bool Creature::isUnderCreation (  )  [virtual]

Asynchron mode: check if the requested data are just under creation.

If this returns true, then the create() function will return false - better not ask the create() function, as we know than that this creator is already busy.

By default, returns false, meaning that data are just there.

bool Creature::release (  )  [pure virtual]

Query the object to release as much memory as it can.

Return false if the memory could not be released. In this case, the object remains in the queue.

Implemented in Creator< RefType >.


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