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

FX::FXDictionaryOf< TYPE > Class Template Reference

Dictionary of pointers to TYPE. More...

#include <FXDictionaryOf.h>

Inheritance diagram for FX::FXDictionaryOf< TYPE >:
FX::FXDictionary

Public Member Functions

 FXDictionaryOf ()
 Default constructor.
 
 FXDictionaryOf (const FXDictionaryOf< TYPE > &other)
 Copy constructor.
 
FXDictionaryOf< TYPE > & operator= (const FXDictionaryOf< TYPE > &other)
 Assignment operator.
 
FXDictionaryOf< TYPE > & adopt (FXDictionaryOf< TYPE > &other)
 Adopt dictionary from another.
 
TYPE *& at (const FXchar *ky)
 Return reference to slot assocated with given key.
 
TYPE *const & at (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
TYPE *& at (const FXString &ky)
 Return reference to slot assocated with given key.
 
TYPE *const & at (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
TYPE *& operator[] (const FXchar *ky)
 Return reference to slot assocated with given key.
 
TYPE *const & operator[] (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
TYPE *& operator[] (const FXString &ky)
 Return reference to slot assocated with given key.
 
TYPE *const & operator[] (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
TYPE * insert (const FXchar *ky, TYPE *ptr=nullptr)
 Insert association with given key; return old value, if any.
 
TYPE * insert (const FXString &ky, TYPE *ptr=nullptr)
 Insert association with given key; return old value, if any.
 
TYPE * remove (const FXchar *ky)
 Remove association with given key; return old value, if any.
 
TYPE * remove (const FXString &ky)
 Remove association with given key; return old value, if any.
 
TYPE * erase (FXival pos)
 Erase data at pos in the table; return old value, if any.
 
TYPE *& data (FXival pos)
 Return reference to slot at position pos.
 
TYPE *const & data (FXival pos) const
 Return constant reference to slot at position pos.
 
- Public Member Functions inherited from FX::FXDictionary
 FXDictionary ()
 Construct empty dictionary.
 
 FXDictionary (const FXDictionary &other)
 Construct from another 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.
 
FXDictionaryoperator= (const FXDictionary &other)
 Assignment operator.
 
FXDictionaryadopt (FXDictionary &other)
 Adopt 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.
 
void *& at (const FXchar *ky)
 Return reference to slot assocated with given key.
 
void *const & at (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
void *& at (const FXString &ky)
 Return reference to slot assocated with given key.
 
void *const & at (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
void *& operator[] (const FXchar *ky)
 Return reference to slot assocated with given key.
 
void *const & operator[] (const FXchar *ky) const
 Return constant reference to slot assocated with given key.
 
void *& operator[] (const FXString &ky)
 Return reference to slot assocated with given key.
 
void *const & operator[] (const FXString &ky) const
 Return constant reference to slot assocated with given key.
 
void * insert (const FXchar *ky, void *ptr=nullptr)
 Insert association with given key; return old value, if any.
 
void * insert (const FXString &ky, void *ptr=nullptr)
 Insert association with given key; return old value, if any.
 
void * remove (const FXchar *ky)
 Remove association with given key; return old value, if any.
 
void * remove (const FXString &ky)
 Remove association with given key; return old value, if any.
 
void * erase (FXival pos)
 Erase data at pos in the table; return old value, if any.
 
FXbool empty (FXival pos) const
 Return true if slot is empty.
 
const FXStringkey (FXival pos) const
 Return key at position pos.
 
void *& data (FXival pos)
 Return reference to slot at position pos.
 
void *const & data (FXival pos) const
 Return constant reference to slot at position pos.
 
FXbool clear ()
 Clear entire table.
 
 ~FXDictionary ()
 Destroy table.
 

Additional Inherited Members

- Protected Member Functions inherited from FX::FXDictionary
FXbool no (FXival n)
 
void used (FXival u)
 
void free (FXival f)
 
FXbool resize (FXival n)
 
- Protected Attributes inherited from FX::FXDictionary
Entrytable
 

Detailed Description

template<typename TYPE>
class FX::FXDictionaryOf< TYPE >

Dictionary of pointers to TYPE.


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

Copyright © 1997-2022 Jeroen van der Zijp