diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 0fb1e00a2c9..05c0b521736 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -14,6 +14,8 @@ #include +#include + #include #include #include @@ -80,14 +82,8 @@ namespace CGAL { * mainly to create darts, to use marks onto these darts, to get and set * the beta links, and to manage enabled attributes. */ - template < unsigned int d_, class Refs, -#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) - class Items_=Combinatorial_map_min_items, -#else - class Items_=Generic_map_min_items, -#endif - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Combinatorial_map_storage_1 > + template < unsigned int d_, class Refs_, class Items_, + class Alloc_, class Storage_ > class Combinatorial_map_base: public Storage_ { template @@ -114,9 +110,10 @@ namespace CGAL { typedef Combinatorial_map_tag Combinatorial_data_structure; /// Types definition - typedef Storage_ Storage; - typedef Storage Base; - typedef Combinatorial_map_base Self; + typedef Storage_ Storage; + typedef Storage Base; + typedef Combinatorial_map_base Self; + typedef Refs_ Refs; typedef typename Base::Dart Dart; typedef typename Base::Dart_handle Dart_handle; typedef typename Base::Dart_const_handle Dart_const_handle; @@ -211,28 +208,24 @@ namespace CGAL { CGAL_assertion(number_of_darts()==0); } - + /** Copy the given combinatorial map 'amap' into *this. * Note that both CMap can have different dimensions and/or non void attributes. + * Here CMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle. + * This is the "generic" method, called by the different variants below. * @param amap the combinatorial map to copy. * @post *this is valid. */ - template - void copy(Combinatorial_map_base& amap, - const Converters& converters, - const DartInfoConverter& dartinfoconverter, - const PointConverter& pointconverter, - boost::unordered_map - :: - Dart_handle, Dart_handle>* origin_to_copy, - boost::unordered_map - ::Dart_handle>* copy_to_origin) + void generic_copy(CMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, + boost::unordered_map* origin_to_copy=nullptr, + boost::unordered_map* copy_to_origin=nullptr) { - typedef Combinatorial_map_base CMap2; this->clear(); this->mnb_used_marks = amap.mnb_used_marks; @@ -254,15 +247,13 @@ namespace CGAL { // Create an mapping between darts of the two maps (originals->copies). // (here we cannot use CGAL::Unique_hash_map because it does not provide // iterators... - boost::unordered_map - local_dartmap; - if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map + boost::unordered_map local_dartmap; + if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } Dart_handle new_dart; - for (typename CMap2::Dart_range::iterator - it=amap.darts().begin(), itend=amap.darts().end(); - it!=itend; ++it) + for (typename CMap2::Dart_range::iterator it=amap.darts().begin(), + itend=amap.darts().end(); it!=itend; ++it) { new_dart=mdarts.emplace(); init_dart(new_dart, amap.get_marks(it)); @@ -270,15 +261,16 @@ namespace CGAL { (*origin_to_copy)[it]=new_dart; if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } - internal::Copy_dart_info_functor::run - (static_cast(amap), static_cast(*this), + internal::Copy_dart_info_functor + ::run + (static_cast(amap), static_cast(*this), it, new_dart, dartinfoconverter); } unsigned int min_dim=(dimension - ::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); + typename boost::unordered_map::iterator + dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) { @@ -298,9 +290,9 @@ namespace CGAL { ++dartmap_iter) { Helper::template Foreach_enabled_attributes - < internal::Copy_attributes_functor >:: - run(static_cast(amap), static_cast(*this), + < internal::Copy_attributes_functor >:: + run(static_cast(amap), static_cast(*this), dartmap_iter->first, dartmap_iter->second, converters, pointconverter); } @@ -308,61 +300,124 @@ namespace CGAL { CGAL_assertion (is_valid()); } - template - void copy(Combinatorial_map_base& amap, - boost::unordered_map - ::Dart_handle, Dart_handle>* origin_to_copy, - boost::unordered_map - ::Dart_handle>* copy_to_origin) - - { - CGAL::cpp11::tuple<> converters; - Default_converter_dart_info dartinfoconverter; - Default_converter_cmap_0attributes_with_point pointconverter; - copy(amap, converters, dartinfoconverter, pointconverter, - origin_to_copy, copy_to_origin); - } - - template - void copy(Combinatorial_map_base& amap, + // (1a) copy(amap, converters, dartinfoconverter, pointconverter) + template + void copy(CMap2& amap, const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, boost::unordered_map - ::Dart_handle, Dart_handle>* origin_to_copy, + * origin_to_copy=nullptr, boost::unordered_map - ::Dart_handle>* copy_to_origin) + * copy_to_origin=nullptr) { - Default_converter_cmap_0attributes_with_point pointconverter; - Default_converter_dart_info dartinfoconverter; - copy(amap, converters, dartinfoconverter, pointconverter, + generic_copy + (amap, converters, dartinfoconverter, pointconverter, origin_to_copy, copy_to_origin); } - template - void copy(Combinatorial_map_base& amap, + // (1b) copy(const amap, converters, dartinfoconverter, pointconverter) + template + void copy(const CMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + generic_copy + (const_cast(amap), converters, dartinfoconverter, + pointconverter, origin_to_copy, copy_to_origin); + } + + // (2a) copy(amap, converters, dartinfoconverter) + template + void copy(CMap2& amap, const Converters& converters, const DartInfoConverter& dartinfoconverter, boost::unordered_map - ::Dart_handle, Dart_handle>* origin_to_copy, + * origin_to_copy=nullptr, boost::unordered_map - ::Dart_handle>* copy_to_origin) + * copy_to_origin=nullptr) { - Default_converter_cmap_0attributes_with_point pointconverter; + Default_converter_cmap_0attributes_with_point + pointconverter; copy(amap, converters, dartinfoconverter, pointconverter, origin_to_copy, copy_to_origin); } + // (2b) copy(const amap, converters, dartinfoconverter) + template + void copy(const CMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_cmap_0attributes_with_point + pointconverter; + copy(amap, converters, dartinfoconverter, pointconverter, + origin_to_copy, copy_to_origin); + } + + // (3a) copy(amap, converters) + template + void copy(CMap2& amap, + const Converters& converters, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_dart_info dartinfoconverter; + copy(amap, converters, dartinfoconverter, origin_to_copy, copy_to_origin); + } + + // (3b) copy(const amap, converters) + template + void copy(const CMap2& amap, + const Converters& converters, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_dart_info dartinfoconverter; + copy(amap, converters, dartinfoconverter, origin_to_copy, copy_to_origin); + } + + // (4a) copy(amap) + template + void copy(CMap2& amap, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + CGAL::cpp11::tuple<> converters; + copy(amap, converters, origin_to_copy, copy_to_origin); + } + + // (4b) copy(const amap) + template + void copy(const CMap2& amap, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + CGAL::cpp11::tuple<> converters; + copy(amap, converters, origin_to_copy, copy_to_origin); + } + // Copy constructor from a map having exactly the same type. Combinatorial_map_base (const Self & amap) { copy(amap); } @@ -4648,14 +4703,7 @@ namespace CGAL { typename Helper::Merge_functors m_onmerge_functors; }; - template < unsigned int d_, -#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) - class Items_=Combinatorial_map_min_items, -#else - class Items_=Generic_map_min_items, -#endif - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Combinatorial_map_storage_1 > + template < unsigned int d_, class Items_, class Alloc_, class Storage_ > class Combinatorial_map : public Combinatorial_map_base, diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_fwd.h b/Combinatorial_map/include/CGAL/Combinatorial_map_fwd.h new file mode 100644 index 00000000000..191b1ea9a9e --- /dev/null +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_fwd.h @@ -0,0 +1,51 @@ +// Copyright (c) 2010-2011 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef COMBINATORIAL_MAP_FWD_H +#define COMBINATORIAL_MAP_FWD_H 1 + +#include + +namespace CGAL { + +#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) +template +struct Combinatorial_map_min_items; +#else +struct Generic_map_min_items; +#endif + +template +class Combinatorial_map_storage_1; + +template < unsigned int d_, class Refs_, +#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) + class Items_=Combinatorial_map_min_items, +#else + class Items_=Generic_map_min_items, +#endif + class Alloc_=CGAL_ALLOCATOR(int), + class Storage_= Combinatorial_map_storage_1 > +class Combinatorial_map_base; + +template < unsigned int d_, +#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) + class Items_=Combinatorial_map_min_items, +#else + class Items_=Generic_map_min_items, +#endif + class Alloc_=CGAL_ALLOCATOR(int), + class Storage_= Combinatorial_map_storage_1 > +class Combinatorial_map; + +} // CGAL + +#endif // COMBINATORIAL_MAP_FWD_H diff --git a/Combinatorial_map/include/CGAL/Face_graph_wrapper.h b/Combinatorial_map/include/CGAL/Face_graph_wrapper.h index dd643cd1fc9..bd4cb728a23 100644 --- a/Combinatorial_map/include/CGAL/Face_graph_wrapper.h +++ b/Combinatorial_map/include/CGAL/Face_graph_wrapper.h @@ -17,54 +17,14 @@ #include #include #include +#include +#include +#include +#include #include namespace CGAL { - // Forward declarations of all classes model of Face_graph - template - class Combinatorial_map_base; - - template - class Generalized_map_base; - - template - class Map, typename Refs, typename Storage> - class Linear_cell_complex_base; - - template - class Combinatorial_map; - - template - class Generalized_map; - - template - class Map, typename Storage> - class Linear_cell_complex_for_combinatorial_map; - - template - class Map, typename Storage> - class Linear_cell_complex_for_generalized_map; - - namespace Surface_mesh_topology - { - template - class Polygonal_schema_with_combinatorial_map; - - template - class Polygonal_schema_with_generalized_map; - } - //////////////////////////////////////////////////////////////////////////////// /** Class Face_graph_wrapper: to wrap any model of FaceGraph into a * Combinatorial map. For now, only for const models, i.e. does not support @@ -77,6 +37,7 @@ public: typedef HEG_ HEG; typedef Face_graph_wrapper Self; typedef std::size_t size_type; + typedef Self Refs; struct Dart_container { diff --git a/Generalized_map/include/CGAL/Generalized_map.h b/Generalized_map/include/CGAL/Generalized_map.h index 74979f1f114..342c6c7d7da 100644 --- a/Generalized_map/include/CGAL/Generalized_map.h +++ b/Generalized_map/include/CGAL/Generalized_map.h @@ -12,6 +12,7 @@ #ifndef CGAL_GENERALIZED_MAP_H #define CGAL_GENERALIZED_MAP_H 1 +#include #include #include #include @@ -58,10 +59,7 @@ namespace CGAL { * mainly to create darts, to use marks onto these darts, to get and set * the alpha links, and to manage enabled attributes. */ - template < unsigned int d_, class Refs, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Generalized_map_storage_1 > + template class Generalized_map_base: public Storage_ { template @@ -84,9 +82,10 @@ namespace CGAL { typedef Generalized_map_tag Combinatorial_data_structure; /// Types definition - typedef Storage_ Storage; - typedef Storage Base; - typedef Generalized_map_base Self; + typedef Storage_ Storage; + typedef Storage Base; + typedef Generalized_map_base Self; + typedef Refs_ Refs; typedef typename Base::Dart Dart; typedef typename Base::Dart_handle Dart_handle; @@ -178,25 +177,21 @@ namespace CGAL { /** Copy the given generalized map into *this. * Note that both Gmap can have different dimensions and/or non void attributes. + * Here CMap2 is necessarily non const; while Dart_handle_2 can be a const or non const handle. + * This is the "generic" method, called by the different variants below. * @param amap the generalized map to copy. * @post *this is valid. */ - template - void copy(Generalized_map_base& amap, - const Converters& converters, - const DartInfoConverter& dartinfoconverter, - const PointConverter& pointconverter, - boost::unordered_map - :: - Dart_handle, Dart_handle>* origin_to_copy, - boost::unordered_map - ::Dart_handle>* copy_to_origin) + void generic_copy(GMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, + boost::unordered_map* origin_to_copy=nullptr, + boost::unordered_map* copy_to_origin=nullptr) { - typedef Generalized_map_base GMap2; this->clear(); this->mnb_used_marks = amap.mnb_used_marks; @@ -216,15 +211,13 @@ namespace CGAL { // Create an mapping between darts of the two maps (originals->copies). // (here we cannot use CGAL::Unique_hash_map because it does not provide // iterators... - boost::unordered_map - local_dartmap; - if (origin_to_copy==NULL) // Used local_dartmap if user does not provides its own unordered_map + boost::unordered_map local_dartmap; + if (origin_to_copy==NULL) // Use local_dartmap if user does not provides its own unordered_map { origin_to_copy=&local_dartmap; } Dart_handle new_dart; - for (typename GMap2::Dart_range::iterator - it=amap.darts().begin(), itend=amap.darts().end(); - it!=itend; ++it) + for (typename GMap2::Dart_range::iterator it=amap.darts().begin(), + itend=amap.darts().end(); it!=itend; ++it) { new_dart=mdarts.emplace(); init_dart(new_dart, amap.get_marks(it)); @@ -232,15 +225,16 @@ namespace CGAL { (*origin_to_copy)[it]=new_dart; if (copy_to_origin!=NULL) { (*copy_to_origin)[new_dart]=it; } - internal::Copy_dart_info_functor:: - run(static_cast(amap), static_cast(*this), - it, new_dart, dartinfoconverter); + internal::Copy_dart_info_functor + ::run + (static_cast(amap), static_cast(*this), + it, new_dart, dartinfoconverter); } unsigned int min_dim=(dimension - ::iterator dartmap_iter, dartmap_iter_end=origin_to_copy->end(); + typename boost::unordered_map::iterator + dartmap_iter, dartmap_iter_end=origin_to_copy->end(); for (dartmap_iter=origin_to_copy->begin(); dartmap_iter!=dartmap_iter_end; ++dartmap_iter) { @@ -260,9 +254,9 @@ namespace CGAL { ++dartmap_iter) { Helper::template Foreach_enabled_attributes - < internal::Copy_attributes_functor >:: - run(static_cast(amap), static_cast(*this), + < internal::Copy_attributes_functor >:: + run(static_cast(amap), static_cast(*this), dartmap_iter->first, dartmap_iter->second, converters, pointconverter); } @@ -270,58 +264,124 @@ namespace CGAL { CGAL_assertion(is_valid()); } - template - void copy(Generalized_map_base& amap, - boost::unordered_map - :: - Dart_handle, Dart_handle>* origin_to_copy, - boost::unordered_map - ::Dart_handle>* copy_to_origin) - { - CGAL::cpp11::tuple<> converters; - Default_converter_dart_info dartinfoconverter; - Default_converter_cmap_0attributes_with_point pointconverter; - copy(amap, converters, dartinfoconverter, pointconverter, - origin_to_copy, copy_to_origin); - } - - template - void copy(Generalized_map_base& amap, + // (1a) copy(amap, converters, dartinfoconverter, pointconverter) + template + void copy(GMap2& amap, const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, boost::unordered_map - :: - Dart_handle, Dart_handle>* origin_to_copy, + * origin_to_copy=nullptr, boost::unordered_map - ::Dart_handle>* copy_to_origin) + * copy_to_origin=nullptr) { - Default_converter_cmap_0attributes_with_point pointconverter; - Default_converter_dart_info dartinfoconverter; - copy(amap, converters, dartinfoconverter, pointconverter, + generic_copy + (amap, converters, dartinfoconverter, pointconverter, origin_to_copy, copy_to_origin); } - template - void copy(Generalized_map_base& amap, + // (1b) copy(const amap, converters, dartinfoconverter, pointconverter) + template + void copy(const GMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + const PointConverter& pointconverter, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + generic_copy + (const_cast(amap), converters, dartinfoconverter, + pointconverter, origin_to_copy, copy_to_origin); + } + + // (2a) copy(amap, converters, dartinfoconverter) + template + void copy(GMap2& amap, const Converters& converters, const DartInfoConverter& dartinfoconverter, boost::unordered_map - :: - Dart_handle, Dart_handle>* origin_to_copy, + * origin_to_copy=nullptr, boost::unordered_map - ::Dart_handle>* copy_to_origin) + * copy_to_origin=nullptr) { - Default_converter_cmap_0attributes_with_point pointconverter; + Default_converter_cmap_0attributes_with_point + pointconverter; copy(amap, converters, dartinfoconverter, pointconverter, origin_to_copy, copy_to_origin); } + // (2b) copy(const amap, converters, dartinfoconverter) + template + void copy(const GMap2& amap, + const Converters& converters, + const DartInfoConverter& dartinfoconverter, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_cmap_0attributes_with_point + pointconverter; + copy(amap, converters, dartinfoconverter, pointconverter, + origin_to_copy, copy_to_origin); + } + + // (3a) copy(amap, converters) + template + void copy(GMap2& amap, + const Converters& converters, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_dart_info dartinfoconverter; + copy(amap, converters, dartinfoconverter, origin_to_copy, copy_to_origin); + } + + // (3b) copy(const amap, converters) + template + void copy(const GMap2& amap, + const Converters& converters, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + Default_converter_dart_info dartinfoconverter; + copy(amap, converters, dartinfoconverter, origin_to_copy, copy_to_origin); + } + + // (4a) copy(amap) + template + void copy(GMap2& amap, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + CGAL::cpp11::tuple<> converters; + copy(amap, converters, origin_to_copy, copy_to_origin); + } + + // (4b) copy(const amap) + template + void copy(const GMap2& amap, + boost::unordered_map + * origin_to_copy=nullptr, + boost::unordered_map + * copy_to_origin=nullptr) + { + CGAL::cpp11::tuple<> converters; + copy(amap, converters, origin_to_copy, copy_to_origin); + } + // Copy constructor from a map having exactly the same type. Generalized_map_base (const Self & amap) { copy(amap); } @@ -3692,10 +3752,7 @@ namespace CGAL { typename Helper::Merge_functors m_onmerge_functors; }; - template < unsigned int d_, - class Items_=Generic_map_min_items, - class Alloc_=CGAL_ALLOCATOR(int), - class Storage_= Generalized_map_storage_1 > + template class Generalized_map : public Generalized_map_base, diff --git a/Generalized_map/include/CGAL/Generalized_map_fwd.h b/Generalized_map/include/CGAL/Generalized_map_fwd.h new file mode 100644 index 00000000000..a006ad1b2b4 --- /dev/null +++ b/Generalized_map/include/CGAL/Generalized_map_fwd.h @@ -0,0 +1,38 @@ +// Copyright (c) 2016 CNRS and LIRIS' Establishments (France). +// All rights reserved. +// +// This file is part of CGAL (www.cgal.org) +// +// $URL$ +// $Id$ +// SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial +// +// Author(s) : Guillaume Damiand +// +#ifndef GENERALIZED_MAP_FWD_H +#define GENERALIZED_MAP_FWD_H 1 + +#include + +namespace CGAL { + +template +class Generalized_map_storage_1; + +struct Generic_map_min_items; + +template < unsigned int d_, class Refs, + class Items_=Generic_map_min_items, + class Alloc_=CGAL_ALLOCATOR(int), + class Storage_= Generalized_map_storage_1 > +class Generalized_map_base; + +template < unsigned int d_, + class Items_=Generic_map_min_items, + class Alloc_=CGAL_ALLOCATOR(int), + class Storage_= Generalized_map_storage_1 > +class Generalized_map; + +} // CGAL + +#endif // GENERALIZED_MAP_FWD_H diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex.h index 31d3a97a4a6..d83058b6c54 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex.h @@ -12,6 +12,7 @@ #ifndef CGAL_LINEAR_CELL_COMPLEX_H #define CGAL_LINEAR_CELL_COMPLEX_H 1 +#include #include #include #include @@ -26,19 +27,10 @@ namespace CGAL { */ #if !defined(CGAL_NO_DEPRECATED_CODE) - template < unsigned int d_, unsigned int ambient_dim = d_, - class Traits_ = Linear_cell_complex_traits, -#if defined(CGAL_CMAP_DART_DEPRECATED) - class Items_ = Linear_cell_complex_min_items, -#else - class Items_ = Linear_cell_complex_min_items, -#endif - class Alloc_ = CGAL_ALLOCATOR(int), - template - class CMap = Combinatorial_map_base, - class Storage_ = CMap_linear_cell_complex_storage_1 > + template < unsigned int d_, unsigned int ambient_dim, + class Traits_, class Items_, class Alloc_, + template class CMap, + class Storage_ > class CGAL_DEPRECATED Linear_cell_complex: public Linear_cell_complex_for_combinatorial_map diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h index f517f768eba..14c5be6fbe6 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h @@ -12,6 +12,7 @@ #ifndef CGAL_LINEAR_CELL_COMPLEX_BASE_H #define CGAL_LINEAR_CELL_COMPLEX_BASE_H 1 +#include #include #include #include @@ -42,21 +43,22 @@ namespace CGAL { class Alloc_, template class Map, - class Refs, + class Refs_, class Storage_> class Linear_cell_complex_base: - public Map + public Map { public: typedef Linear_cell_complex_base Self; - typedef Map Base; + Refs_, Storage_> Self; + typedef Map Base; - typedef Traits_ Traits; - typedef Items_ Items; - typedef Alloc_ Alloc; + typedef Traits_ Traits; + typedef Items_ Items; + typedef Alloc_ Alloc; typedef Storage_ Storage; + typedef Refs_ Refs; static const unsigned int ambient_dimension = ambient_dim; static const unsigned int dimension = Base::dimension; diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h index 5d7d85b8c85..63a37abde72 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_for_combinatorial_map.h @@ -12,6 +12,7 @@ #ifndef CGAL_LINEAR_CELL_COMPLEX_FOR_COMBINATORIAL_MAP_H #define CGAL_LINEAR_CELL_COMPLEX_FOR_COMBINATORIAL_MAP_H 1 +#include #include #include #include @@ -29,19 +30,10 @@ namespace CGAL { // Linear_cell_complex_for_combinatorial_map class. // No difference with class Linear_cell_complex_base except the default // template parameters for Refs class which is a combinatorial map. - template < unsigned int d_, unsigned int ambient_dim = d_, - class Traits_ = Linear_cell_complex_traits, -#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) - class Items_ = Linear_cell_complex_min_items, -#else - class Items_ = Linear_cell_complex_min_items, -#endif - class Alloc_ = CGAL_ALLOCATOR(int), - template - class CMap = Combinatorial_map_base, - class Storage_ = CMap_linear_cell_complex_storage_1 > + template < unsigned int d_, unsigned int ambient_dim, + class Traits_, class Items_, class Alloc_, + template class CMap, + class Storage_ > class Linear_cell_complex_for_combinatorial_map: public Linear_cell_complex_base #include #include #include @@ -28,15 +29,10 @@ namespace CGAL { // Linear_cell_complex_for_generalized_map class. // No difference with class Linear_cell_complex_base except the default // template parameters for Refs class which is a generalized map. - template < unsigned int d_, unsigned int ambient_dim = d_, - class Traits_ = Linear_cell_complex_traits, - class Items_ = Linear_cell_complex_min_items, - class Alloc_ = CGAL_ALLOCATOR(int), - template - class CMap = Generalized_map_base, - class Storage_ = GMap_linear_cell_complex_storage_1 > + template < unsigned int d_, unsigned int ambient_dim, + class Traits_, class Items_, class Alloc_, + template class CMap, + class Storage_ > class Linear_cell_complex_for_generalized_map: public Linear_cell_complex_base +// +#ifndef LINEAR_CELL_COMPLEX_FWD_H +#define LINEAR_CELL_COMPLEX_FWD_H 1 + +#include +#include +#include + +namespace CGAL { + +template +class CMap_linear_cell_complex_storage_1; + +template +class GMap_linear_cell_complex_storage_1; + +template +struct LCC_default_kernel; + +template ::type > +struct Linear_cell_complex_traits; + +#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) + template + struct CGAL_DEPRECATED Linear_cell_complex_min_items; +#else + struct Linear_cell_complex_min_items; +#endif + +template < unsigned int d_, unsigned int ambient_dim, + class Traits_, + class Items_, + class Alloc_, + template + class Map, + class Refs_, + class Storage_> +class Linear_cell_complex_base; + +template < unsigned int d_, unsigned int ambient_dim = d_, + class Traits_ = Linear_cell_complex_traits, +#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE) + class Items_ = Linear_cell_complex_min_items, +#else + class Items_ = Linear_cell_complex_min_items, +#endif + class Alloc_ = CGAL_ALLOCATOR(int), + template + class CMap = Combinatorial_map_base, + class Storage_ = CMap_linear_cell_complex_storage_1 > + class Linear_cell_complex_for_combinatorial_map; + + template < unsigned int d_, unsigned int ambient_dim = d_, + class Traits_ = Linear_cell_complex_traits, + class Items_ = Linear_cell_complex_min_items, + class Alloc_ = CGAL_ALLOCATOR(int), + template + class CMap = Generalized_map_base, + class Storage_ = GMap_linear_cell_complex_storage_1 > + class Linear_cell_complex_for_generalized_map; + +#if !defined(CGAL_NO_DEPRECATED_CODE) + template < unsigned int d_, unsigned int ambient_dim = d_, + class Traits_ = Linear_cell_complex_traits, +#if defined(CGAL_CMAP_DART_DEPRECATED) + class Items_ = Linear_cell_complex_min_items, +#else + class Items_ = Linear_cell_complex_min_items, +#endif + class Alloc_ = CGAL_ALLOCATOR(int), + template + class CMap = Combinatorial_map_base, + class Storage_ = CMap_linear_cell_complex_storage_1 > + class CGAL_DEPRECATED Linear_cell_complex; +#endif + +} // CGAL + +#endif // LINEAR_CELL_COMPLEX_FWD_H diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h index bcf40cc2477..c5276efd6c4 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_min_items.h @@ -16,6 +16,7 @@ #include #endif +#include #include #include diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h index 7d92c627564..3679632d1a9 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_traits.h @@ -12,6 +12,7 @@ #ifndef CGAL_LINEAR_CELL_COMPLEX_TRAITS_H #define CGAL_LINEAR_CELL_COMPLEX_TRAITS_H 1 +#include #include #include #include @@ -32,8 +33,7 @@ namespace CGAL { /** Trait class for Linear_cell_complex class. * dD version (for the moment there is only one dD kernel in CGAL). */ - template ::type > + template struct Linear_cell_complex_traits : public Kernel { static const unsigned int ambient_dimension = d_; diff --git a/Surface_mesh_topology/include/CGAL/Polygonal_schema.h b/Surface_mesh_topology/include/CGAL/Polygonal_schema.h index d341f47fd04..68d85aeabcd 100644 --- a/Surface_mesh_topology/include/CGAL/Polygonal_schema.h +++ b/Surface_mesh_topology/include/CGAL/Polygonal_schema.h @@ -14,6 +14,7 @@ #include +#include #include #include #include @@ -422,9 +423,7 @@ namespace Surface_mesh_topology { }; /// Polygonal schema with combinatorial map. - template > + template class Polygonal_schema_with_combinatorial_map: public Polygonal_schema_base > + template class Polygonal_schema_with_generalized_map: public Polygonal_schema_base +// +#ifndef CGAL_POLYGONAL_SCHEMA_FWD_H +#define CGAL_POLYGONAL_SCHEMA_FWD_H 1 + +#include + +#include +#include +#include + +namespace CGAL { +namespace Surface_mesh_topology { + +struct Polygonal_schema_min_items; + +template > +class Polygonal_schema_with_combinatorial_map; + +template > +class Polygonal_schema_with_generalized_map; + +} // Surface_mesh_topology +} // CGAL + +#endif // CGAL_POLYGONAL_SCHEMA_FWD_H