- class dummy;
-
- struct compatibility_iterator
- {
- hash::iterator m_iter;
- hash* m_hash;
-
- operator bool() const { return m_iter != m_hash->end(); }
- bool operator !() const { return m_iter == m_hash->end(); }
- compatibility_iterator( hash* li, hash::iterator it )
- : m_iter( it ), m_hash( li ) {}
- compatibility_iterator() { }
-
- dummy* operator->() { return (dummy*)this; }
- };
- typedef class compatibility_iterator citer;
-
- class dummy
- {
- typedef hash::iterator it;
- typedef compatibility_iterator citer;
- public:
- wxObject* GetData() const
- {
- citer* i = (citer*)this;
- return (wxObject*)i->m_iter->second;
- }
- citer GetNext() const
- {
- citer* i = (citer*)this;
- it lit = i->m_iter;
- return citer( i->m_hash, ++lit );
- }
- citer GetPrevious() const
- {
- citer* i = (citer*)this;
- it lit = i->m_iter;
- return citer( i->m_hash, ++lit );
- }
- void SetData( wxObject* e )
- {
- citer* i = (citer*)this;
- i->m_iter->second = e;
- }
- private:
- dummy();
- };
+ wxHashTable_Node( long key, void* value,
+ wxHashTableBase* table )
+ : wxHashTableBase_Node( key, value, table ) { }
+ wxHashTable_Node( const wxChar* key, void* value,
+ wxHashTableBase* table )
+ : wxHashTableBase_Node( key, value, table ) { }
+
+ wxObject* GetData() const
+ { return (wxObject*)wxHashTableBase_Node::GetData(); }
+ void SetData( wxObject* data )
+ { wxHashTableBase_Node::SetData( data ); }
+
+ wxHashTable_Node* GetNext() const
+ { return (wxHashTable_Node*)wxHashTableBase_Node::GetNext(); }
+};
+
+// should inherit protectedly, but it is public for compatibility in
+// order to publicly inherit from wxObject
+class WXDLLIMPEXP_BASE wxHashTable : public wxHashTableBase
+{
+ typedef wxHashTableBase hash;
+public:
+ typedef wxHashTable_Node Node;
+ typedef wxHashTable_Node* compatibility_iterator;