SLIP  1.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | List of all members
slip::const_component_iterator2d_box< MultiComponentContainer2D, N > Class Template Reference

This is some iterator to iterate a 2d MultiComponentContainer into a Box area defined by the indices of the 2d container. More...

#include <component_iterator2d_box.hpp>

Public Types

typedef
std::random_access_iterator2d_tag 
iterator_category
 
typedef
MultiComponentContainer2D::value_type 
Block
 
typedef Block::value_type value_type
 
typedef DPoint2d< int > difference_type
 
typedef value_type const * pointer
 
typedef value_type const & reference
 
typedef
const_component_iterator2d_box 
self
 
typedef
MultiComponentContainer2D::size_type 
size_type
 

Public Member Functions

reference operator* () const
 Dereference assignment operator. Returns the element that the current const_component_iterator2d_box i point to. More...
 
pointer operator-> () const
 
Constructors & Destructors
 const_component_iterator2d_box ()
 Constructs a const_component_iterator2d_box. More...
 
 const_component_iterator2d_box (MultiComponentContainer2D *c, std::size_t cp, const Box2d< int > &b)
 Constructs a const_component_iterator2d_box. More...
 
 const_component_iterator2d_box (const self &o)
 Constructs a copy of the const_component_iterator2d_box o. More...
 
Assignment operators and methods
selfoperator= (const self &o)
 Assign a const_component_iterator2d_box. More...
 
Forward operators addons
selfoperator++ ()
 Preincrement a const_component_iterator2d_box. Iterate to the next location inside the Box2d. More...
 
self operator++ (int)
 Postincrement a const_component_iterator2d_box. Iterate to the next location inside the Box2d. More...
 
Bidirectional operators addons
selfoperator-- ()
 Predecrement a const_component_iterator2d_box. Iterate to the previous location inside the Box2d. More...
 
self operator-- (int)
 Postdecrement a const_component_iterator2d_box. Iterate to the previous location inside the Box2d. More...
 
Indices accessors
int x1 () const
 Access to the first index of the current const_component_iterator2d_box. More...
 
int i () const
 Access to the first index of the current const_component_iterator2d_box. More...
 
int x2 () const
 Access to the second index of the current const_component_iterator2d_box. More...
 
int j () const
 Access to the second index of the current const_component_iterator2d_box. More...
 
size_type cp () const
 Access to the component index of the current const_component_iterator2d_box. More...
 

Friends

Equality comparable operators
bool operator== (const self &i1, const self &i2)
 Equality operator. More...
 
bool operator!= (const self &i1, const self &i2)
 Inequality operator. More...
 
Strict Weakly comparable operators
bool operator< (const self &i1, const self &i2)
 < operator. More...
 
bool operator> (const self &i1, const self &i2)
 

operator.

More...
 
bool operator<= (const self &i1, const self &i2)
 <= operator. More...
 
bool operator>= (const self &i1, const self &i2)
 >= operator. More...
 

const_component_iterator2d_box operators addons

selfoperator+= (const difference_type &d)
 const_component_iterator2d_box addition. More...
 
selfoperator-= (const difference_type &d)
 const_component_iterator2d_box substraction. More...
 
self operator+ (const difference_type &d)
 const_component_iterator2d_box addition. More...
 
self operator- (const difference_type &d)
 const_component_iterator2d_box substraction. More...
 
reference operator[] (difference_type d) const
 const_component_iterator2d_box element assignment operator. Equivalent to *(i + d) = t. More...
 
MultiComponentContainer2D::const_component_row_iterator row_begin (size_type row) const
 const_component_iterator2d_box element assignment operator. More...
 
MultiComponentContainer2D::const_component_row_iterator row_end (size_type row) const
 const_component_iterator2d_box element assignment operator. More...
 
MultiComponentContainer2D::const_component_col_iterator col_begin (size_type col) const
 const_component_iterator2d_box element assignment operator. More...
 
MultiComponentContainer2D::const_component_col_iterator col_end (size_type col) const
 const_component_iterator2d_box element assignment operator. More...
 
MultiComponentContainer2D::const_reverse_component_row_iterator row_rbegin (size_type row) const
 component_iterator2d_box row reverse iterator. More...
 
MultiComponentContainer2D::const_reverse_component_row_iterator row_rend (size_type row) const
 component_iterator2d_box row reverse iterator. More...
 
MultiComponentContainer2D::const_reverse_component_col_iterator col_rbegin (size_type col) const
 component_iterator2d_box col reverse iterator. More...
 
