CMS 3D CMS Logo

List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes
cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc > Class Template Reference

#include <OtherHashMaps.h>

Classes

class  item_iterator
 
struct  KeyItem
 
struct  ValueItem
 

Public Types

typedef Hasher hasher
 
typedef SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc > map_type
 
typedef item_iterator< ValueItemvalue_iterator
 
typedef boost::mpl::if_< typename boost::is_pointer< V >, V, V const & >::type value_ref
 

Public Member Functions

void clear (size_t newBucketSize=0)
 
void dump ()
 
bool empty () const
 
void freeRows ()
 
void insert (K const &key, value_ref value)
 
 SimpleAllocHashMultiMap (size_t buckets, size_t keyRowSize, size_t valueRowSize, size_t maxRows=50)
 
value_iterator values (K const &key)
 
 ~SimpleAllocHashMultiMap ()
 

Private Types

typedef Alloc::template rebind< KeyItem >::other KeyItemAllocator
 
typedef Alloc::template rebind< KeyItem * >::other KeyItemPtrAllocator
 
typedef Alloc::template rebind< ValueItem >::other ValueItemAllocator
 

Private Member Functions

 BOOST_MPL_ASSERT ((boost::mpl::and_< boost::has_trivial_destructor< K >, boost::has_trivial_destructor< V > >))
 
KeyItemfind_or_insert_ (K const &key)
 
KeyItempush_back_ (K const &key, KeyItem *next)
 
ValueItempush_back_ (value_ref value, ValueItem *next)
 

Private Attributes

size_t bucketCapacity_
 
KeyItem ** buckets_
 
size_t bucketSize_
 
std::list< KeyItem * >::iterator currentKeyRow_
 
std::list< ValueItem * >::iterator currentValueRow_
 
Equals eq_
 
Hasher hasher_
 
KeyItemAllocator keyAlloc_
 
KeyItemkeyEndMarker_
 
std::list< KeyItem * > keyRows_
 
size_t keyRowSize_
 
size_t maxRows_
 
KeyItemnextKeyItem_
 
ValueItemnextValueItem_
 
KeyItemPtrAllocator ptrAlloc_
 
ValueItemAllocator valueAlloc_
 
ValueItemvalueEndMarker_
 
std::list< ValueItem * > valueRows_
 
size_t valueRowSize_
 

Detailed Description

template<typename K, typename V, typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
class cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >

Definition at line 35 of file OtherHashMaps.h.

Member Typedef Documentation

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef Hasher cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::hasher

Definition at line 40 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef Alloc::template rebind<KeyItem>::other cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItemAllocator
private

Definition at line 122 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef Alloc::template rebind<KeyItem *>::other cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItemPtrAllocator
private

Definition at line 123 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef SimpleAllocHashMultiMap<K, V, Hasher, Equals, Alloc> cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::map_type

Definition at line 41 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef item_iterator<ValueItem> cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::value_iterator

Definition at line 117 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef boost::mpl::if_<typename boost::is_pointer<V>, V, V const &>::type cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::value_ref

Definition at line 43 of file OtherHashMaps.h.

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
typedef Alloc::template rebind<ValueItem>::other cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ValueItemAllocator
private

Definition at line 124 of file OtherHashMaps.h.

Constructor & Destructor Documentation

template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::SimpleAllocHashMultiMap ( size_t  buckets,
size_t  keyRowSize,
size_t  valueRowSize,
size_t  maxRows = 50 
)

Definition at line 207 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketCapacity_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::buckets_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::clear(), cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ptrAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

211  : bucketSize_(buckets),
213  keyRowSize_(keyRowSize),
214  valueRowSize_(valueRowSize),
215  maxRows_(maxRows) {
216  buckets_ = ptrAlloc_.allocate(bucketCapacity_);
217  keyRows_.push_back(keyAlloc_.allocate(keyRowSize_));
218  valueRows_.push_back(valueAlloc_.allocate(valueRowSize_));
219  clear();
220  }
std::list< ValueItem * > valueRows_
void clear(size_t newBucketSize=0)
Definition: OtherHashMaps.h:49
std::list< KeyItem * > keyRows_
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::~SimpleAllocHashMultiMap ( )

Definition at line 222 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketCapacity_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::buckets_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, dqmdumpme::last, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ptrAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

222  {
223  for (typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end(); it != last; ++it) {
224  keyAlloc_.deallocate(*it, keyRowSize_);
225  }
226  for (typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end(); it != last; ++it) {
227  valueAlloc_.deallocate(*it, valueRowSize_);
228  }
229  ptrAlloc_.deallocate(buckets_, bucketCapacity_);
230  }
std::list< ValueItem * > valueRows_
std::list< KeyItem * > keyRows_

