![]() |
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, void *ptr, FXbool mrk=false) |
void * | replace (const FXchar *ky, void *ptr, FXbool mrk=false) |
void * | remove (const FXchar *ky) |
void * | find (const FXchar *ky) const |
FXbool | empty (FXint pos) const |
const FXchar * | key (FXint pos) const |
void * | data (FXint pos) const |
FXbool | mark (FXint 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.
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::FXIconDict::find(), and FX::FXStringDict::replace().
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::FXIconDict::data(), and 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().
void* FX::FXDict::data | ( | FXint | pos | ) | const [inline] |
Return data pointer at position pos.
Reimplemented in FX::FXFileDict, FX::FXIconDict, FX::FXSettings, and FX::FXStringDict.
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 | ( | ) |
![]() |