![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
#include <FXHash.h>
Public Member Functions | |
FXHash () | |
void | size (FXuint m) |
FXuint | size () const |
FXuint | no () const |
void * | insert (void *name, void *data) |
void * | replace (void *name, void *data) |
void * | remove (void *name) |
void * | find (void *name) const |
FXbool | empty (FXuint pos) const |
void * | key (FXuint pos) const |
void * | value (FXuint pos) const |
void | clear () |
virtual | ~FXHash () |
FX::FXHash::FXHash | ( | ) |
Construct empty hash table.
virtual FX::FXHash::~FXHash | ( | ) | [virtual] |
Destructor.
void FX::FXHash::size | ( | FXuint | m | ) |
Resize the table to the given size; the size must be a power of two.
FXuint FX::FXHash::size | ( | ) | const [inline] |
Return the total number of slots in the table.
FXuint FX::FXHash::no | ( | ) | const [inline] |
Return number of non-empty slots in the table.
void* FX::FXHash::insert | ( | void * | name, | |
void * | data | |||
) |
Insert key into table, unless the key already exists.
Returns the current value of the key.
void* FX::FXHash::replace | ( | void * | name, | |
void * | data | |||
) |
Replace key in table, overwriting the old value if the given key already exists.
Returns the old value of the key.
void* FX::FXHash::remove | ( | void * | name | ) |
Remove key from the table.
Returns the old value of the key.
void* FX::FXHash::find | ( | void * | name | ) | const |
Return value of key, or return NULL.
Return true if slot is not occupied by a key.
void* FX::FXHash::key | ( | FXuint | pos | ) | const [inline] |
Return key at position pos.
void* FX::FXHash::value | ( | FXuint | pos | ) | const [inline] |
void FX::FXHash::clear | ( | ) |
Clear hash table.
![]() |