Logo Search packages:      
Sourcecode: djvulibre version File versions  Download package

Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes

GMap< KTYPE, VTYPE > Class Template Reference

#include <GContainer.h>

Inheritance diagram for GMap< KTYPE, VTYPE >:
Inheritance graph
Collaboration diagram for GMap< KTYPE, VTYPE >:
Collaboration graph

List of all members.

Public Member Functions

GPosition contains (const KTYPE &key) const
GPosition contains (const KTYPE &key, GPosition &pos) const
void del (const KTYPE &key)
void del (GPosition &pos)
void empty ()
void first (GPosition &pos) const
GPosition firstpos () const
bool isempty () const
const KTYPE & key (const GPosition &pos) const
VTYPE * next (GPosition &pos)
const VTYPE * next (GPosition &pos) const
 operator GPosition () const
GMapoperator= (const GMap &r)
VTYPE & operator[] (const KTYPE &key)
const VTYPE & operator[] (const KTYPE &key) const
VTYPE & operator[] (const GPosition &pos)
const VTYPE & operator[] (const GPosition &pos) const
int size () const

Protected Types

typedef GCONT MapNode< KTYPE,
typedef GCONT SetNode< KTYPE > SNode

Protected Member Functions

void deletenode (HNode *n)
HNodeget (const KTYPE &key) const
GCONT HNodeget_or_create (const KTYPE &key)
HNodeget_or_throw (const KTYPE &key) const
HNodehashnode (unsigned int hashcode) const
HNodeinstallnode (HNode *n)

Static Protected Member Functions

static GCONT HNodenewnode (const void *key)

Protected Attributes

GPBuffer< HNode * > gtable
int nbuckets
int nelems
HNode ** table
const Traitstraits

Detailed Description

template<class KTYPE, class VTYPE>
class GMap< KTYPE, VTYPE >

Associative maps. Template class GMap<KTYPE,VTYPE># implements an associative map. The map contains an arbitrary number of entries. Each entry is a pair containing one element of type KTYPE# (named the "key") and one element of type VTYPE# (named the "value"). The entry associated to a particular value of the key can retrieved very efficiently. This class only implement constructors. See class {GMapTemplate} and {GPosition} for a description of all access methods.

Definition at line 1309 of file GContainer.h.

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

Generated by  Doxygen 1.6.0   Back to index