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_iterator3d_box< T > Class Template Reference

This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d container. More...

#include <DenseVector3dField3d.hpp>

Public Types

typedef
std::random_access_iterator3d_tag 
iterator_category
 
typedef Container3D::value_type value_type
 
typedef DPoint2d< int > diff2d
 
typedef DPoint3d< int > difference_type
 
typedef Container3D::const_pointer pointer
 
typedef
Container3D::const_reference 
reference
 
typedef const_iterator3d_box self
 
typedef Container3D::size_type size_type
 

Public Member Functions

reference operator* () const
 Dereference operator. Returns the element that the current const_iterator3d_box i point to. More...
 
pointer operator-> () const
 
Constructors & Destructors
 const_iterator3d_box ()
 Constructs a const_iterator3d_box. More...
 
 const_iterator3d_box (Container3D *c, const Box3d< int > &b)
 Constructs a const_iterator3d_box. More...
 
 const_iterator3d_box (const self &o)
 Constructs a copy of the const_iterator3d_box o. More...
 
Assignment operators and methods
selfoperator= (const self &o)
 Assign a const_iterator3d_box. More...
 
Forward operators addons
selfoperator++ ()
 Preincrement a const_iterator3d_box. Iterate to the next location inside the Box3d. More...
 
self operator++ (int)
 Postincrement a const_iterator3d_box. Iterate to the next location inside the Box3d. More...
 
Bidirectional operators addons
selfoperator-- ()
 Predecrement a const_iterator3d_box. Iterate to the previous location inside the Box3d. More...
 
self operator-- (int)
 Postdecrement a const_iterator3d_box. Iterate to the previous location inside the Box3d. More...
 
Subscripts accessors
int x1 () const
 Access to the first subscript of the current const_iterator3d_box. More...
 
int k () const
 Access to the first subscript of the current const_iterator3d_box. More...
 
int x2 () const
 Access to the first subscript of the current const_iterator3d_box. More...
 
int i () const
 Access to the first subscript of the current const_iterator3d_box. More...
 
int x3 () const
 Access to the second subscript of the current const_iterator3d_box. More...
 
int j () const
 Access to the second subscript of the current const_iterator3d_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_iterator3d_box operators addons

selfoperator+= (const difference_type &d)
 const_iterator3d_box addition. More...
 
selfoperator-= (const difference_type &d)
 const_iterator3d_box substraction. More...
 
self operator+ (const difference_type &d)
 const_iterator3d_box addition. More...
 
self operator- (const difference_type &d)
 const_iterator3d_box substraction. More...
 
reference operator[] (difference_type d) const
 const_iterator3d_box element assignment operator. Equivalent to *(k + d). More...
 
pointer operator[] (diff2d d) const
 const_iterator3d_box element assignment operator. Equivalent to *(k + d). More...
 
pointeroperator[] (int n) const
 const_iterator3d_box element assignment operator. Equivalent to *(k + n). More...
 
Container3D::const_slice_iterator slice_begin (size_type row, size_type col) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_slice_iterator slice_end (size_type row, size_type col) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_row_iterator row_begin (size_t slice, size_type row) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_row_iterator row_end (size_t slice, size_type row) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_col_iterator col_begin (size_t slice, size_type col) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_col_iterator col_end (size_t slice, size_type col) const
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_iterator2d plane_upper_left (const slip::PLANE_ORIENTATION p, const size_type xp)
 const_iterator3d_box element assignment operator. More...
 
Container3D::const_iterator2d plane_bottom_right (const slip::PLANE_ORIENTATION p, const size_type xp)
 const_iterator3d_box element assignment operator. More...
 
difference_type operator- (const self &i1, const self &i2)
 const_iterator3d_box difference operator. More...
 

Detailed Description

template<typename T>
class slip::const_iterator3d_box< T >

This is some iterator to iterate a 3d container into a Box area defined by the subscripts of the 3d container.

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2007/12/10
Parameters
Container3DType of 3d container in the const_iterator3d_box
Description:
This iterator is an 3d 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 subscripts range of the 3d container. Those subscripts are defined as follows :
iterator3d_conventions.jpg
axis and notation conventions

Definition at line 116 of file DenseVector3dField3d.hpp.

Member Typedef Documentation

template<typename T >
typedef DPoint2d<int> slip::const_iterator3d_box< T >::diff2d

Definition at line 842 of file iterator3d_box.hpp.

template<typename T >
typedef DPoint3d<int> slip::const_iterator3d_box< T >::difference_type

Definition at line 843 of file iterator3d_box.hpp.

Definition at line 840 of file iterator3d_box.hpp.

template<typename T >
typedef Container3D::const_pointer slip::const_iterator3d_box< T >::pointer

Definition at line 844 of file iterator3d_box.hpp.

template<typename T >
typedef Container3D::const_reference slip::const_iterator3d_box< T >::reference

