Main Page | Modules | Namespace List | Class Hierarchy | Class List | Namespace Members | Class Members

HashGridBox3< Item > Class Template Reference
[Three-dimensional Hash GridThree-dimensional Hash Grid]

Grid Box Class. More...

#include <hashGrid.h>

List of all members.

External Iterators

typedef NeighborBoxItemBoxIteratorPosition
typedef ForwardIterator< HashGridBox3<
Item >, HashGridBox3< Item >,
BoxIteratorPosition, BoxIteratorTraits > 
BoxIterator
 BoxIterators iterate over all non-empty boxes that lie in the direct neighborhood to a box.
typedef ConstForwardIterator<
HashGridBox3< Item >, HashGridBox3<
Item >, BoxIteratorPosition,
BoxIteratorTraits > 
ConstBoxIterator
 This is the const version of BoxIterator .
typedef DataItemDataIteratorPosition
typedef ForwardIterator< HashGridBox3<
Item >, Item, DataIteratorPosition,
DataIteratorTraits > 
DataIterator
 Data iterator for grid boxes.
typedef ConstForwardIterator<
HashGridBox3< Item >, Item,
DataIteratorPosition, DataIteratorTraits > 
ConstDataIterator
 Const data iterator for grid boxes.
BoxIterator beginBox () throw ()
 get the first non-empty box
BoxIterator endBox () throw ()
 get the last non-empty box
ConstBoxIterator beginBox () const throw ()
 get the first non-empty box
ConstBoxIterator endBox () const throw ()
 get the last non-empty box
DataIterator beginData () throw ()
DataIterator endData () throw ()
ConstDataIterator beginData () const throw ()
ConstDataIterator endData () const throw ()
class BoxIteratorTraits
class DataIteratorTraits

Public Member Functions

void insert_ (HashGridBox3 *box) throw ()
bool remove_ (HashGridBox3 *box) throw ()
Constructors and Destructors
 HashGridBox3 () throw ()
 Default constructor.
 HashGridBox3 (const HashGridBox3 &grid_box, bool deep=true) throw ()
 Copy constructor.
 ~HashGridBox3 () throw ()
 Destructor.
void clear () throw ()
 Clears the grid box.
void destroy () throw ()
 Clears the grid box.
Assignment
void set (const HashGridBox3 &box, bool=true) throw (Exception::NotImplemented)
const HashGridBox3operator= (const HashGridBox3 &box) throw (Exception::NotImplemented)
Accessors
Item * find (const Item &item) throw ()
 Find an item in the item list of this grid box.
const Item * find (const Item &item) const throw ()
 The const version of find().
Size getSize () const throw ()
 Counts all items in the data item list.
void insert (const Item &item) throw ()
 Insert an item into the data item list of a grid box.
bool remove (const Item &item) throw ()
 Remove the first occurrence of a certain item from the data item list.
bool removeAll (const Item &item) throw ()
 Remove all occurences of a certain item from the data item list.
Miscellaneous
void host (Visitor< HashGridBox3 > &visitor) throw ()
 Host method.
Predicates
bool operator== (const HashGridBox3 &box) const throw ()
 Equality operator.
bool operator!= (const HashGridBox3 &box) const throw ()
 Inequality operator.
bool has (const Item &item) const throw ()
 Test whether an item is in the data item list.
bool isEmpty () const throw ()
 Test, whether this box is empty, i.
Debugging and Diagnostics
bool isValid () const throw ()
void dump (std::ostream &s=std::cout, Size depth=0) const throw ()
Internal Iterators
bool apply (UnaryProcessor< Item > &processor) throw ()
bool apply (UnaryProcessor< HashGridBox3< Item > > &processor) throw ()

Public Attributes

HashGridBox3previous_
HashGridBox3next_
NeighborBoxItemfirst_neighbor_
DataItemfirst_item_


Detailed Description

template<typename Item>
class HashGridBox3< Item >

Grid Box Class.

These boxes represent the buckets of a threedimensional hash grid. Every such box contains a linear list of the objects that are contained in this box. This list is accessible through a DataIterator.


Member Typedef Documentation

template<typename Item>
typedef ForwardIterator<HashGridBox3<Item>, HashGridBox3<Item>, BoxIteratorPosition, BoxIteratorTraits> HashGridBox3< Item >::BoxIterator
 

BoxIterators iterate over all non-empty boxes that lie in the direct neighborhood to a box.

Such an iterator traverses at most 26 boxes.

template<typename Item>
typedef ConstForwardIterator<HashGridBox3<Item>, Item, DataIteratorPosition, DataIteratorTraits> HashGridBox3< Item >::ConstDataIterator
 

Const data iterator for grid boxes.

This is the const version of DataIterator

template<typename Item>
typedef ForwardIterator<HashGridBox3<Item>, Item, DataIteratorPosition, DataIteratorTraits> HashGridBox3< Item >::DataIterator
 

Data iterator for grid boxes.

This iterator traverses the list of data items store in a HashGridBox3 .