// Copyright (c) 2016 CNRS and LIRIS' Establishments (France). // All rights reserved. // // This file is part of CGAL (www.cgal.org) // // $URL: https://github.com/CGAL/cgal/blob/v5.2/Generalized_map/include/CGAL/GMap_cell_const_iterators.h $ // $Id: GMap_cell_const_iterators.h 52164b1 2019-10-19T15:34:59+02:00 Sébastien Loriot // SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial // // Author(s) : Guillaume Damiand // #ifndef CGAL_GMAP_CELL_CONST_ITERATORS_H #define CGAL_GMAP_CELL_CONST_ITERATORS_H 1 #include // TODO do all the orbit iterator of any orbit ? namespace CGAL { /** @file GMap_cell_const_iterators.h * The cell const iterators. There are 3 classes: * - GMap_cell_const_iterator * - GMap_one_dart_per_incident_cell_const_iterator * - GMap_one_dart_per_cell_const_iterator */ //**************************************************************************** template class GMap_cell_const_iterator: public GMap_cell_iterator { public: typedef GMap_cell_iterator Base; typedef typename Map_::Dart_const_handle Dart_const_handle; /// Main constructor. GMap_cell_const_iterator(const Map_& amap, Dart_const_handle adart): Base(amap,adart) {} /// Constructor from non const version. GMap_cell_const_iterator (const GMap_cell_iterator& it): Base(*const_cast(it.get_combinatorial_map()), it.get_first_dart()) {} }; //**************************************************************************** template class GMap_one_dart_per_incident_cell_const_iterator: public GMap_one_dart_per_incident_cell_iterator { public: typedef GMap_one_dart_per_incident_cell_iterator Base; typedef typename Map_::Dart_const_handle Dart_const_handle; /// Main constructor. GMap_one_dart_per_incident_cell_const_iterator(const Map_& amap, Dart_const_handle adart): Base(amap, adart) {} /// Constructor from non const version. GMap_one_dart_per_incident_cell_const_iterator (const GMap_one_dart_per_incident_cell_iterator& it): Base(*const_cast(it.get_combinatorial_map()), it.get_first_dart()) {} }; //**************************************************************************** template class GMap_one_dart_per_cell_const_iterator: public GMap_one_dart_per_cell_iterator { public: typedef GMap_one_dart_per_cell_iterator Base; typedef typename Map_::Dart_const_handle Dart_const_handle; /// Main constructor. GMap_one_dart_per_cell_const_iterator(const Map_& amap): Base(amap) {} /// Constructor with a dart in parameter (for end iterator). GMap_one_dart_per_cell_const_iterator(const Map_& amap, Dart_const_handle adart): Base(amap) { this->set_current_dart(adart); } /// Constructor from non const version. GMap_one_dart_per_cell_const_iterator (const GMap_one_dart_per_cell_iterator& it): Base(*const_cast(it.get_combinatorial_map())) {} }; //**************************************************************************** //**************************************************************************** } // namespace CGAL //****************************************************************************** #endif // CGAL_GMAP_CELL_CONST_ITERATORS_H //******************************************************************************