Definition at line 845 of file iterator3d_box.hpp.

template<typename T >
typedef const_iterator3d_box slip::const_iterator3d_box< T >::self

Definition at line 847 of file iterator3d_box.hpp.

template<typename T >
typedef Container3D::size_type slip::const_iterator3d_box< T >::size_type

Definition at line 849 of file iterator3d_box.hpp.

template<typename T >
typedef Container3D::value_type slip::const_iterator3d_box< T >::value_type

Definition at line 841 of file iterator3d_box.hpp.

Constructor & Destructor Documentation

template<typename T >
slip::const_iterator3d_box< T >::const_iterator3d_box ( )
inline

Constructs a const_iterator3d_box.

The box to iterate is in this case the full container

Definition at line 859 of file iterator3d_box.hpp.

template<typename T >
slip::const_iterator3d_box< T >::const_iterator3d_box ( Container3D *  c,
const Box3d< int > &  b 
)
inline

Constructs a const_iterator3d_box.

Parameters
cpointer to an existing 3d container
bBox3d<int> defining the range of subscripts to iterate
Precondition
box subscripts must be inside those of the 3d container

Definition at line 869 of file iterator3d_box.hpp.

template<typename T >
slip::const_iterator3d_box< T >::const_iterator3d_box ( const self o)
inline

Constructs a copy of the const_iterator3d_box o.

Parameters
oconst_iterator3d_box to copy.

Definition at line 879 of file iterator3d_box.hpp.

Member Function Documentation

