CS::Utility::Implementation::FixedSizeCacheElement< K, T > Class Template Reference (Crystal Space 2.0 Public API Reference)

| ## Public API Reference

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions
CS::Utility::Implementation::FixedSizeCacheElement< K, T > Class Template Reference

Represent one element in the cache with key and data. More...

`#include <csutil/fixedsizecache.h>`

List of all members.

## Public Member Functions
const T & | GetData () const
| Get current value of the data.
const K & | GetKey () const
| Get current value of the key.
void | InvalidateData ()
| Invalidate the data.
void | InvalidateKey ()
| Invalidate the key.
void | SetData (const T &t)
| Set the data item, assuming its invalid.
void | SetKey (const K &k)
| Set key, assuming its invalid.

## Detailed Description

### template<typename K, typename T>
class CS::Utility::Implementation::FixedSizeCacheElement< K, T >

Represent one element in the cache with key and data.

The element can be in one of three states:

- Invalid
- Key valid
- Key and data valid

However, for efficiency reasons it does not keep track of its current state, that must be done by the user.

Definition at line 46 of file fixedsizecache.h.

## Member Function Documentation

template<typename K , typename T >

const T& CS::Utility::Implementation::FixedSizeCacheElement< K, T >::GetData | ( |  | ) | const`[inline]`

Get current value of the data.

Definition at line 74 of file fixedsizecache.h.

template<typename K , typename T >

const K& CS::Utility::Implementation::FixedSizeCacheElement< K, T >::GetKey | ( |  | ) | const`[inline]`

Get current value of the key.

Definition at line 56 of file fixedsizecache.h.

template<typename K , typename T >

void CS::Utility::Implementation::FixedSizeCacheElement< K, T >::InvalidateData | ( |  | ) | `[inline]`

Invalidate the data.

Definition at line 80 of file fixedsizecache.h.

template<typename K , typename T >

void CS::Utility::Implementation::FixedSizeCacheElement< K, T >::InvalidateKey | ( |  | ) | `[inline]`

Invalidate the key.

Definition at line 62 of file fixedsizecache.h.

template<typename K , typename T >

void CS::Utility::Implementation::FixedSizeCacheElement< K, T >::SetData | ( | const T & | t | ) | `[inline]`

Set the data item, assuming its invalid.

Definition at line 68 of file fixedsizecache.h.

template<typename K , typename T >

void CS::Utility::Implementation::FixedSizeCacheElement< K, T >::SetKey | ( | const K & | k | ) | `[inline]`

Set key, assuming its invalid.

Definition at line 50 of file fixedsizecache.h.

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

- csutil/fixedsizecache.h