Main Page   Class Hierarchy   Compound List   File List   Compound Members  

FIFOMap Class Template Reference

A FIFO Map class. More...

#include <FIFOMap.h>

Inheritance diagram for FIFOMap:

Inheritance graph
[legend]
Collaboration diagram for FIFOMap:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Map<KeyPair<Key>,
Value, KeyList, ValueList> 
KeyMap
 Save some typing.

typedef vector<Key> KeyVector

Public Methods

Value& operator[] (const Key &k)
pair<iterator, bool> insert (const pair< Key, Value > &newPair)
size_t erase (const Key &k)
Value Get (const Key &key) const
KeyVector GetWordsAsKeys () const
void Add (const Key &k, const Value &v)
void Set (const Key &k, const Value &v)
KeyPair<Key> FindKeyPair (const Key &k) const
 Find a KeyPair based on a given Key.


Detailed Description

template<class Key, class Value, class KeyList = vector<Key>, class ValueList = vector<Value>> class FIFOMap

A FIFO Map class.

This class is designed to act like a general Map class, except it will keep it's elements in fifo order. This is accomplished by making the key into the KeyPair class. Where the fifo order is kept. The goal of this class is to make its use transparent from the Map class except that its elements are in fifo order. This mostly involves wrapper functions for each Map and map function


Member Function Documentation

template<class Key, class Value, class KeyList = vector<Key>, class ValueList = vector<Value>>
Value FIFOMap<Key, Value, KeyList, ValueList>::Get ( const Key & key ) const
 

All of these work the same as their parent's function only they use a KeyPair instead of just the Key type

template<class Key, class Value, class KeyList = vector<Key>, class ValueList = vector<Value>>
Value & FIFOMap<Key, Value, KeyList, ValueList>::operator[] ( const Key & k )
 

All of these work the same as their parent's function only they use a KeyPair instead of just the Key type


The documentation for this class was generated from the following file:
Generated at Wed May 2 00:24:43 2001 for API by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001