Member Function Documentation

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::BOOST_MPL_ASSERT ( (boost::mpl::and_< boost::has_trivial_destructor< K >, boost::has_trivial_destructor< V > >)  )
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
void cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::clear ( size_t  newBucketSize = 0)
inline

Definition at line 49 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketCapacity_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::buckets_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketSize_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentKeyRow_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentValueRow_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::freeRows(), cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyEndMarker_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::maxRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextKeyItem_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextValueItem_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ptrAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueEndMarker_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

Referenced by cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::SimpleAllocHashMultiMap().

49  {
50  if (newBucketSize != 0) {
51  if (newBucketSize > bucketCapacity_) {
52  ptrAlloc_.deallocate(buckets_, bucketCapacity_);
53  bucketCapacity_ = newBucketSize;
55  }
56  bucketSize_ = newBucketSize;
57  }
58  memset(buckets_, 0, bucketSize_ * sizeof(KeyItem *));
59  currentKeyRow_ = keyRows_.begin();
60  nextKeyItem_ = keyRows_.front();
62  currentValueRow_ = valueRows_.begin();
63  nextValueItem_ = valueRows_.front();
65  if ((keyRows_.size() > maxRows_) || (valueRows_.size() > maxRows_))
66  freeRows();
67  }
std::list< ValueItem * > valueRows_
std::list< ValueItem * >::iterator currentValueRow_
std::list< KeyItem * > keyRows_
std::list< KeyItem * >::iterator currentKeyRow_
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
void cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::dump ( void  )
inline

Definition at line 154 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketSize_, gather_cfg::cout, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentKeyRow_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentValueRow_, HLT_2018_cff::distance, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, dqmdumpme::last, AlCaHLTBitMon_ParallelJobs::p, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

154  {
155  std::cout << "Dumping HASH MULTIMAP" << std::endl;
156  std::cout << " Key items: "
158  << std::endl;
159  std::cout << " Value items: "
162  << std::endl;
163  size_t row = 0;
164  std::cout << " Buckets (size " << bucketSize_ << ", capacity " << bucketCapacity_ << ")";
165  for (KeyItem **p = buckets_; p != buckets_ + bucketSize_; ++p, ++row) {
166  std::cout << " [" << row << "] " << *p << std::endl;
167  }
168  row = 0;
169  std::cout << " Key Items " << std::endl;
170  for (typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end(); it != last;
171  ++it, ++row) {
172  KeyItem *lastI = *it + keyRowSize_;
173  std::cout << " Key Row " << row << " (of size " << keyRowSize_ << ")" << std::endl;
174  for (KeyItem *p = *it; p != lastI; ++p) {
175  std::cout << " @ " << p << " [" << p->key << ", @" << p->value << "], next = " << p->next << std::endl;
176  if ((it == currentKeyRow_) && (p == nextKeyItem_ - 1)) {
177  std::cout << " ^^^ this was the last valid item." << std::endl;
178  last = 0;
179  break;
180  }
181  }
182  if (lastI == 0)
183  break;
184  }
185  row = 0;
186  std::cout << " Value Items " << std::endl;
187  for (typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end(); it != last;
188  ++it, ++row) {
189  ValueItem *lastI = *it + valueRowSize_;
190  std::cout << " Value Row " << row << " (of size " << valueRowSize_ << ")" << std::endl;
191  for (ValueItem *p = *it; p != lastI; ++p) {
192  std::cout << " @ " << p << " [" << p->value << "], next = " << p->next << std::endl;
193  if ((it == currentValueRow_) && (p == nextValueItem_ - 1)) {
194  std::cout << " ^^^ this was the last valid item." << std::endl;
195  last = 0;
196  break;
197  }
198  }
199  if (lastI == 0)
200  break;
201  }
202  std::cout << " End of dump" << std::endl;
203  }
std::list< ValueItem * > valueRows_
std::list< ValueItem * >::iterator currentValueRow_
std::list< KeyItem * > keyRows_
std::list< KeyItem * >::iterator currentKeyRow_
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
bool cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::empty ( void  ) const
inline
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem & cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::find_or_insert_ ( K const &  key)
private

Definition at line 289 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::buckets_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketSize_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::eq_, cond::hash, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::hasher_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem::key, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem::next, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::push_back_().

Referenced by cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::insert().

289  {
290  //std::cout << "Find or insert for key " << key << std::endl;
291  size_t hash = hasher_(key);
292  KeyItem *&buck = buckets_[hash % bucketSize_];
293  KeyItem *curr = buck;
294  while (curr) {
295  if (eq_(curr->key, key)) {
296  //std::cout << " Key " << key << " was found." << std::endl;
297  return *curr;
298  }
299  curr = curr->next;
300  }
301  buck = push_back_(key, buck);
302  return *buck;
303  }
KeyItem * push_back_(K const &key, KeyItem *next)
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
void cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::freeRows ( )

