dust3d/thirdparty/cgal/CGAL-5.1/include/CGAL/Cell_const_iterators.h

101 lines
4.0 KiB
C
Raw Normal View History

// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France).
// All rights reserved.
//
2020-10-13 12:44:25 +00:00
// This file is part of CGAL (www.cgal.org)
//
2020-10-13 12:44:25 +00:00
// $URL: https://github.com/CGAL/cgal/blob/v5.1/Combinatorial_map/include/CGAL/Cell_const_iterators.h $
// $Id: Cell_const_iterators.h 0779373 2020-03-26T13:31:46+01:00 Sébastien Loriot
// 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>
*/
//****************************************************************************
2020-10-13 12:44:25 +00:00
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_handle Dart_const_handle;
/// Main constructor.
2020-10-13 12:44:25 +00:00
CMap_cell_const_iterator(const Map_& amap,
Dart_const_handle adart):
2020-10-13 12:44:25 +00:00
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())
{}
};
//****************************************************************************
2020-10-13 12:44:25 +00:00
template <typename Map_,unsigned int i,unsigned int j,
unsigned int dim=Map_::dimension>
2020-10-13 12:44:25 +00:00
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_handle Dart_const_handle;
/// Main constructor.
2020-10-13 12:44:25 +00:00
CMap_one_dart_per_incident_cell_const_iterator(const Map_& amap,
Dart_const_handle 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_handle Dart_const_handle;
/// Main constructor.
CMap_one_dart_per_cell_const_iterator(const Map_& amap): Base(amap)
{}
/// Constructor with a dart in parameter (for end iterator).
2020-10-13 12:44:25 +00:00
CMap_one_dart_per_cell_const_iterator(const Map_& amap,
Dart_const_handle 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
//******************************************************************************