#include <mapc.h>
Inheritance diagram for MapC< Key, Value >:


Public Methods | |
| MapC () | |
| MapC (const MapC< Key, Value > &a) | |
| void | SetBlanc (const Value &t) |
| void | set (Key k, const Value &v) |
| const Value & | get (const Key &k) const |
| void | RemoveKey (const Key &key) |
| void | Empty () |
| const MapC< Key, Value > & | operator= (const MapC< Key, Value > &a) |
| long | size () const |
Protected Methods | |
| long | lookupIndex (const Key &k) const |
Protected Attributes | |
| ArrayC< Key > | m_keys |
| ArrayC< Value > | m_values |
| Value | m_blanc |
| ArrayC< long > | m_freeIndexes |
| ArrayC< short > | m_occupied |
|
|||||||||
|
Definition at line 42 of file mapc.h.
00042 {}
|
|
||||||||||
|
Definition at line 43 of file mapc.h.
00043 {
00044 m_keys = a.m_keys;
00045 m_values = a.m_values;
00046 m_occupied = a.m_occupied;
00047 m_freeIndexes = a.m_freeIndexes;
00048 m_blanc = a.m_blanc;
00049 }
|
|
|||||||||
|
Definition at line 84 of file mapc.h.
|
|
||||||||||
|
Definition at line 71 of file mapc.h.
00071 {
00072 long ix = lookupIndex(k);
00073 if(ix<0){return m_blanc;}
00074 return m_values.get(ix);
00075 }
|
|
||||||||||
|
Definition at line 102 of file mapc.h. Referenced by MapC< FontType, Win32GL3DFont * >::get(), MapC< FontType, Win32GL3DFont * >::RemoveKey(), and MapC< FontType, Win32GL3DFont * >::set().
|
|
||||||||||
|
Definition at line 89 of file mapc.h.
00089 {
00090 m_keys = a.m_keys;
00091 m_values = a.m_values;
00092 m_occupied = a.m_occupied;
00093 m_freeIndexes = a.m_freeIndexes;
00094 m_blanc = a.m_blanc;
00095 return *this;
00096 }
|
|
||||||||||
|
Definition at line 77 of file mapc.h.
00077 {
00078 long ix = lookupIndex(i);
00079 if(ix<0){return;}
00080 m_occupied[ix]=0;
00081 m_freeIndexes.push_back(ix);
00082 }
|
|
||||||||||||||||
|
Definition at line 53 of file mapc.h.
00053 {
00054 long ix = lookupIndex(k);
00055 if(ix<=0){
00056 if(m_freeIndexes.size()==0){
00057 m_values.push_back(v);
00058 m_keys.push_back(k);
00059 m_occupied.push_back(1);
00060 }else{
00061 m_freeIndexes.pop_back(ix);
00062 m_values[ix]=v;
00063 m_keys[ix]=k;
00064 m_occupied[ix]=1;
00065 }
00066 }else{
00067 m_values[ix]=v;
00068 }
00069 }
|
|
||||||||||
|
Definition at line 51 of file mapc.h.
00051 {m_blanc = t;}
|
|
|||||||||
|
Definition at line 98 of file mapc.h.
|
|
|||||
|
Definition at line 115 of file mapc.h. Referenced by MapC< FontType, Win32GL3DFont * >::get(), MapC< FontType, Win32GL3DFont * >::MapC(), MapC< FontType, Win32GL3DFont * >::operator=(), and MapC< FontType, Win32GL3DFont * >::SetBlanc(). |
|
|||||
|
Definition at line 117 of file mapc.h. Referenced by MapC< FontType, Win32GL3DFont * >::MapC(), MapC< FontType, Win32GL3DFont * >::operator=(), MapC< FontType, Win32GL3DFont * >::RemoveKey(), and MapC< FontType, Win32GL3DFont * >::set(). |
|
|||||
|
|||||
|
|||||
|
Definition at line 114 of file mapc.h. Referenced by MapC< FontType, Win32GL3DFont * >::Empty(), MapC< FontType, Win32GL3DFont * >::get(), MapC< FontType, Win32GL3DFont * >::MapC(), MapC< FontType, Win32GL3DFont * >::operator=(), and MapC< FontType, Win32GL3DFont * >::set(). |
1.3-rc2