Spatial C++ Library
Generic Multi-Dimensional Containers and Spatial Operations
spatial::details::Mapping< Container > Struct Template Reference

Extra information needed by the iterator to perform its work. More...

#include <mapping_iterator.hpp>

Inherits key_compare.

Public Member Functions

 Mapping ()
 Build an uninitialized mapping data object. More...
 
 Mapping (const typename Container::key_compare &c, dimension_type m)
 Builds required mapping data from the given key comparison functor, dimension and mapping dimension. More...
 
Container::key_compare key_comp () const
 

Public Attributes

dimension_type mapping_dim
 The current dimension of iteration. More...
 

Detailed Description

template<typename Container>
struct spatial::details::Mapping< Container >

Extra information needed by the iterator to perform its work.

This information is copied to each iterator from a given container.

Although it may be possible to modify this information directly from it's members, it may be unwise to do so, as it could invalidate the iterator and cause the program to behave unexpectedly. If any of this information needs to be modified, it is probably recommended to create a new iterator altogether.

Template Parameters
CtThe container to which these iterator relate to.

Definition at line 42 of file mapping_iterator.hpp.

Constructor & Destructor Documentation

template<typename Container>
spatial::details::Mapping< Container >::Mapping ( )

Build an uninitialized mapping data object.

Definition at line 45 of file mapping_iterator.hpp.

template<typename Container>
spatial::details::Mapping< Container >::Mapping ( const typename Container::key_compare &  c,
dimension_type  m 
)

Builds required mapping data from the given key comparison functor, dimension and mapping dimension.

Parameters
cThe container being iterated.
mThe mapping dimension used in the iteration.

Definition at line 55 of file mapping_iterator.hpp.

Member Function Documentation

template<typename Container>
Container::key_compare spatial::details::Mapping< Container >::key_comp ( ) const

Definition at line 59 of file mapping_iterator.hpp.

Member Data Documentation

template<typename Container>
dimension_type spatial::details::Mapping< Container >::mapping_dim

The current dimension of iteration.

You can modify this key if you suddenly want the iterator to change dimension of iteration. However this field must always satisfy:

\[ mapping_dim() < Rank() \]

Rank being the template rank provider for the iterator.

Attention
If you modify this value directly, no safety check will be performed.

Definition at line 75 of file mapping_iterator.hpp.


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