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

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

GMapImpl< K, TI > Class Template Reference

Inheritance diagram for GMapImpl< K, TI >:
Inheritance graph
Collaboration diagram for GMapImpl< K, TI >:
Collaboration graph

List of all members.

Public Member Functions

GPosition contains (const K &key) const
void del (const K &key)
void del (GPosition &pos)
void empty ()
GPosition firstpos () const

Protected Types

typedef GCONT MapNode< K, TI > MNode
typedef GCONT SetNode< K > SNode

Protected Member Functions

void deletenode (HNode *n)
HNodehashnode (unsigned int hashcode) const
HNodeinstallnode (HNode *n)
Associative Maps

These template classes implements a associative maps. The associative 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"). All entries have distinct keys. These template class must be able to access the following functions: {itemize} a VTYPE# default constructor VTYPE::VTYPE()#, a VTYPE# copy constructor VTYPE::VTYPE(const VTYPE &)#, optionally a VTYPE# destructor VTYPE::~VTYPE()#, a KTYPE# default constructor KTYPE::KTYPE()#, a KTYPE# copy constructor KTYPE::KTYPE(const KTYPE &)#, optionally a KTYPE# destructor KTYPE::~KTYPE()#, a KTYPE# comparison operator KTYPE::operator==(const KTYPE &)#, and a KTYPE# hashing function hash(const KTYPE&)#. {itemize} The hashing function must return an unsigned int# number. Multiple invocations of the hashing function with equal arguments (in the sense of KTYPE::operator==#) must always return the same number. Position objects (see {GPosition}) may be used to iterate over the entries contained by an associative map. Associative maps.

 GMapImpl ()
 GMapImpl (const GCONT Traits &traits)
GCONT HNodeget_or_create (const K &key)
HNodeget (const K &key) const
HNodeget_or_throw (const K &key) const

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 K, class TI>
class GMapImpl< K, TI >

Definition at line 1172 of file GContainer.h.

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

Generated by  Doxygen 1.6.0   Back to index