1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
// All rights reserved.
//
// This file is part of CGAL (www.cgal.org)
//
// $URL: https://github.com/CGAL/cgal/blob/v6.1.1/Combinatorial_map/include/CGAL/Cell_const_iterators.h $
// $Id: include/CGAL/Cell_const_iterators.h 08b27d3db14 $
// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial
//
// Author(s) : Guillaume Damiand <guillaume.damiand@liris.cnrs.fr>
//
#ifndef CGAL_CELL_CONST_ITERATORS_H
#define CGAL_CELL_CONST_ITERATORS_H 1
#include <CGAL/Cell_iterators.h>
// TODO do all the orbit iterator of any orbit ?
namespace CGAL {
/** @file Cell_const_iterators.h
* The cell const iterators. There are 3 classes:
* - CMap_cell_const_iterator<Map,Ite,i,dim>
* - CMap_one_dart_per_incident_cell_const_iterator<Map,Ite,i,dim>
* - CMap_one_dart_per_cell_const_iterator<Map,Ite,i,dim>
*/
//****************************************************************************
template <typename Map_,typename Ite,
unsigned int i,unsigned int dim=Map_::dimension>
class CMap_cell_const_iterator: public CMap_cell_iterator<Map_,Ite,i,dim,true>
{
public:
typedef CMap_cell_iterator<Map_,Ite,i,dim,true> Base;
typedef typename Map_::Dart_const_descriptor Dart_const_descriptor;
/// Main constructor.
CMap_cell_const_iterator(const Map_& amap,
Dart_const_descriptor adart):
Base(amap,adart)
{}
/// Constructor from non const version.
CMap_cell_const_iterator
(const CMap_cell_iterator<Map_,Ite,i,dim,false>& it):
Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
it.get_first_dart())
{}
};
//****************************************************************************
template <typename Map_,unsigned int i,unsigned int j,
unsigned int dim=Map_::dimension>
class CMap_one_dart_per_incident_cell_const_iterator:
public CMap_one_dart_per_incident_cell_iterator<Map_,i,j,dim,true>
{
public:
typedef CMap_one_dart_per_incident_cell_iterator<Map_,i,j,dim,true> Base;
typedef typename Map_::Dart_const_descriptor Dart_const_descriptor;
/// Main constructor.
CMap_one_dart_per_incident_cell_const_iterator(const Map_& amap,
Dart_const_descriptor adart):
Base(amap, adart)
{}
/// Constructor from non const version.
CMap_one_dart_per_incident_cell_const_iterator
(const CMap_one_dart_per_incident_cell_iterator<Map_,i,j,dim,false>& it):
Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
it.get_first_dart())
{}
};
//****************************************************************************
template <typename Map_,unsigned int i,unsigned int dim=Map_::dimension>
class CMap_one_dart_per_cell_const_iterator:
public CMap_one_dart_per_cell_iterator<Map_,i,dim,true>
{
public:
typedef CMap_one_dart_per_cell_iterator<Map_,i,dim,true> Base;
typedef typename Map_::Dart_const_descriptor Dart_const_descriptor;
/// Main constructor.
CMap_one_dart_per_cell_const_iterator(const Map_& amap): Base(amap)
{}
/// Constructor with a dart in parameter (for end iterator).
CMap_one_dart_per_cell_const_iterator(const Map_& amap,
Dart_const_descriptor adart):
Base(amap, adart)
{}
/// Constructor from non const version.
CMap_one_dart_per_cell_const_iterator
(const CMap_one_dart_per_cell_iterator<Map_,i,dim,false>& it):
Base(*const_cast<const Map_*>(it.get_combinatorial_map()),
it.get_first_dart())
{}
};
//****************************************************************************
//****************************************************************************
} // namespace CGAL
//******************************************************************************
#endif // CGAL_CELL_CONST_ITERATORS_H
//******************************************************************************
|