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

FX::FXVariantMap Class Reference

Variant map associates strings to variants using fast hash table. More...

#include <FXVariantMap.h>

Classes

struct  Entry
 

Public Member Functions

 FXVariantMap ()
 Construct an empty map.
 
 FXVariantMap (const FXVariantMap &other)
 Construct from another map.
 
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.
 
FXVariantMapoperator= (const FXVariantMap &other)
 Assignment operator.
 
FXVariantMapadopt (FXVariantMap &other)
 Adopt map from another map; the other map becomes empty.
 
FXival find (const FXchar *ky) const
 Find slot index for key; return -1 if not found.
 
FXival find (const FXString &ky) const
 Find slot index for key; return -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.
 
FXVariantat (const FXchar *ky)
 Return reference to variant assocated with key.
 
const FXVariantat (const FXchar *ky) const
 Return constant reference to variant assocated with key.
 
FXVariantat (const FXString &ky)
 Return reference to variant assocated with key.
 
const FXVariantat (const FXString &ky) const
 Return constant reference to variant assocated with key.
 
FXVariantoperator[] (const FXchar *ky)
 Return reference to variant assocated with key.
 
const FXVariantoperator[] (const FXchar *ky) const
 Return constant reference to variant assocated with key.
 
FXVariantoperator[] (const FXString &ky)
 Return reference to variant assocated with key.
 
const FXVariantoperator[] (const FXString &ky) const
 Return constant reference to variant assocated with key.
 
FXbool remove (const FXchar *ky)
 Remove entry from the table.
 
FXbool remove (const FXString &ky)
 Remove entry from the table.
 
FXbool erase (FXival pos)
 Erase entry at pos in the table.
 
FXbool empty (FXival pos) const
 Return true if slot at pos is empty.
 
const FXStringkey (FXival pos) const
 Return key value at slot pos; may be empty!
 
FXVariantdata (FXival pos)
 Return reference to data at slot s; but careful as assignment to empty slot is dangerous!!
 
const FXVariantdata (FXival pos) const
 Return value at slot pos; may be empty!
 
FXbool clear ()
 Clear the table.
 
 ~FXVariantMap ()
 Destructor.
 

Protected Member Functions

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

Protected Attributes

Entrytable
 

Detailed Description

Variant map associates strings to variants using fast hash table.


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

Copyright © 1997-2022 Jeroen van der Zijp