Navigation: Up, Table of Contents, Bibliography, Index, Title Page

N-Step Iterator or Circulator Adaptor

Definition

The adaptor CGAL_N_step_adaptor<I,int N,Ref,Ptr,Val,Dst,Ctg> changes the step width of the iterator or circulator class I to N. It is itself an iterator or circulator respectively. The value type is Val and the distance type is Dst. The iterator category is Ctg. For a mutable iterator, the parameters Ref and Ptr must be set to Val& and Val* respectively. For a non-mutable iterator the types must be set to const Val& and const Val* respectively. With iterator traits classes Val, Dst and Ctg will be superfluous.

The behavior is undefined if the adaptor is used on a range [i,j) where j-i is not a multiple of n.

#include <CGAL/N_step_adaptor.h>

Creation

CGAL_N_step_adaptor<I,int N,Ref,Ptr,Val,Dst,Ctg> i ( I j);
down cast.

Operations

The adaptor conforms to the iterator or circulator category stated with the parameter Ctg. Precondition: The iterator or circulator I must be at least of this category.

Implementation

For compiler with difficulties with implicit instantiation (the CGAL_CFG_NO_LAZY_INSTANTIATION flag) the adaptor is predefined to work only for bidirectional iterators.


Next: Class declaration of CGAL_Inverse_index<IC>
Navigation: Up, Table of Contents, Bibliography, Index, Title Page
The CGAL Project. 22 January 1999.