Definition at line 233 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, dqmdumpme::last, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::maxRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

Referenced by cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::clear().

233  {
234  if (keyRows_.size() > maxRows_) {
235  //std::cerr << "Freeing key rows, current size is " << keyRows_.size() << std::endl;
236  typename std::list<KeyItem *>::iterator it = keyRows_.begin(), last = keyRows_.end();
237  for (std::advance(it, maxRows_); it != last; ++it) {
238  keyAlloc_.deallocate(*it, keyRowSize_);
239  }
240  keyRows_.resize(maxRows_);
241  }
242  if (valueRows_.size() > maxRows_) {
243  //std::cerr << "Freeing value rows, current size is " << valueRows_.size() << std::endl;
244  typename std::list<ValueItem *>::iterator it = valueRows_.begin(), last = valueRows_.end();
245  for (std::advance(it, maxRows_); it != last; ++it) {
246  valueAlloc_.deallocate(*it, valueRowSize_);
247  }
248  valueRows_.resize(maxRows_);
249  }
250  }
std::list< ValueItem * > valueRows_
std::list< KeyItem * > keyRows_
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
void cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::insert ( K const &  key,
value_ref  value 
)

Definition at line 306 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::find_or_insert_(), dqmdumpme::k, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::push_back_(), and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem::value.

Referenced by cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::empty().

306  {
307  //std::cout << "Pushing back value " << value << " for key " << key << std::endl;
308  KeyItem &k = find_or_insert_(key);
309  //std::cout << "Key " << (k.value ? "exists" : " is new") << std::endl;
310  k.value = push_back_(value, k.value);
311  }
KeyItem & find_or_insert_(K const &key)
KeyItem * push_back_(K const &key, KeyItem *next)
Definition: value.py:1
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::KeyItem * cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::push_back_ ( K const &  key,
KeyItem next 
)
private

Definition at line 254 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentKeyRow_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyEndMarker_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextKeyItem_.

Referenced by cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::find_or_insert_(), and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::insert().

254  {
255  if (nextKeyItem_ == keyEndMarker_) {
256  ++currentKeyRow_;
257  if (currentKeyRow_ == keyRows_.end()) {
258  keyRows_.push_back(keyAlloc_.allocate(keyRowSize_));
259  currentKeyRow_ = keyRows_.end();
260  --currentKeyRow_; // end - 1 doesn't work!
261  }
264  }
265  keyAlloc_.construct(nextKeyItem_, KeyItem(next, key, nullptr));
266  nextKeyItem_++;
267  return (nextKeyItem_ - 1);
268  }
std::list< KeyItem * > keyRows_
std::list< KeyItem * >::iterator currentKeyRow_
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ValueItem * cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::push_back_ ( value_ref  value,
ValueItem next 
)
private

Definition at line 271 of file OtherHashMaps.h.

References cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentValueRow_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextValueItem_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueAlloc_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueEndMarker_, cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_, and cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_.

271  {
274  if (currentValueRow_ == valueRows_.end()) {
275  valueRows_.push_back(valueAlloc_.allocate(valueRowSize_));
277  --currentValueRow_; // end - 1 doesn't work!
278  }
281  }
282  valueAlloc_.construct(nextValueItem_, ValueItem(next, value));
283  nextValueItem_++;
284  return (nextValueItem_ - 1);
285  }
std::list< ValueItem * > valueRows_
std::list< ValueItem * >::iterator currentValueRow_
Definition: value.py:1
template<typename K , typename V , typename Hasher , typename Equals , typename Alloc >
SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::value_iterator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::values ( K const &  key)

Member Data Documentation

template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
size_t cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketCapacity_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
KeyItem** cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::buckets_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
size_t cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::bucketSize_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
std::list<KeyItem *>::iterator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentKeyRow_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
std::list<ValueItem *>::iterator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::currentValueRow_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
Equals cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::eq_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
Hasher cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::hasher_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
KeyItemAllocator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyAlloc_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
KeyItem * cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyEndMarker_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
std::list<KeyItem *> cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRows_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
size_t cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::keyRowSize_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
size_t cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::maxRows_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
KeyItem* cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextKeyItem_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
ValueItem* cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::nextValueItem_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
KeyItemPtrAllocator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::ptrAlloc_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
ValueItemAllocator cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueAlloc_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
ValueItem * cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueEndMarker_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
std::list<ValueItem *> cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRows_
private
template<typename K , typename V , typename Hasher = boost::hash<K>, typename Equals = std::equal_to<K>, typename Alloc = std::allocator<V>>
size_t cmsutil::SimpleAllocHashMultiMap< K, V, Hasher, Equals, Alloc >::valueRowSize_
private