template<typename T >
Container3D::const_col_iterator slip::const_iterator3d_box< T >::col_begin ( size_t  slice,
size_type  col 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
slice,sliceoffset
coloffset.
Returns
a const col_iterator to the first element of the col col and a slice of the box
Todo:
add assert

Definition at line 1359 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_col_iterator slip::const_iterator3d_box< T >::col_end ( size_t  slice,
size_type  col 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
slice,sliceoffset
coloffset.
Returns
a const col_iterator to the past-the-end element of the col col and a slice of the box
Todo:
add assert

Definition at line 1375 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::i ( ) const
inline

Access to the first subscript of the current const_iterator3d_box.

Returns
the second subscript.

Definition at line 1474 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::j ( ) const
inline

Access to the second subscript of the current const_iterator3d_box.

Returns
the third subscript.

Definition at line 1492 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::k ( ) const
inline

Access to the first subscript of the current const_iterator3d_box.

Returns
the first subscript.

Definition at line 1456 of file iterator3d_box.hpp.

template<typename T >
reference slip::const_iterator3d_box< T >::operator* ( ) const
inline

Dereference operator. Returns the element that the current const_iterator3d_box i point to.

Returns
a const const_iterator3d_box reference.

Definition at line 922 of file iterator3d_box.hpp.

template<typename T >
self slip::const_iterator3d_box< T >::operator+ ( const difference_type d)
inline

const_iterator3d_box addition.

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

Definition at line 1207 of file iterator3d_box.hpp.

template<typename T >
self& slip::const_iterator3d_box< T >::operator++ ( )
inline

Preincrement a const_iterator3d_box. Iterate to the next location inside the Box3d.

Definition at line 945 of file iterator3d_box.hpp.

template<typename T >
self slip::const_iterator3d_box< T >::operator++ ( int  )
inline

Postincrement a const_iterator3d_box. Iterate to the next location inside the Box3d.

Definition at line 987 of file iterator3d_box.hpp.

template<typename T >
self& slip::const_iterator3d_box< T >::operator+= ( const difference_type d)
inline

const_iterator3d_box addition.

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

Definition at line 1165 of file iterator3d_box.hpp.

template<typename T >
self slip::const_iterator3d_box< T >::operator- ( const difference_type d)
inline

const_iterator3d_box substraction.

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

Definition at line 1223 of file iterator3d_box.hpp.

template<typename T >
self& slip::const_iterator3d_box< T >::operator-- ( )
inline

Predecrement a const_iterator3d_box. Iterate to the previous location inside the Box3d.

Definition at line 1006 of file iterator3d_box.hpp.

template<typename T >
self slip::const_iterator3d_box< T >::operator-- ( int  )
inline

Postdecrement a const_iterator3d_box. Iterate to the previous location inside the Box3d.

Definition at line 1048 of file iterator3d_box.hpp.

template<typename T >
self& slip::const_iterator3d_box< T >::operator-= ( const difference_type d)
inline

const_iterator3d_box substraction.

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

Definition at line 1186 of file iterator3d_box.hpp.

template<typename T >
pointer slip::const_iterator3d_box< T >::operator-> ( ) const
inline

Definition at line 929 of file iterator3d_box.hpp.

template<typename T >
self& slip::const_iterator3d_box< T >::operator= ( const self o)
inline

Assign a const_iterator3d_box.

Assign elements of const_iterator3d_box in o.

Parameters
oconst_iterator3d_box to get the values from.
Returns
a const_iterator3d_box reference.

Definition at line 897 of file iterator3d_box.hpp.

template<typename T >
reference slip::const_iterator3d_box< T >::operator[] ( difference_type  d) const
inline

const_iterator3d_box element assignment operator. Equivalent to *(k + d).

Parameters
ddifference_type.
Returns
a const reference to the 3d container elements
Precondition
(k + d) exists and is dereferenceable.

Definition at line 1253 of file iterator3d_box.hpp.

template<typename T >
pointer slip::const_iterator3d_box< T >::operator[] ( diff2d  d) const
inline

const_iterator3d_box element assignment operator. Equivalent to *(k + d).

Parameters
doffset.
Returns
a const pointer to the 3d container elements
Precondition
(k + d) exists and is dereferenceable.
Postcondition
k[d] is a copy of pointer.
Todo:
add assert

Definition at line 1268 of file iterator3d_box.hpp.

template<typename T >
pointer* slip::const_iterator3d_box< T >::operator[] ( int  n) const
inline

const_iterator3d_box element assignment operator. Equivalent to *(k + n).

Parameters
noffset.
Returns
a const pointer of pointer to the 3d container elements
Precondition
(k + n) exists and is dereferenceable.
Todo:
add assert

Definition at line 1283 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_iterator2d slip::const_iterator3d_box< T >::plane_bottom_right ( const slip::PLANE_ORIENTATION  p,
const size_type  xp 
)
inline

const_iterator3d_box element assignment operator.

Parameters
pThe index of the plane axe (axe of the constant component).
xpThe constant coordinate within the box
Returns
a const_iterator2d that points to the past the end element of the plane in the box.
Todo:
add assert

Definition at line 1416 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_iterator2d slip::const_iterator3d_box< T >::plane_upper_left ( const slip::PLANE_ORIENTATION  p,
const size_type  xp 
)
inline

const_iterator3d_box element assignment operator.

Parameters
pThe index of the plane axe (axe of the constant component).
xpThe constant coordinate within the box
Returns
a const_iterator2d that points to the first element of the plane in the box. It points to the upper left element of the plane
Todo:
add assert

Definition at line 1390 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_row_iterator slip::const_iterator3d_box< T >::row_begin ( size_t  slice,
size_type  row 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
sliceslice offset
rowoffset.
Returns
a const_row_iterator to the first element of the row row and a slice of the box
Todo:
add assert

Definition at line 1327 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_row_iterator slip::const_iterator3d_box< T >::row_end ( size_t  slice,
size_type  row 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
sliceslice offset
rowoffset.
Returns
a const_row_iterator to the past-the-end element of the row row and a slice of the box
Todo:
add assert

Definition at line 1343 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_slice_iterator slip::const_iterator3d_box< T >::slice_begin ( size_type  row,
size_type  col 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
rowoffset.
coloffset
Returns
a const_slice_iterator to the first element of the line (row,col) threw the slices in the box.
Todo:
add assert

Definition at line 1297 of file iterator3d_box.hpp.

template<typename T >
Container3D::const_slice_iterator slip::const_iterator3d_box< T >::slice_end ( size_type  row,
size_type  col 
) const
inline

const_iterator3d_box element assignment operator.

Parameters
rowrow offset.
colcol offset.
Returns
a const_slice_iterator to the last element of line (row,col) threw the slices in the box.
Todo:
add assert

Definition at line 1312 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::x1 ( ) const
inline

Access to the first subscript of the current const_iterator3d_box.

Returns
the first subscript.

Definition at line 1447 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::x2 ( ) const
inline

Access to the first subscript of the current const_iterator3d_box.

Returns
the second subscript.

Definition at line 1465 of file iterator3d_box.hpp.

template<typename T >
int slip::const_iterator3d_box< T >::x3 ( ) const
inline

Access to the second subscript of the current const_iterator3d_box.

Returns
the third subscript.

Definition at line 1483 of file iterator3d_box.hpp.

Friends And Related Function Documentation

template<typename T >
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

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

Definition at line 1084 of file iterator3d_box.hpp.

template<typename T >
difference_type operator- ( const self i1,
const self i2 
)
friend

const_iterator3d_box difference operator.

Parameters
i1first const_iterator3d_box.
i2second const_iterator3d_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 1239 of file iterator3d_box.hpp.

template<typename T >
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

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

Definition at line 1103 of file iterator3d_box.hpp.

template<typename T >
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

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

Definition at line 1131 of file iterator3d_box.hpp.

template<typename T >
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

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

Definition at line 1069 of file iterator3d_box.hpp.

template<typename T >
bool operator> ( const self i1,
const self i2 
)
friend

operator.

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

Definition at line 1117 of file iterator3d_box.hpp.

template<typename T >
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

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

Definition at line 1145 of file iterator3d_box.hpp.


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