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::iterator3d_plane< Container3D > Class Template Reference

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

#include <iterator3d_plane.hpp>

Public Types

typedef
std::random_access_iterator2d_tag 
iterator_category
 
typedef Container3D::value_type value_type
 
typedef DPoint2d< int > difference_type
 
typedef Container3D::pointer pointer
 
typedef Container3D::reference reference
 
typedef iterator3d_plane self
 
typedef Container3D::size_type size_type
 

Public Member Functions

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

iterator3d_plane operators addons

selfoperator+= (const difference_type &d)
 iterator3d_plane addition. More...
 
selfoperator-= (const difference_type &d)
 iterator3d_plane substraction. More...
 
self operator+ (const difference_type &d)
 iterator3d_plane addition. More...
 
self operator- (const difference_type &d)
 iterator3d_plane substraction. More...
 
reference operator[] (difference_type d)
 iterator3d_plane element assignment operator. Equivalent to *(k + d) = t. More...
 
pointeroperator[] (int n)
 iterator3d_plane element assignment operator. Equivalent to *(k + n). More...
 
difference_type operator- (const self &i1, const self &i2)
 iterator3d_plane difference operator. More...
 

Detailed Description

template<class Container3D>
class slip::iterator3d_plane< Container3D >

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

Author
Denis Arrivault <arrivault_AT_sic.univ-poitiers.fr>
Version
0.0.1
Date
2008/01/09
Parameters
Container3DType of 3d container in the iterator3d_plane
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 plane area defined inside the subscripts range of the 3d container. Those subscripts are defined as follows :
iterator3d_plane_conventions.jpg
axis and notation conventions

Definition at line 137 of file iterator3d_plane.hpp.

Member Typedef Documentation

template<class Container3D >
typedef DPoint2d<int> slip::iterator3d_plane< Container3D >::difference_type

Definition at line 171 of file iterator3d_plane.hpp.

template<class Container3D >
typedef std::random_access_iterator2d_tag slip::iterator3d_plane< Container3D >::iterator_category

Definition at line 169 of file iterator3d_plane.hpp.

template<class Container3D >
typedef Container3D::pointer slip::iterator3d_plane< Container3D >::pointer

Definition at line 172 of file iterator3d_plane.hpp.

template<class Container3D >
typedef Container3D::reference slip::iterator3d_plane< Container3D >::reference

Definition at line 173 of file iterator3d_plane.hpp.

template<class Container3D >
typedef iterator3d_plane slip::iterator3d_plane< Container3D >::self

Definition at line 175 of file iterator3d_plane.hpp.

template<class Container3D >
typedef Container3D::size_type slip::iterator3d_plane< Container3D >::size_type

Definition at line 177 of file iterator3d_plane.hpp.

template<class Container3D >
typedef Container3D::value_type slip::iterator3d_plane< Container3D >::value_type

Definition at line 170 of file iterator3d_plane.hpp.

Constructor & Destructor Documentation

template<class Container3D >
slip::iterator3d_plane< Container3D >::iterator3d_plane ( )
inline

Constructs a iterator3d_plane.

The box to iterate is in this case the full container

Definition at line 187 of file iterator3d_plane.hpp.

template<class Container3D >
slip::iterator3d_plane< Container3D >::iterator3d_plane ( Container3D *  c,
PLANE_ORIENTATION  P,
const int  plane_coordinate,
const Box2d< int > &  b 
)
inline

Constructs a iterator3d_plane.

Parameters
cpointer to an existing 3d container
Pnumber of the zero dimension (the axe that is perpendicular to the plane of b)
plane_coordinatecoordinate of the plane along the zero dimension axe
bBox2d<int> defining the range of the plane to iterate
Precondition
box subscripts must be inside those of the 3d container
P has to be PLANE_ORIENTATION type or 0,1 or 2
plane_coordinate must be within the range of c

Definition at line 202 of file iterator3d_plane.hpp.

template<class Container3D >
slip::iterator3d_plane< Container3D >::iterator3d_plane ( Container3D *  c,
const Box3d< int > &  b 
)
inline

Constructs a iterator3d_plane.

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

Definition at line 216 of file iterator3d_plane.hpp.

template<class Container3D >
slip::iterator3d_plane< Container3D >::iterator3d_plane ( const self o)
inline

Constructs a copy of the iterator3d_plane o.

Parameters
oiterator3d_plane to copy.

Definition at line 250 of file iterator3d_plane.hpp.

Member Function Documentation

template<class Container3D >
reference slip::iterator3d_plane< Container3D >::operator* ( )
inline

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

Returns
a iterator3d_plane reference.

Definition at line 291 of file iterator3d_plane.hpp.

template<class Container3D >
const reference slip::iterator3d_plane< Container3D >::operator* ( ) const
inline

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

Returns
a const iterator3d_plane reference.

Definition at line 305 of file iterator3d_plane.hpp.