MultiComponentContainer2D::const_reverse_component_col_iterator col_rend (size_type col) const
 component_iterator2d_box col reverse iterator. More...
 
difference_type operator- (const self &i1, const self &i2)
 const_component_iterator2d_box difference operator. More...
 

Detailed Description

template<class MultiComponentContainer2D, std::size_t N>
class slip::const_component_iterator2d_box< MultiComponentContainer2D, N >

This is some iterator to iterate a 2d MultiComponentContainer into a Box area defined by the indices of the 2d container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
25/02/2008
Parameters
MultiComponentContainer2DType of 2d container in the const_component_iterator2d_box
Nnumber of elements in one block
This iterator is an 2d extension of the random_access_iterator.
It is compatible with the bidirectional_iterator of the Standard library. It iterate into a box area defined inside the indices range of the 2d container. Those indices are defined as follows :
iterator2d_conventions.jpg
axis and notation conventions

Definition at line 698 of file component_iterator2d_box.hpp.

Member Typedef Documentation

template<class MultiComponentContainer2D , std::size_t N>
typedef MultiComponentContainer2D::value_type slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::Block

Definition at line 705 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef DPoint2d<int> slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::difference_type

Definition at line 707 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef std::random_access_iterator2d_tag slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::iterator_category

Definition at line 704 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef value_type const* slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::pointer

Definition at line 708 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef value_type const& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::reference

Definition at line 709 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef const_component_iterator2d_box slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::self

Definition at line 711 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef MultiComponentContainer2D::size_type slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::size_type

Definition at line 713 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
typedef Block::value_type slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::value_type

Definition at line 706 of file component_iterator2d_box.hpp.

Constructor & Destructor Documentation

template<class MultiComponentContainer2D , std::size_t N>
slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::const_component_iterator2d_box ( )
inline

Constructs a const_component_iterator2d_box.

The box to iterate is in this case the full container

Definition at line 723 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::const_component_iterator2d_box ( MultiComponentContainer2D *  c,
std::size_t  cp,
const Box2d< int > &  b 
)
inline

Constructs a const_component_iterator2d_box.

Parameters
cpointer to an existing 2d container
cpindex of the component to iterate
bBox2d<int> defining the range of indices to iterate
Precondition
box indices must be inside those of the 2d container

Definition at line 734 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::const_component_iterator2d_box ( const self o)
inline

Constructs a copy of the const_component_iterator2d_box o.

Parameters
ocomponent_iterator2d_box to copy.

Definition at line 744 of file component_iterator2d_box.hpp.

Member Function Documentation

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_component_col_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::col_begin ( size_type  col) const
inline

const_component_iterator2d_box element assignment operator.

Parameters
rowoffset.
Returns
a col_iterator to the first element of the col col of the box

Definition at line 1131 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_component_col_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::col_end ( size_type  col) const
inline

const_component_iterator2d_box element assignment operator.

Parameters
rowoffset.
Returns
a col_iterator to the first element of the col col of the box

Definition at line 1144 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_reverse_component_col_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::col_rbegin ( size_type  col) const
inline

component_iterator2d_box col reverse iterator.

Parameters
rowoffset.
Returns
a const_reverse_component_col_iterator to the first element of the column col of the box

Definition at line 1181 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_reverse_component_col_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::col_rend ( size_type  col) const
inline

component_iterator2d_box col reverse iterator.

Parameters
rowoffset.
Returns
a const_reverse_component_col_iterator to the last element of the column col of the box

Definition at line 1193 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
size_type slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::cp ( ) const
inline

Access to the component index of the current const_component_iterator2d_box.

Returns
the component index

Definition at line 1247 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
int slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::i ( ) const
inline

Access to the first index of the current const_component_iterator2d_box.

Returns
the first index.

Definition at line 1219 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
int slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::j ( ) const
inline

Access to the second index of the current const_component_iterator2d_box.

Returns
the second index.

Definition at line 1237 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
reference slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator* ( ) const
inline

Dereference assignment operator. Returns the element that the current const_component_iterator2d_box i point to.

Returns
a const_component_iterator2d_box reference.

Definition at line 784 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator+ ( const difference_type d)
inline

const_component_iterator2d_box addition.

Parameters
ddifference_type
Returns
a const_component_iterator2d_box reference
Precondition
All the iterators between the current iterator i and i + d must be dereferenceable.

Definition at line 1043 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator++ ( )
inline

