1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxHashMap class
4 // Author: Mattia Barbon
8 // Copyright: (c) Mattia Barbon
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_HASHMAP_H_
13 #define _WX_HASHMAP_H_
15 #include "wx/string.h"
17 #if (defined(HAVE_EXT_HASH_MAP) || defined(HAVE_HASH_MAP)) \
18 && (defined(HAVE_GNU_CXX_HASH_MAP) || defined(HAVE_STD_HASH_MAP))
19 #define HAVE_STL_HASH_MAP
22 #if wxUSE_STL && defined(HAVE_STL_HASH_MAP)
24 #if defined(HAVE_EXT_HASH_MAP)
25 #include <ext/hash_map>
26 #elif defined(HAVE_HASH_MAP)
30 #if defined(HAVE_GNU_CXX_HASH_MAP)
31 #define WX_HASH_MAP_NAMESPACE __gnu_cxx
32 #elif defined(HAVE_STD_HASH_MAP)
33 #define WX_HASH_MAP_NAMESPACE std
36 #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \
37 typedef WX_HASH_MAP_NAMESPACE::hash_map< KEY_T, VALUE_T, HASH_T, KEY_EQ_T > CLASSNAME
39 #else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
43 typedef int ptrdiff_t;
45 #include <stddef.h> // for ptrdiff_t
49 struct WXDLLIMPEXP_BASE _wxHashTable_NodeBase
51 _wxHashTable_NodeBase() : m_nxt(0) {}
53 _wxHashTable_NodeBase
* m_nxt
;
56 // DECLARE_NO_COPY_CLASS(_wxHashTable_NodeBase)
57 // without rewriting the macros, which require a public copy constructor.
61 class WXDLLIMPEXP_BASE _wxHashTableBase2
64 typedef void (*NodeDtor
)(_wxHashTable_NodeBase
*);
65 typedef unsigned long (*BucketFromNode
)(_wxHashTableBase2
*,_wxHashTable_NodeBase
*);
66 typedef _wxHashTable_NodeBase
* (*ProcessNode
)(_wxHashTable_NodeBase
*);
68 static _wxHashTable_NodeBase
* DummyProcessNode(_wxHashTable_NodeBase
* node
);
69 static void DeleteNodes( size_t buckets
, _wxHashTable_NodeBase
** table
,
71 static _wxHashTable_NodeBase
* GetFirstNode( size_t buckets
,
72 _wxHashTable_NodeBase
** table
)
74 for( size_t i
= 0; i
< buckets
; ++i
)
80 // as static const unsigned prime_count = 31 but works with all compilers
81 enum { prime_count
= 31 };
82 static const unsigned long ms_primes
[prime_count
];
84 // returns the first prime in ms_primes greater than n
85 static unsigned long GetNextPrime( unsigned long n
);
87 // returns the first prime in ms_primes smaller than n
88 // ( or ms_primes[0] if n is very small )
89 static unsigned long GetPreviousPrime( unsigned long n
);
91 static void CopyHashTable( _wxHashTable_NodeBase
** srcTable
,
92 size_t srcBuckets
, _wxHashTableBase2
* dst
,
93 _wxHashTable_NodeBase
** dstTable
,
94 BucketFromNode func
, ProcessNode proc
);
96 static void** AllocTable( size_t sz
)
98 return (void **)calloc(sz
, sizeof(void*));
100 static void FreeTable(void *table
)
106 #define _WX_DECLARE_HASHTABLE( VALUE_T, KEY_T, HASH_T, KEY_EX_T, KEY_EQ_T, CLASSNAME, CLASSEXP, SHOULD_GROW, SHOULD_SHRINK ) \
107 CLASSEXP CLASSNAME : protected _wxHashTableBase2 \
110 typedef KEY_T key_type; \
111 typedef VALUE_T value_type; \
112 typedef HASH_T hasher; \
113 typedef KEY_EQ_T key_equal; \
115 typedef size_t size_type; \
116 typedef ptrdiff_t difference_type; \
117 typedef value_type* pointer; \
118 typedef const value_type* const_pointer; \
119 typedef value_type& reference; \
120 typedef const value_type& const_reference; \
121 /* should these be protected? */ \
122 typedef const KEY_T const_key_type; \
123 typedef const VALUE_T const_mapped_type; \
126 typedef KEY_EX_T key_extractor; \
127 typedef CLASSNAME Self; \
130 size_t m_tableBuckets; \
133 key_equal m_equals; \
134 key_extractor m_getKey; \
136 struct Node:public _wxHashTable_NodeBase \
139 Node( const value_type& value ) \
140 : m_value( value ) {} \
141 Node* m_next() { return (Node*)this->m_nxt; } \
143 value_type m_value; \
147 friend CLASSEXP Iterator; \
149 static void DeleteNode( _wxHashTable_NodeBase* node ) \
151 delete (Node*)node; \
155 /* forward iterator */ \
163 Iterator() : m_node(0), m_ht(0) {} \
164 Iterator( Node* node, const Self* ht ) \
165 : m_node(node), m_ht((Self*)ht) {} \
166 bool operator ==( const Iterator& it ) const \
167 { return m_node == it.m_node; } \
168 bool operator !=( const Iterator& it ) const \
169 { return m_node != it.m_node; } \
171 Node* GetNextNode() \
173 size_type bucket = GetBucketForNode(m_ht,m_node); \
174 for( size_type i = bucket + 1; i < m_ht->m_tableBuckets; ++i ) \
176 if( m_ht->m_table[i] ) \
177 return m_ht->m_table[i]; \
184 Node* next = m_node->m_next(); \
185 m_node = next ? next : GetNextNode(); \
190 CLASSEXP iterator : public Iterator \
193 iterator() : Iterator() {} \
194 iterator( Node* node, Self* ht ) : Iterator( node, ht ) {} \
195 iterator& operator++() { PlusPlus(); return *this; } \
196 iterator operator++(int) { iterator it=*this;PlusPlus();return it; } \
197 reference operator *() const { return m_node->m_value; } \
198 pointer operator ->() const { return &(m_node->m_value); } \
201 CLASSEXP const_iterator : public Iterator \
204 const_iterator() : Iterator() {} \
205 const_iterator( Node* node, const Self* ht ) \
206 : Iterator( node, (Self*)ht ) {} \
207 const_iterator& operator++() { PlusPlus();return *this; } \
208 const_iterator operator++(int) { const_iterator it=*this;PlusPlus();return it; } \
209 const_reference operator *() const { return m_node->m_value; } \
210 const_pointer operator ->() const { return &(m_node->m_value); } \
213 CLASSNAME( size_type sz = 10, const hasher& hfun = hasher(), \
214 const key_equal& k_eq = key_equal(), \
215 const key_extractor& k_ex = key_extractor() ) \
216 : m_tableBuckets( GetNextPrime( (unsigned long) sz ) ), \
222 m_table = (Node**)AllocTable( m_tableBuckets ); \
225 CLASSNAME( const Self& ht ) \
227 m_tableBuckets( 0 ), \
228 m_items( ht.m_items ), \
229 m_hasher( ht.m_hasher ), \
230 m_equals( ht.m_equals ), \
231 m_getKey( ht.m_getKey ) \
236 const Self& operator=( const Self& ht ) \
239 m_hasher = ht.m_hasher; \
240 m_equals = ht.m_equals; \
241 m_getKey = ht.m_getKey; \
242 m_items = ht.m_items; \
251 FreeTable(m_table); \
254 hasher hash_funct() { return m_hasher; } \
255 key_equal key_eq() { return m_equals; } \
257 /* removes all elements from the hash table, but does not */ \
258 /* shrink it ( perhaps it should ) */ \
261 DeleteNodes( m_tableBuckets, (_wxHashTable_NodeBase**)m_table, \
266 size_type size() const { return m_items; } \
267 size_type max_size() const { return size_type(-1); } \
268 bool empty() const { return size() == 0; } \
270 const_iterator end() const { return const_iterator( 0, this ); } \
271 iterator end() { return iterator( 0, this ); } \
272 const_iterator begin() const \
273 { return const_iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; \
275 { return iterator( (Node*)GetFirstNode( m_tableBuckets, (_wxHashTable_NodeBase**)m_table ), this ); }; \
277 size_type erase( const const_key_type& key ) \
279 Node** node = GetNodePtr( key ); \
285 Node* temp = (*node)->m_next(); \
288 if( SHOULD_SHRINK( m_tableBuckets, m_items ) ) \
289 ResizeTable( GetPreviousPrime( (unsigned long) m_tableBuckets ) - 1 ); \
294 static size_type GetBucketForNode( Self* ht, Node* node ) \
296 return ht->m_hasher( ht->m_getKey( node->m_value ) ) \
297 % ht->m_tableBuckets; \
299 static Node* CopyNode( Node* node ) { return new Node( *node ); } \
301 Node* GetOrCreateNode( const value_type& value, bool& created ) \
303 const const_key_type& key = m_getKey( value ); \
304 size_t bucket = m_hasher( key ) % m_tableBuckets; \
305 Node* node = m_table[bucket]; \
309 if( m_equals( m_getKey( node->m_value ), key ) ) \
314 node = node->m_next(); \
317 return CreateNode( value, bucket); \
319 Node * CreateNode( const value_type& value, size_t bucket ) \
321 Node* node = new Node( value ); \
322 node->m_nxt = m_table[bucket]; \
323 m_table[bucket] = node; \
325 /* must be after the node is inserted */ \
327 if( SHOULD_GROW( m_tableBuckets, m_items ) ) \
328 ResizeTable( m_tableBuckets ); \
332 void CreateNode( const value_type& value ) \
334 CreateNode(value, m_hasher( m_getKey(value) ) % m_tableBuckets ); \
337 /* returns NULL if not found */ \
338 Node** GetNodePtr( const const_key_type& key ) const \
340 size_t bucket = m_hasher( key ) % m_tableBuckets; \
341 Node** node = &m_table[bucket]; \
345 if( m_equals( m_getKey( (*node)->m_value ), key ) ) \
347 /* Tell the compiler to not do any strict-aliasing assumptions with a void cast? Can we make such a runtime guarantee? */ \
348 node = (Node**)&(*node)->m_nxt; \
354 /* returns NULL if not found */ \
355 /* expressing it in terms of GetNodePtr is 5-8% slower :-( */ \
356 Node* GetNode( const const_key_type& key ) const \
358 size_t bucket = m_hasher( key ) % m_tableBuckets; \
359 Node* node = m_table[bucket]; \
363 if( m_equals( m_getKey( node->m_value ), key ) ) \
365 node = node->m_next(); \
371 void ResizeTable( size_t newSize ) \
373 newSize = GetNextPrime( (unsigned long)newSize ); \
374 Node** srcTable = m_table; \
375 size_t srcBuckets = m_tableBuckets; \
376 m_table = (Node**)AllocTable( newSize ); \
377 m_tableBuckets = newSize; \
379 CopyHashTable( (_wxHashTable_NodeBase**)srcTable, srcBuckets, \
380 this, (_wxHashTable_NodeBase**)m_table, \
381 (BucketFromNode)GetBucketForNode,\
382 (ProcessNode)&DummyProcessNode ); \
383 FreeTable(srcTable); \
386 /* this must be called _after_ m_table has been cleaned */ \
387 void HashCopy( const Self& ht ) \
389 ResizeTable( ht.size() ); \
390 CopyHashTable( (_wxHashTable_NodeBase**)ht.m_table, ht.m_tableBuckets,\
391 (_wxHashTableBase2*)this, \
392 (_wxHashTable_NodeBase**)m_table, \
393 (BucketFromNode)GetBucketForNode, \
394 (ProcessNode)CopyNode ); \
398 // defines an STL-like pair class CLASSNAME storing two fields: first of type
399 // KEY_T and second of type VALUE_T
400 #define _WX_DECLARE_PAIR( KEY_T, VALUE_T, CLASSNAME, CLASSEXP ) \
405 typedef VALUE_T t2; \
406 typedef const KEY_T const_t1; \
407 typedef const VALUE_T const_t2; \
409 CLASSNAME( const const_t1& f, const const_t2& s ):first(t1(f)),second(t2(s)) {} \
415 // defines the class CLASSNAME returning the key part (of type KEY_T) from a
416 // pair of type PAIR_T
417 #define _WX_DECLARE_HASH_MAP_KEY_EX( KEY_T, PAIR_T, CLASSNAME, CLASSEXP ) \
420 typedef KEY_T key_type; \
421 typedef PAIR_T pair_type; \
422 typedef const key_type const_key_type; \
423 typedef const pair_type const_pair_type; \
424 typedef const_key_type& const_key_reference; \
425 typedef const_pair_type& const_pair_reference; \
428 const_key_reference operator()( const_pair_reference pair ) const { return pair.first; }\
430 /* the dummy assignment operator is needed to suppress compiler */ \
431 /* warnings from hash table class' operator=(): gcc complains about */ \
432 /* "statement with no effect" without it */ \
433 CLASSNAME& operator=(const CLASSNAME&) { return *this; } \
436 // grow/shrink predicates
437 inline bool never_grow( size_t, size_t ) { return false; }
438 inline bool never_shrink( size_t, size_t ) { return false; }
439 inline bool grow_lf70( size_t buckets
, size_t items
)
441 return float(items
)/float(buckets
) >= 0.85;
444 #endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
446 // ----------------------------------------------------------------------------
447 // hashing and comparison functors
448 // ----------------------------------------------------------------------------
450 // NB: implementation detail: all of these classes must have dummy assignment
451 // operators to suppress warnings about "statement with no effect" from gcc
452 // in the hash table class assignment operator (where they're assigned)
454 #if wxUSE_STL && defined(HAVE_STL_HASH_MAP)
457 class WXDLLIMPEXP_BASE wxIntegerHash
459 WX_HASH_MAP_NAMESPACE::hash
<long> longHash
;
460 WX_HASH_MAP_NAMESPACE::hash
<unsigned long> ulongHash
;
461 WX_HASH_MAP_NAMESPACE::hash
<int> intHash
;
462 WX_HASH_MAP_NAMESPACE::hash
<unsigned int> uintHash
;
463 WX_HASH_MAP_NAMESPACE::hash
<short> shortHash
;
464 WX_HASH_MAP_NAMESPACE::hash
<unsigned short> ushortHash
;
466 #if defined wxLongLong_t && !defined wxLongLongIsLong
467 size_t longlongHash( wxLongLong_t x
) const
469 return longHash( wx_truncate_cast(long, x
) ) ^
470 longHash( wx_truncate_cast(long, x
>> (sizeof(long) * 8)) );
476 size_t operator()( long x
) const { return longHash( x
); }
477 size_t operator()( unsigned long x
) const { return ulongHash( x
); }
478 size_t operator()( int x
) const { return intHash( x
); }
479 size_t operator()( unsigned int x
) const { return uintHash( x
); }
480 size_t operator()( short x
) const { return shortHash( x
); }
481 size_t operator()( unsigned short x
) const { return ushortHash( x
); }
482 #if defined wxLongLong_t && !defined wxLongLongIsLong
483 size_t operator()( wxLongLong_t x
) const { return longlongHash(x
); }
484 size_t operator()( wxULongLong_t x
) const { return longlongHash(x
); }
487 wxIntegerHash
& operator=(const wxIntegerHash
&) { return *this; }
490 #else // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
493 class WXDLLIMPEXP_BASE wxIntegerHash
497 unsigned long operator()( long x
) const { return (unsigned long)x
; }
498 unsigned long operator()( unsigned long x
) const { return x
; }
499 unsigned long operator()( int x
) const { return (unsigned long)x
; }
500 unsigned long operator()( unsigned int x
) const { return x
; }
501 unsigned long operator()( short x
) const { return (unsigned long)x
; }
502 unsigned long operator()( unsigned short x
) const { return x
; }
503 #if defined wxLongLong_t && !defined wxLongLongIsLong
504 wxULongLong_t
operator()( wxLongLong_t x
) const { return wx_static_cast(wxULongLong_t
, x
); }
505 wxULongLong_t
operator()( wxULongLong_t x
) const { return x
; }
508 wxIntegerHash
& operator=(const wxIntegerHash
&) { return *this; }
511 #endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
513 class WXDLLIMPEXP_BASE wxIntegerEqual
517 bool operator()( long a
, long b
) const { return a
== b
; }
518 bool operator()( unsigned long a
, unsigned long b
) const { return a
== b
; }
519 bool operator()( int a
, int b
) const { return a
== b
; }
520 bool operator()( unsigned int a
, unsigned int b
) const { return a
== b
; }
521 bool operator()( short a
, short b
) const { return a
== b
; }
522 bool operator()( unsigned short a
, unsigned short b
) const { return a
== b
; }
523 #if defined wxLongLong_t && !defined wxLongLongIsLong
524 bool operator()( wxLongLong_t a
, wxLongLong_t b
) const { return a
== b
; }
525 bool operator()( wxULongLong_t a
, wxULongLong_t b
) const { return a
== b
; }
528 wxIntegerEqual
& operator=(const wxIntegerEqual
&) { return *this; }
532 class WXDLLIMPEXP_BASE wxPointerHash
537 #if wxUSE_STL && defined(HAVE_STL_HASH_MAP)
538 size_t operator()( const void* k
) const { return (size_t)k
; }
540 wxUIntPtr
operator()( const void* k
) const { return wxPtrToUInt(k
); }
543 wxPointerHash
& operator=(const wxPointerHash
&) { return *this; }
546 class WXDLLIMPEXP_BASE wxPointerEqual
550 bool operator()( const void* a
, const void* b
) const { return a
== b
; }
552 wxPointerEqual
& operator=(const wxPointerEqual
&) { return *this; }
555 // wxString, char*, wxChar*
556 class WXDLLIMPEXP_BASE wxStringHash
560 unsigned long operator()( const wxString
& x
) const
561 { return wxCharStringHash( x
.c_str() ); }
562 unsigned long operator()( const wxChar
* x
) const
563 { return wxCharStringHash( x
); }
564 static unsigned long wxCharStringHash( const wxChar
* );
566 unsigned long operator()( const char* x
) const
567 { return charStringHash( x
); }
568 static unsigned long charStringHash( const char* );
569 #endif // wxUSE_UNICODE
571 wxStringHash
& operator=(const wxStringHash
&) { return *this; }
574 class WXDLLIMPEXP_BASE wxStringEqual
578 bool operator()( const wxString
& a
, const wxString
& b
) const
580 bool operator()( const wxChar
* a
, const wxChar
* b
) const
581 { return wxStrcmp( a
, b
) == 0; }
583 bool operator()( const char* a
, const char* b
) const
584 { return strcmp( a
, b
) == 0; }
585 #endif // wxUSE_UNICODE
587 wxStringEqual
& operator=(const wxStringEqual
&) { return *this; }
590 #if !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
592 #define _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, CLASSEXP ) \
593 _WX_DECLARE_PAIR( KEY_T, VALUE_T, CLASSNAME##_wxImplementation_Pair, CLASSEXP ) \
594 _WX_DECLARE_HASH_MAP_KEY_EX( KEY_T, CLASSNAME##_wxImplementation_Pair, CLASSNAME##_wxImplementation_KeyEx, CLASSEXP ) \
595 _WX_DECLARE_HASHTABLE( CLASSNAME##_wxImplementation_Pair, KEY_T, HASH_T, CLASSNAME##_wxImplementation_KeyEx, KEY_EQ_T, CLASSNAME##_wxImplementation_HashTable, CLASSEXP, grow_lf70, never_shrink ) \
596 CLASSEXP CLASSNAME:public CLASSNAME##_wxImplementation_HashTable \
599 typedef VALUE_T mapped_type; \
600 _WX_DECLARE_PAIR( iterator, bool, Insert_Result, CLASSEXP ) \
602 wxEXPLICIT CLASSNAME( size_type hint = 100, hasher hf = hasher(), \
603 key_equal eq = key_equal() ) \
604 : CLASSNAME##_wxImplementation_HashTable( hint, hf, eq, \
605 CLASSNAME##_wxImplementation_KeyEx() ) {} \
607 mapped_type& operator[]( const const_key_type& key ) \
610 return GetOrCreateNode( \
611 CLASSNAME##_wxImplementation_Pair( key, mapped_type() ), \
612 created)->m_value.second; \
615 const_iterator find( const const_key_type& key ) const \
617 return const_iterator( GetNode( key ), this ); \
620 iterator find( const const_key_type& key ) \
622 return iterator( GetNode( key ), this ); \
625 Insert_Result insert( const value_type& v ) \
628 Node *node = GetOrCreateNode( \
629 CLASSNAME##_wxImplementation_Pair( v.first, v.second ), \
632 node->m_value.second = v.second; \
633 return Insert_Result(iterator(node, this), created); \
636 size_type erase( const key_type& k ) \
637 { return CLASSNAME##_wxImplementation_HashTable::erase( k ); } \
638 void erase( const iterator& it ) { erase( it->first ); } \
639 void erase( const const_iterator& it ) { erase( it->first ); } \
641 /* count() == 0 | 1 */ \
642 size_type count( const const_key_type& key ) \
643 { return GetNode( key ) ? 1 : 0; } \
646 #endif // !wxUSE_STL || !defined(HAVE_STL_HASH_MAP)
648 // these macros are to be used in the user code
649 #define WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \
650 _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, class )
652 #define WX_DECLARE_STRING_HASH_MAP( VALUE_T, CLASSNAME ) \
653 _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \
656 #define WX_DECLARE_VOIDPTR_HASH_MAP( VALUE_T, CLASSNAME ) \
657 _WX_DECLARE_HASH_MAP( void*, VALUE_T, wxPointerHash, wxPointerEqual, \
660 // and these do exactly the same thing but should be used inside the
662 #define WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL) \
663 _WX_DECLARE_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME, DECL )
665 #define WX_DECLARE_EXPORTED_HASH_MAP( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, CLASSNAME) \
666 WX_DECLARE_HASH_MAP_WITH_DECL( KEY_T, VALUE_T, HASH_T, KEY_EQ_T, \
667 CLASSNAME, class WXDLLEXPORT )
669 #define WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \
670 _WX_DECLARE_HASH_MAP( wxString, VALUE_T, wxStringHash, wxStringEqual, \
673 #define WX_DECLARE_EXPORTED_STRING_HASH_MAP( VALUE_T, CLASSNAME ) \
674 WX_DECLARE_STRING_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \
677 #define WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, DECL ) \
678 _WX_DECLARE_HASH_MAP( void*, VALUE_T, wxPointerHash, wxPointerEqual, \
681 #define WX_DECLARE_EXPORTED_VOIDPTR_HASH_MAP( VALUE_T, CLASSNAME ) \
682 WX_DECLARE_VOIDPTR_HASH_MAP_WITH_DECL( VALUE_T, CLASSNAME, \
685 // delete all hash elements
687 // NB: the class declaration of the hash elements must be visible from the
688 // place where you use this macro, otherwise the proper destructor may not
689 // be called (a decent compiler should give a warning about it, but don't
691 #define WX_CLEAR_HASH_MAP(type, hashmap) \
693 type::iterator it, en; \
694 for( it = (hashmap).begin(), en = (hashmap).end(); it != en; ++it ) \
699 //---------------------------------------------------------------------------
700 // Declarations of common hashmap classes
702 WX_DECLARE_HASH_MAP_WITH_DECL( long, long, wxIntegerHash
, wxIntegerEqual
,
703 wxLongToLongHashMap
, class WXDLLIMPEXP_BASE
);
706 #endif // _WX_HASHMAP_H_