template<class Container3D >
self slip::iterator3d_plane< Container3D >::operator+ ( const difference_type d)
inline

iterator3d_plane addition.

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

Definition at line 566 of file iterator3d_plane.hpp.

template<class Container3D >
self& slip::iterator3d_plane< Container3D >::operator++ ( )
inline

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

Definition at line 334 of file iterator3d_plane.hpp.

template<class Container3D >
self slip::iterator3d_plane< Container3D >::operator++ ( int  )
inline

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

Definition at line 362 of file iterator3d_plane.hpp.

template<class Container3D >
self& slip::iterator3d_plane< Container3D >::operator+= ( const difference_type d)
inline

iterator3d_plane addition.

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

Definition at line 530 of file iterator3d_plane.hpp.

template<class Container3D >
self slip::iterator3d_plane< Container3D >::operator- ( const difference_type d)
inline

iterator3d_plane substraction.

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

Definition at line 581 of file iterator3d_plane.hpp.

template<class Container3D >
self& slip::iterator3d_plane< Container3D >::operator-- ( )
inline

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

Definition at line 381 of file iterator3d_plane.hpp.

template<class Container3D >
self slip::iterator3d_plane< Container3D >::operator-- ( int  )
inline

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

Definition at line 410 of file iterator3d_plane.hpp.

template<class Container3D >
self& slip::iterator3d_plane< Container3D >::operator-= ( const difference_type d)
inline

iterator3d_plane substraction.

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

Definition at line 548 of file iterator3d_plane.hpp.

template<class Container3D >
pointer slip::iterator3d_plane< Container3D >::operator-> ( ) const
inline

Definition at line 312 of file iterator3d_plane.hpp.

template<class Container3D >
pointer slip::iterator3d_plane< Container3D >::operator-> ( )
inline

Definition at line 318 of file iterator3d_plane.hpp.

template<class Container3D >
self& slip::iterator3d_plane< Container3D >::operator= ( const self o)
inline

Assign a iterator3d_plane.

Assign elements of iterator3d_plane in o.

Parameters
oiterator3d_plane to get the values from.
Returns
a iterator3d_plane reference.

Definition at line 268 of file iterator3d_plane.hpp.

template<class Container3D >
reference slip::iterator3d_plane< Container3D >::operator[] ( difference_type  d)
inline

iterator3d_plane element assignment operator. Equivalent to *(k + d) = t.

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

Definition at line 612 of file iterator3d_plane.hpp.

template<class Container3D >
pointer* slip::iterator3d_plane< Container3D >::operator[] ( int  n)
inline

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

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

Definition at line 631 of file iterator3d_plane.hpp.

template<class Container3D >
int slip::iterator3d_plane< Container3D >::x1 ( ) const
inline

Access to the first subscript of the current iterator3d_plane.

Returns
the first subscript.

Definition at line 651 of file iterator3d_plane.hpp.

template<class Container3D >
int slip::iterator3d_plane< Container3D >::x2 ( ) const
inline

Access to the second subscript of the current iterator3d_plane.

Returns
the second subscript.

Definition at line 661 of file iterator3d_plane.hpp.

template<class Container3D >
int slip::iterator3d_plane< Container3D >::xp ( ) const
inline

Access to the plane subscript of the current iterator3d_plane.

Returns
the third subscript.

Definition at line 671 of file iterator3d_plane.hpp.

template<class Container3D >
int slip::iterator3d_plane< Container3D >::zerodim ( ) const
inline

Access to the plane axe number of the current iterator3d_plane.

Returns
the third subscript.

Definition at line 680 of file iterator3d_plane.hpp.

Friends And Related Function Documentation

template<class Container3D >
bool operator!= ( const self i1,
const self i2 
)
friend

Inequality operator.

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

Definition at line 447 of file iterator3d_plane.hpp.

template<class Container3D >
difference_type operator- ( const self i1,
const self i2 
)
friend

iterator3d_plane difference operator.

Parameters
i1first iterator3d_plane.
i2second iterator3d_plane.
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 596 of file iterator3d_plane.hpp.

template<class Container3D >
bool operator< ( const self i1,
const self i2 
)
friend

< operator.

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

Definition at line 467 of file iterator3d_plane.hpp.

template<class Container3D >
bool operator<= ( const self i1,
const self i2 
)
friend

<= operator.

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

Definition at line 495 of file iterator3d_plane.hpp.

template<class Container3D >
bool operator== ( const self i1,
const self i2 
)
friend

Equality operator.

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

Definition at line 431 of file iterator3d_plane.hpp.

template<class Container3D >
bool operator> ( const self i1,
const self i2 
)
friend

operator.

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

Definition at line 481 of file iterator3d_plane.hpp.

template<class Container3D >
bool operator>= ( const self i1,
const self i2 
)
friend

>= operator.

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

Definition at line 509 of file iterator3d_plane.hpp.


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