Preincrement a const_component_iterator2d_box. Iterate to the next location inside the Box2d.

Definition at line 806 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator++ ( int  )
inline

Postincrement a const_component_iterator2d_box. Iterate to the next location inside the Box2d.

Definition at line 837 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator+= ( const difference_type d)
inline

const_component_iterator2d_box addition.

Parameters
ddifference_type
Returns
a const_component_iterator2d_box reference
Precondition
All the iterators between the current iterator i and i + d must be dereferenceable.

Definition at line 1009 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator- ( const difference_type d)
inline

const_component_iterator2d_box substraction.

Parameters
ddifference_type
Returns
a const_component_iterator2d_box reference
Precondition
All the iterators between the current iterator i and i - d must be dereferenceable.

Definition at line 1058 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator-- ( )
inline

Predecrement a const_component_iterator2d_box. Iterate to the previous location inside the Box2d.

Definition at line 856 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator-- ( int  )
inline

Postdecrement a const_component_iterator2d_box. Iterate to the previous location inside the Box2d.

Definition at line 888 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator-= ( const difference_type d)
inline

const_component_iterator2d_box substraction.

Parameters
ddifference_type
Returns
a const_component_iterator2d_box reference
Precondition
All the iterators between the current iterator i and i - d must be dereferenceable.

Definition at line 1027 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
pointer slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator-> ( ) const
inline

Definition at line 790 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
self& slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator= ( const self o)
inline

Assign a const_component_iterator2d_box.

Assign elements of const_component_iterator2d_box in o.

Parameters
oconst_component_iterator2d_box to get the values from.
Returns
a const_component_iterator2d_box reference.

Definition at line 762 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
reference slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::operator[] ( difference_type  d) const
inline

const_component_iterator2d_box element assignment operator. Equivalent to *(i + d) = t.

Parameters
ddifference_type.
Returns
a reference to the 2d container elements
Precondition
(i + d) exists and is dereferenceable.
Postcondition
i[d] is a copy of reference.

Definition at line 1090 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_component_row_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::row_begin ( size_type  row) const
inline

const_component_iterator2d_box element assignment operator.

Parameters
rowoffset.
Returns
a row_iterator to the first element of the row row of the box

Definition at line 1105 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_component_row_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::row_end ( size_type  row) const
inline

const_component_iterator2d_box element assignment operator.

Parameters
rowoffset.
Returns
a row_iterator to the past-the-end element of the row row of the box

Definition at line 1118 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_reverse_component_row_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::row_rbegin ( size_type  row) const
inline

component_iterator2d_box row reverse iterator.

Parameters
rowoffset.
Returns
a const_reverse_component_row_iterator to the first element of the row row of the box

Definition at line 1156 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
MultiComponentContainer2D::const_reverse_component_row_iterator slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::row_rend ( size_type  row) const
inline

component_iterator2d_box row reverse iterator.

Parameters
rowoffset.
Returns
a const_reverse_component_row_iterator to the past-the-end element of the row row of the box

Definition at line 1169 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
int slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::x1 ( ) const
inline

Access to the first index of the current const_component_iterator2d_box.

Returns
the first index.

Definition at line 1210 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
int slip::const_component_iterator2d_box< MultiComponentContainer2D, N >::x2 ( ) const
inline

Access to the second index of the current const_component_iterator2d_box.

Returns
the second index.

Definition at line 1228 of file component_iterator2d_box.hpp.

Friends And Related Function Documentation

template<class MultiComponentContainer2D , std::size_t N>
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true if !(i1 == i2)

Definition at line 925 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
difference_type operator- ( const self i1,
const self i2 
)
friend

const_component_iterator2d_box difference operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
a difference_type d such that i1 = i2 + d.
Precondition
Either i1 is reachable from i2, or i2 is reachable from i1.

Definition at line 1074 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true i1.pos_ < i2_pos

Definition at line 947 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true if !(i2 < i1)

Definition at line 974 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true if i1 and i2 point to the same element of the 2d container

Definition at line 909 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
bool operator> ( const self i1,
const self i2 
)
friend

operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true i2 < i1

Definition at line 961 of file component_iterator2d_box.hpp.

template<class MultiComponentContainer2D , std::size_t N>
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

Parameters
i1first const_component_iterator2d_box.
i2second const_component_iterator2d_box.
Returns
true if !(i1 < i2)

Definition at line 988 of file component_iterator2d_box.hpp.


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