cache Class Template Reference

#include <cache.hpp>

Inheritance diagram for cache:

Inheritance graph
[legend]
Collaboration diagram for cache:

Collaboration graph
[legend]

List of all members.


Detailed Description

template<typename T>
class gsgl::data::cache< T >

Instances of this class's subclasses will automatically register themselves with the global cache, if the cache() constructer is included in the initializer list of the subclass.

Definition at line 51 of file cache.hpp.


Public Member Functions

 cache (const gsgl::string &name)
bool contains_index (const gsgl::string &key) const
T *& operator[] (const gsgl::string &key)
virtual ~cache ()

Static Public Member Functions

static T * global_instance ()

Private Attributes

dictionary< T *, gsgl::stringitems
gsgl::string name

Constructor & Destructor Documentation

cache ( const gsgl::string name  )  [inline]

Definition at line 67 of file cache.hpp.

~cache (  )  [inline, virtual]

Definition at line 74 of file cache.hpp.

References dictionary::clear(), cache::items, iterable::iter(), gsgl::log(), and cache::name.


Member Function Documentation

bool contains_index ( const gsgl::string key  )  const [inline]

static T* global_instance (  )  [inline, static, inherited]

T* & operator[] ( const gsgl::string key  )  [inline]

Definition at line 62 of file cache.hpp.

References cache::items.


Member Data Documentation

dictionary<T *, gsgl::string> items [private]

Definition at line 55 of file cache.hpp.

Referenced by cache::contains_index(), cache::operator[](), and cache::~cache().

gsgl::string name [private]

Definition at line 54 of file cache.hpp.

Referenced by cache::~cache().


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

Generated on Sat Mar 1 13:50:05 2008 for Periapsis Project by  doxygen 1.5.5