Public Types | Public Member Functions | Public Attributes | Friends

Cacheable Class Reference
[MemCore Cache Management of Limited Resources]

A domain for objects which may be cached. More...

#include <memcore/Cacheable.hpp>

Inheritance diagram for Cacheable:
MemCore::CacheQueue

List of all members.

Public Types

Public Member Functions

Public Attributes

Friends


Detailed Description

A domain for objects which may be cached.

Cacheable objects must be derived from this base class such that a WeakPtr<Cacheable> may point to such object and becomes notified when the object is removed. Any child classes must overload the virtual memsize() to tell the Cache class how costly the storage of objects of this kind is. Note that the memsize() does not necessarily need to be given in bytes, any other unit is acceptable as long as the same is used consistently for all objects that are assigned to the same Cache object.


Member Function Documentation

void Cacheable::DeferredConstructor (  )  [virtual]

A virtual function that is called on the first strong referencing of a Cacheable object.

This (usually) is not possible within the constructor, so it may be assumed that the object has been completely constructed. The implementation of this function may thus perform operations on the object which should be done automatically when objects of this kind are created, but they may be aware of the full object status which is not possible in the constructor.


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