GtkFC API Reference version 0.1.0

Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members   Examples  

Ghash Class Reference

#include <Ghash.h>

Inheritance diagram for Ghash:

Gset Gobject List of all members.

Public Methods

 Ghash ()
 Ghash (int size)
void Add (Gobject *o)
void Remove (Gobject *o)
GobjectGet (Gobject *o)
bool Contains (Gobject *o)
GiteratorGetIterator ()
int Length ()

Detailed Description

A simple Hashtable destructive collection implemented with Gvector and Glist. The table is implemented with a vector. Each element of vector is a Glist. The position of the list where the object will be inserted is the hashcode modulo vector size
See also:
Gset for a description of the destructive collections , Gvector , Glist , Gobject for a description of the hashcode
Author(s):
Thibaut Nicolas
Version:
0.1.0


Constructor & Destructor Documentation

Ghash::Ghash ( int size )
 

A Ghash with a vector of specified size


Member Function Documentation

void Ghash::Add ( Gobject * o ) [virtual]
 

Add a Gobject to the table. the key for the object is the hashcode returned by the HashCode method of the Gobject class

Reimplemented from Gset.

bool Ghash::Contains ( Gobject * o ) [virtual]
 

Return true if the object is in the table

Reimplemented from Gset.

Gobject * Ghash::Get ( Gobject * o )
 

Return the object

Giterator* Ghash::GetIterator ( ) [virtual]
 

Obtain an iterator for the set

Reimplemented from Gset.

int Ghash::Length ( ) [virtual]
 

Return the size in elements of the set.

Reimplemented from Gset.

void Ghash::Remove ( Gobject * o ) [virtual]
 

Remove an object if it is in the table

Reimplemented from Gset.


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

Copyright © 2002 Thibaut Nicolas
Last modified  lun sep 23 23:41:26 EDT 2002