![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
|
#include <FXDict.h>

Public Member Functions | |
| FXDict () | |
| FXDict (const FXDict &orig) | |
| FXDict & | operator= (const FXDict &orig) |
| void | size (FXint m) |
| FXint | size () const |
| FXint | no () const |
| void * | insert (const FXchar *ky, const void *ptr, bool mrk=false) |
| void * | replace (const FXchar *ky, const void *ptr, bool mrk=false) |
| void * | remove (const FXchar *ky) |
| void * | find (const FXchar *ky) const |
| bool | empty (FXint pos) const |
| const FXchar * | key (FXuint pos) const |
| void * | data (FXuint pos) const |
| bool | mark (FXuint pos) const |
| FXint | first () const |
| FXint | last () const |
| FXint | next (FXint pos) const |
| FXint | prev (FXint pos) const |
| void | clear () |
| virtual | ~FXDict () |
It is typically used to map strings to pointers; however, overloading the createData() and deleteData() members allows any type of data to be indexed by strings.
| FX::FXDict::FXDict | ( | ) |
Construct an empty dictionary.
| FX::FXDict::FXDict | ( | const FXDict & | orig | ) |
Copy constructor; does bit-copy of void pointer data.
| virtual FX::FXDict::~FXDict | ( | ) | [virtual] |
Destructor.
| void FX::FXDict::size | ( | FXint | m | ) |
Resize the table to the given size.
| FXint FX::FXDict::size | ( | ) | const [inline] |
Return the size of the table, including the empty slots.
| FXint FX::FXDict::no | ( | ) | const [inline] |
Return the total number of entries in the table.
| void* FX::FXDict::insert | ( | const FXchar * | ky, | |
| const void * | ptr, | |||
| bool | mrk = false | |||
| ) |
Insert a new entry into the table given key and mark.
If there is already an entry with that key, leave it unchanged, otherwise insert the new entry.
Referenced by FX::FXStringDict::replace().
| void* FX::FXDict::replace | ( | const FXchar * | ky, | |
| const void * | ptr, | |||
| bool | mrk = false | |||
| ) |
Replace data at key, if the entry's mark is less than or equal to the given mark.
If there was no existing entry, a new entry is inserted with the given mark.
Referenced by FX::FXStringDict::remove().
| void* FX::FXDict::remove | ( | const FXchar * | ky | ) |
Remove data given key.
Reimplemented in FX::FXFileDict, FX::FXIconDict, and FX::FXStringDict.
Referenced by FX::FXStringDict::find().
| void* FX::FXDict::find | ( | const FXchar * | ky | ) | const |
Find data pointer given key.
Reimplemented in FX::FXSettings, and FX::FXStringDict.
Referenced by FX::FXStringDict::data().
| bool FX::FXDict::empty | ( | FXint | pos | ) | const [inline] |
Return true if slot is empty.
| void* FX::FXDict::data | ( | FXuint | pos | ) | const [inline] |
| bool FX::FXDict::mark | ( | FXuint | pos | ) | const [inline] |
Return mark flag of entry at position pos.
| FXint FX::FXDict::first | ( | ) | const |
Return position of first filled slot, or >= total.
| FXint FX::FXDict::last | ( | ) | const |
Return position of last filled slot or -1.
Return position of next filled slot in hash table or a value greater than or equal to total if no filled slot was found.
Return position of previous filled slot in hash table or a -1 if no filled slot was found.
| void FX::FXDict::clear | ( | ) |
|
|