3 #include "g_cont_ref.h"
4 #include "g_cont_gmap_common.h"
17 static bool search_Value (
const Value_t& aValue , IT& aIterator )
19 for ( ; aIterator.isIn ( ) ; aIterator++ )
21 if ( aIterator->value ( ) == aValue )
30 static bool search_Key (
const Key_t& aKey , IT& aIterator , KeyComparer_t )
32 for ( ; aIterator.isIn ( ) ; aIterator++ )
34 if ( aIterator->key ( ) == aKey )
44 template <
class KEY ,
class T ,
class REF_C = const T&>
class gmap :
public gmap_common <KEY,T,gmap_searcher,REF_C>
49 typedef typename PairLst_t::It_t It_t;
50 typedef typename PairLst_t::ItConst_t ItConst_t;
53 typedef REF_C ConstRef_t;
58 int aListPageRightBits = G_LST_PAGE_MASK_BITS ,
59 int aVectorAllocDeltaRightBits = G_VECT_AL_DELTA_MASK_BITS ) :
60 Base_t(aAllocPolicyP,aListPageRightBits,aVectorAllocDeltaRightBits) {}
64 virtual bool doAdd (
const Key_t& ,
const Value_t& );
67 template <
class KEY ,
class T ,
class REF=ref<T> ,
class REF_C = ref_const<T> >
class ref_gmap :
public gmap <KEY,REF,REF_C>
72 typedef typename PairLst_t::It_t It_t;
73 typedef typename PairLst_t::ItConst_t ItConst_t;
77 typedef REF_C ConstRef_t;
82 int aListPageRightBits = G_LST_PAGE_MASK_BITS ,
83 int aVectorAllocDeltaRightBits = G_VECT_AL_DELTA_MASK_BITS ) :
84 Base_t(aAllocPolicyP,aListPageRightBits,aVectorAllocDeltaRightBits) {}
88 template <
class KEY ,
class T ,
class REF_C >
bool gmap<KEY,T,REF_C>::doAdd (
const Key_t& aKey,
const Value_t& aValue)
90 It_t
it = PairLst_t::getIterator ( );
94 it->value ( ) = aValue;
99 this->pushTail ( Pair_t(aKey,aValue) );
Definition: g_cont_gmap_common.h:13
Definition: g_cont_gmap.h:11
Definition: g_cont_gmap.h:44
Definition: g_cont_AllocationPolicyAbstract.h:16
Definition: g_cont_lst.h:10
Definition: g.mthread.ThreadSimpleEvent.h:5
Definition: g_cont_gmap.h:67
Definition: g_cont_gmap_common.h:42
Definition: g_cont_it.h:10
Definition: g_cont_gmap_common.h:21