Main Page   Modules   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

MapLikeContainer Class Template Reference

A simple, quick replacement for std::map. More...

#include <MapLikeContainer.h>

Collaboration diagram for MapLikeContainer:

Collaboration graph
[legend]
List of all members.

Public Types

typedef value_typeiterator
typedef const value_typeconst_iterator
enum  { MAP_EMPTY = -1 }

Public Methods

 MapLikeContainer ()
void clear ()
void erase (int position)
iterator begin ()
const_iterator begin () const
iterator upper_bound (int position)
iterator end ()
const_iterator end () const
T& operator[] (int position)
unsigned size () const
iterator find (int position)

Detailed Description

template<typename T, int max_size> template class MapLikeContainer

A simple, quick replacement for std::map.

Designed for easy viewing of data during debugging. Implemented using an array. It would be nice to convert this to a hash - however hashes are hard to iterate over.

This shouldn't be used in the final release - use a hash map instead

The iterator needs to be fixed up so that it skips elements that are not used.


The documentation for this class was generated from the following file:
Generated at Mon Nov 27 01:47:00 2000 for LibPenguinPlay by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000