libbio
Loading...
Searching...
No Matches
Public Member Functions | List of all members
bio::Cache Class Reference

#include <Cache.h>

Inheritance diagram for bio::Cache:
Inheritance graph
[legend]
Collaboration diagram for bio::Cache:
Collaboration graph
[legend]

Public Member Functions

 Cache ()
 
virtual ~Cache ()
 
virtual void Flush ()
 

Detailed Description

A Cache is a register of Cached objects.
This class provides an easy to use interface for accessing cached variables.

When to use:
For the most part, you will never need to use *this directly.
The one exception is if you are creating a save / load system and need to Clear the Cache after changing the underlying values.

What to cache:
The Biology library make heavy use of Name <-> Id pairings. Ids are faster; names are more robust.
Any kind of speed trade off through pairing is a candidate for caching.

Constructor & Destructor Documentation

◆ Cache()

bio::Cache::Cache ( )

◆ ~Cache()

bio::Cache::~Cache ( )
virtual

Member Function Documentation

◆ Flush()

void bio::Cache::Flush ( )
virtual

Flushes all Cached objects, causing them to be looked up again.


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