Public Types | Public Member Functions | Public Attributes | Static Public Attributes
ash::grid_navigator< Grid, Itr, Mod, _D > Struct Template Reference

The base class for hashgrid::navigator & hashgrid::const_navigator. More...

#include <ash/impl/hashgrid.h>

List of all members.

Public Types

enum  { D = DIM_2D }
typedef grid_navigator _Type
typedef Mod< typename
Grid::node_type * >::type 
node_ptr
typedef Mod< Grid * >::type box_ptr
typedef Grid box_type
typedef Grid::key_type key_type
typedef Grid::morton_type morton_type
typedef Grid::pcoord_type pcoord_type
typedef Grid::point_type point_type
typedef
geometric_axis_iterator
< grid_navigator, AXIS_X > 
x_type
 The interface type for x-axis iteration.
typedef
geometric_axis_iterator
< grid_navigator, AXIS_Y > 
y_type
 The interface type for y-axis iteration.
Iterator Traits
typedef Grid::value_type value_type
typedef Mod< value_type * >::type pointer
typedef Mod< value_type & >::type reference
typedef Grid::size_type size_type
typedef Grid::difference_type difference_type
typedef void iterator_category

Public Member Functions

grid_navigatorjump (key_type const &loc)
 Go directly to an arbitrary location on the grid.
bool valid () const
 Check if the navigator is dereferenceable.
bool operator== (grid_navigator const &nav) const
 Equality operator.
void _go ()
void _go (uint8 l)
Constructors/Destructors

We use the default destructor.

 grid_navigator ()
 Default constructor.
 grid_navigator (grid_navigator const &nav)
 Copy constructor.
 grid_navigator (Itr const &itr)
 Conversion constructor from an iterator.
 grid_navigator (box_ptr hg, morton_type const &m)
 "Real" constructor.
Dereference Operators
reference operator* () const
pointer operator-> () const

Public Attributes

union {
   x_type   x
 The x-axis iteration interface.
   y_type   y
 The y-axis iteration interface.
}; 
morton_type pos
 The current location.
node_ptr _M_node
box_ptr _M_box

Static Public Attributes

static const size_type end = static_cast< typename Grid::size_type >(-1)

Detailed Description

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
struct ash::grid_navigator< Grid, Itr, Mod, _D >

The base class for hashgrid::navigator & hashgrid::const_navigator.


Member Typedef Documentation

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
typedef void ash::grid_navigator< Grid, Itr, Mod, _D >::iterator_category
Note:
This should be std::trivial_iterator_tag, which does not exist...
template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
typedef geometric_axis_iterator<grid_navigator, AXIS_X> ash::grid_navigator< Grid, Itr, Mod, _D >::x_type

The interface type for x-axis iteration.

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
typedef geometric_axis_iterator<grid_navigator, AXIS_Y> ash::grid_navigator< Grid, Itr, Mod, _D >::y_type

The interface type for y-axis iteration.


Constructor & Destructor Documentation

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
ash::grid_navigator< Grid, Itr, Mod, _D >::grid_navigator ( ) [inline]

Default constructor.

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
ash::grid_navigator< Grid, Itr, Mod, _D >::grid_navigator ( grid_navigator< Grid, Itr, Mod, _D > const &  nav) [inline]

Copy constructor.

Parameters:
navThe object to copy.
template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
ash::grid_navigator< Grid, Itr, Mod, _D >::grid_navigator ( Itr const &  itr) [inline]

Conversion constructor from an iterator.

Parameters:
itrThe iterator to convert.
template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
ash::grid_navigator< Grid, Itr, Mod, _D >::grid_navigator ( box_ptr  hg,
morton_type const &  m 
) [inline]

"Real" constructor.

Parameters:
hgA pointer to the hashgrid.
mThe morton code for the location.

Member Function Documentation

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
grid_navigator& ash::grid_navigator< Grid, Itr, Mod, _D >::jump ( key_type const &  loc) [inline]

Go directly to an arbitrary location on the grid.

Parameters:
locThe destination.
Returns:
A reference to the navigator.
template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
bool ash::grid_navigator< Grid, Itr, Mod, _D >::operator== ( grid_navigator< Grid, Itr, Mod, _D > const &  nav) const [inline]

Equality operator.

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
bool ash::grid_navigator< Grid, Itr, Mod, _D >::valid ( ) const [inline]

Check if the navigator is dereferenceable.

Returns:
True if the location is in the container.

Member Data Documentation

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
morton_type ash::grid_navigator< Grid, Itr, Mod, _D >::pos

The current location.

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
x_type ash::grid_navigator< Grid, Itr, Mod, _D >::x

The x-axis iteration interface.

template<class Grid, class Itr, template< typename > class Mod, DIM _D = dim_cast<Grid::D>::D>
y_type ash::grid_navigator< Grid, Itr, Mod, _D >::y

The y-axis iteration interface.


The documentation for this struct was generated from the following files:


© 2012   AshTL
Licensed under  AGPLv3
Hosted by  Get AshTL at SourceForge.net. Fast, secure and Free Open Source software downloads
Generated by  doxygen 1.7.4