Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FX::FXStringDictionary Class Reference

The dictionary class maintains a fast-access hash table of entities indexed by a character string. More...

#include <FXStringDictionary.h>

Classes

struct  Entry
 

Public Member Functions

 FXStringDictionary ()
 Construct empty string dictionary.
 
 FXStringDictionary (const FXStringDictionary &other)
 Construct from another string dictionary.
 
FXival no () const
 Return the size of the table, including the empty slots.
 
FXival used () const
 Return number of used slots in the table.
 
FXival free () const
 Return number of free slots in the table.
 
FXbool empty () const
 See if map is empty.
 
FXStringDictionaryoperator= (const FXStringDictionary &other)
 Assignment operator.
 
FXStringDictionaryadopt (FXStringDictionary &other)
 Adopt string dictionary from another.
 
FXival find (const FXchar *ky) const
 Find position of given key, returning -1 if not found.
 
FXival find (const FXString &ky) const
 Find position of given key, returning -1 if not found.
 
FXbool has (const FXchar *ky) const
 Check if key is mapped.
 
FXbool has (const FXString &ky) const
 Check if key is mapped.
 
FXStringat (const FXchar *ky, FXbool mrk=false)
 Return reference to slot assocated with given key.
 
const FXStringat (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
FXStringat (const FXString &ky, FXbool mrk=false)
 Return reference to slot assocated with given key.
 
const FXStringat (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
FXStringoperator[] (const FXchar *ky)
 Return reference to slot assocated with given key.
 
const FXStringoperator[] (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
FXStringoperator[] (const FXString &ky)
 Return reference to slot assocated with given key.
 
const FXStringoperator[] (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
FXbool insert (const FXchar *ky, const FXchar *str, FXbool mrk=false)
 Insert association with given key; return reference to the string.
 
FXbool insert (const FXString &ky, const FXchar *str, FXbool mrk=false)
 Insert association with given key; return reference to the string.
 
FXbool insert (const FXString &ky, const FXString &str, FXbool mrk=false)
 Insert association with given key; return reference to the string.
 
FXbool remove (const FXchar *ky)
 Remove association with given key.
 
FXbool remove (const FXString &ky)
 Remove association with given key.
 
FXbool erase (FXival pos)
 Erase data at pos in the table.
 
FXbool empty (FXival pos) const
 Return true if slot is empty.
 
const FXStringkey (FXival pos) const
 Return key at position pos.
 
FXStringdata (FXival pos)
 Return reference to slot at position pos.
 
const FXStringdata (FXival pos) const
 Return constant reference to slot at position pos.
 
FXuint mark (FXival pos) const
 Return mark flag of entry at position pos.
 
FXbool clear ()
 Clear entire table.
 
 ~FXStringDictionary ()
 Destroy table.
 

Protected Member Functions

FXbool no (FXival n)
 
void used (FXival u)
 
void free (FXival f)
 
FXbool resize (FXival n)
 

Protected Attributes

Entrytable
 

Detailed Description

The dictionary class maintains a fast-access hash table of entities indexed by a character string.


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

Copyright © 1997-2022 Jeroen van der Zijp