Bullet Collision Detection & Physics Library
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
btHashMap< Key, Value > Class Template Reference

The btHashMap template class implements a generic and lightweight hashmap. More...

#include <btHashMap.h>

Inheritance diagram for btHashMap< Key, Value >:
Inheritance graph
[legend]
Collaboration diagram for btHashMap< Key, Value >:
Collaboration graph
[legend]

Public Member Functions

void insert (const Key &key, const Value &value)
 
void remove (const Key &key)
 
int size () const
 
const Value * getAtIndex (int index) const
 
Value * getAtIndex (int index)
 
Key getKeyAtIndex (int index)
 
const Key getKeyAtIndex (int index) const
 
Value * operator[] (const Key &key)
 
const Value * operator[] (const Key &key) const
 
const Value * find (const Key &key) const
 
Value * find (const Key &key)
 
int findIndex (const Key &key) const
 
void clear ()
 

Protected Member Functions

void growTables (const Key &)
 

Protected Attributes

btAlignedObjectArray< int > m_hashTable
 
btAlignedObjectArray< int > m_next
 
btAlignedObjectArray< Value > m_valueArray
 
btAlignedObjectArray< Key > m_keyArray
 

Detailed Description

template<class Key, class Value>
class btHashMap< Key, Value >

The btHashMap template class implements a generic and lightweight hashmap.

A basic sample of how to use btHashMap is located in Demos\BasicDemo\main.cpp

Definition at line 219 of file btHashMap.h.

Member Function Documentation

◆ clear()

template<class Key , class Value >
void btHashMap< Key, Value >::clear ( )
inline

Definition at line 461 of file btHashMap.h.

◆ find() [1/2]

template<class Key , class Value >
Value * btHashMap< Key, Value >::find ( const Key &  key)
inline

Definition at line 434 of file btHashMap.h.

◆ find() [2/2]

template<class Key , class Value >
const Value * btHashMap< Key, Value >::find ( const Key &  key) const
inline

Definition at line 424 of file btHashMap.h.

◆ findIndex()

template<class Key , class Value >
int btHashMap< Key, Value >::findIndex ( const Key &  key) const
inline

Definition at line 444 of file btHashMap.h.

◆ getAtIndex() [1/2]

template<class Key , class Value >
Value * btHashMap< Key, Value >::getAtIndex ( int  index)
inline

Definition at line 389 of file btHashMap.h.

◆ getAtIndex() [2/2]

template<class Key , class Value >
const Value * btHashMap< Key, Value >::getAtIndex ( int  index) const
inline

Definition at line 378 of file btHashMap.h.

◆ getKeyAtIndex() [1/2]

template<class Key , class Value >
Key btHashMap< Key, Value >::getKeyAtIndex ( int  index)
inline

Definition at line 400 of file btHashMap.h.

◆ getKeyAtIndex() [2/2]

template<class Key , class Value >
const Key btHashMap< Key, Value >::getKeyAtIndex ( int  index) const
inline

Definition at line 407 of file btHashMap.h.

◆ growTables()

template<class Key , class Value >
void btHashMap< Key, Value >::growTables ( const Key &  )
inlineprotected

Definition at line 228 of file btHashMap.h.

◆ insert()

template<class Key , class Value >
void btHashMap< Key, Value >::insert ( const Key &  key,
const Value &  value 
)
inline

Definition at line 264 of file btHashMap.h.

◆ operator[]() [1/2]

template<class Key , class Value >
Value * btHashMap< Key, Value >::operator[] ( const Key &  key)
inline

Definition at line 414 of file btHashMap.h.

◆ operator[]() [2/2]

template<class Key , class Value >
const Value * btHashMap< Key, Value >::operator[] ( const Key &  key) const
inline

Definition at line 419 of file btHashMap.h.

◆ remove()

template<class Key , class Value >
void btHashMap< Key, Value >::remove ( const Key &  key)
inline

Definition at line 292 of file btHashMap.h.

◆ size()

template<class Key , class Value >
int btHashMap< Key, Value >::size ( ) const
inline

Definition at line 373 of file btHashMap.h.

Member Data Documentation

◆ m_hashTable

template<class Key , class Value >
btAlignedObjectArray<int> btHashMap< Key, Value >::m_hashTable
protected

Definition at line 222 of file btHashMap.h.

◆ m_keyArray

template<class Key , class Value >
btAlignedObjectArray<Key> btHashMap< Key, Value >::m_keyArray
protected

Definition at line 226 of file btHashMap.h.

◆ m_next

template<class Key , class Value >
btAlignedObjectArray<int> btHashMap< Key, Value >::m_next
protected

Definition at line 223 of file btHashMap.h.

◆ m_valueArray

template<class Key , class Value >
btAlignedObjectArray<Value> btHashMap< Key, Value >::m_valueArray
protected

Definition at line 225 of file btHashMap.h.


The documentation for this class was generated from the following file: