HashIterator

Template defines an STL-like iterator over geometric hash table query results. (See GeomHash). The iterator is used within the HashResult container.

[ GAMB | Source | Keywords | Summary | Ancestors | All Members | Descendants ]

Quick Index

AUTHORS
CHANGES LOG
GOALS
USAGE

Class Summary

class HashIterator

{
public:
// STL compliance defintions
// typedefs & contructors.
HashIterator();
HashIterator(Bucket* const* ptr);
HashIterator(const HashIterator& hi);
~HashIterator();
// Equality operators.
bool operator== (const HashIterator& hi2) ;
// Iterating operators.
DataT& operator*();
const DataT& operator*() const;
HashIterator& operator++();
HashIterator& operator--();
HashIterator operator++(int);
HashIterator operator--(int);
protected:
}; // HashIterator

Back to the top of HashIterator


AUTHORS

Meir Fuchs. (meirfux@math.tau.ac.il)

Copyright: SAMBA group, Tel-Aviv Univ. Israel, 1997.

Back to the top of HashIterator


CHANGES LOG

Back to the top of HashIterator


GOALS

The HashIterator and HashResult families are used together. The HashIterator is an STL-like iterator class serving the HashResult class which is an STL-like container class.

A HashResult is formed when a query is posted to a geometric hash table (GeomHash). A HashResult holds a set of pointers into hash buckets within the hash table that are the query's results. The HashIterator is of a const iterator type and it does not allow changes to its members because those changes will show up in the hash table itself. The HashIterator allows the user to iterate foreward and backward over the set of values within the hash table. This set is a query result.

Back to the top of HashIterator


USAGE

HashResult is used like an STL iterator. This means iterating through the list of results can be done using the ++, -- operators and accessing the results pointed to by the iterators is done using the * operator. The HashResult supplies the begin() and end() methods.

For an example of using both HashIterator and HashResult see GeomHash.

Back to the top of HashIterator


HashIterator();

Default constructor. Seldom used.

  HashIterator();

Back to the top of HashIterator


HashIterator(Bucket* const* ptr);

Constructor recieves pointer to Bucket and an index within the Bucket. A Bucket is an STL vector and idx is the index within that vector.

  HashIterator(Bucket* const* ptr);

Back to the top of HashIterator


HashIterator(const HashIterator& hi);

Copy constructor.

  HashIterator(const HashIterator& hi);

Back to the top of HashIterator


~HashIterator();

Destructor.

  ~HashIterator();

Back to the top of HashIterator


bool operator== (const HashIterator& hi2) ;

Equality operator. Hash iterators from different queries but pointing to the same element in the hash table are equal. If the hash iterators are at the end point of the HashResult container then the equality operator will return true only if both hash iterators were created from the same HashResult object.

  bool operator== (const HashIterator& hi2)                                                                                                                                                   
;

Function is currently defined inline.


Back to the top of HashIterator


DataT& operator*();

Contents of. Returns data pointed to by const_iterator.

  DataT& operator*();

Back to the top of HashIterator


const DataT& operator*() const;

Contents of. Returns data pointed to by const_iterator.

  const DataT& operator*() const;

Back to the top of HashIterator


HashIterator& operator++();

Iterator increment operator. prefix.

  HashIterator& operator++();

Back to the top of HashIterator


HashIterator& operator--();

Iterator decrement operator. prefix.

  HashIterator& operator--();

Back to the top of HashIterator


HashIterator operator++(int);

Iterator increment operator. postfix.

  HashIterator operator++(int);

Back to the top of HashIterator


HashIterator operator--(int);

Iterator decrement operator. postfix.

  HashIterator operator--(int);

Back to the top of HashIterator


All Members

public:
// Equality operators.
bool operator== (const HashIterator& hi2) ;
// Iterating operators.
DataT& operator*();
const DataT& operator*() const;
HashIterator& operator++();
HashIterator& operator--();
HashIterator operator++(int);
HashIterator operator--(int);
protected:

Back to the top of HashIterator


Ancestors

Class does not inherit from any other class.

Back to the top of HashIterator


Descendants

Class is not inherited by any others.

Back to the top of HashIterator


Generated from source by the Cocoon utilities on Sun Nov 15 13:35:25 2009 .

Report problems to jkotula@unimax.com