From 7f350f7507788a8cb97e9c17298ad8eaf6015bdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 21 Jul 2016 11:51:11 +0200 Subject: [PATCH] remove old API deprecated since CGAL 4.4 --- .../Concepts/CombinatorialMap.h | 10 -- .../doc/Combinatorial_map/Concepts/Dart.h | 44 --------- .../include/CGAL/Combinatorial_map.h | 14 +-- .../CGAL/Combinatorial_map_iterators_base.h | 15 --- .../include/CGAL/Combinatorial_map_storages.h | 32 +----- Combinatorial_map/include/CGAL/Dart.h | 99 ------------------- 6 files changed, 4 insertions(+), 210 deletions(-) diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h index d9b20f8dbb1..6940b9c9e65 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/CombinatorialMap.h @@ -66,20 +66,10 @@ The number of available Boolean marks of the combinatorial map. */ static size_type NB_MARKS; -/* -\deprecated null dart handle is no longer static since \cgal 4.4. -The null dart handle constant. -A dart `d` is i-free if `beta(d, i)==null_dart_handle`. -Note that `*null_dart_handle`\f$ \notin\f$`darts()`. - -static Dart_handle null_dart_handle; -*/ - /*! The null dart handle constant. A dart `d` is i-free if `beta(d, i)==null_dart_handle`. Note that `*null_dart_handle`\f$ \notin\f$`darts()`. -\deprecated null dart handle is no longer static since \cgal 4.4. You can define the `CGAL_CMAP_DEPRECATED` macro to keep the old behavior. */ Dart_handle null_dart_handle; diff --git a/Combinatorial_map/doc/Combinatorial_map/Concepts/Dart.h b/Combinatorial_map/doc/Combinatorial_map/Concepts/Dart.h index 9f0a17e98f6..342af5bb2d4 100644 --- a/Combinatorial_map/doc/Combinatorial_map/Concepts/Dart.h +++ b/Combinatorial_map/doc/Combinatorial_map/Concepts/Dart.h @@ -18,7 +18,6 @@ its attribute handles initialized to `NULL`, for each non `void` attribute. \cgalHasModel \ref CGAL::Dart "CGAL::Dart" -\deprecated Since \cgal 4.4, `CombinatorialMap::null_dart_handle` is no longer a static data member. This implies to move the following methods of Dart concept into CombinatorialMap concept: `is_free`, `highest_nonfree_dimension`, `opposite` and `other_extremity`. You can define the `CGAL_CMAP_DEPRECATED` macro to keep the old behavior. */ class Dart { @@ -94,49 +93,6 @@ Returns \f$ \beta_i^{-1}\f$(`*this`) when the dart is const. */ Dart_const_handle beta_inv(unsigned int i) const; -/* -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::is_free "cmap.is_free(dh,i)" instead. -Returns true iff the dart is i-free. -\pre 0\f$ \leq\f$i\f$ \leq\f$dimension. - -bool is_free(unsigned int i) const; - -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::highest_nonfree_dimension "cmap.highest_nonfree_dimension(dh)" instead. -Returns the highest dimension i such that the dart is not i-free. --1 if `d0` is free for any dimension. - -int highest_nonfree_dimension() const; - -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::opposite "cmap.opposite(dh)" instead. -Returns a handle to a dart belonging to the same edge -than this dart, and not to the same vertex. -`NULL` if such a dart does not exist. - -Dart_handle opposite(); - -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::opposite "cmap.opposite(dh)" instead. -Returns a const handle to a dart belonging to the same edge -than this dart, and not to the same vertex, when the dart is const. -`NULL` if such a dart does not exist. - -Dart_const_handle opposite() const; - -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::other_extremity "cmap.other_extremity(dh)" instead. -Returns a handle to a dart belonging to the other vertex of -the edge containing this dart (but contrary to `opposite()` not -necessarily to the same edge). `NULL` if such a dart does not exist. - -Dart_handle other_extremity(); - -\deprecated This function is removed since \cgal 4.4. Use \ref CombinatorialMap::other_extremity "cmap.other_extremity(dh)" instead. -Returns a const handle to a dart belonging to the other vertex of -the edge containing this dart, when the dart is const (but contrary to -`opposite()` not necessarily to the same edge). -`NULL` if such a dart does not exist. - -Dart_const_handle other_extremity() const; -*/ - /*! To simplify a future implementation, it is recommended to not use this function and to use \ref CombinatorialMap::attribute "cmap.attribute(dh)" instead. Returns a handle to the i-attribute associated to the dart. diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index 5a0ed70cb50..5b2bf9437e7 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -339,10 +339,8 @@ namespace CGAL { std::swap_ranges(mnb_marked_darts,mnb_marked_darts+NB_MARKS, amap.mnb_marked_darts); mattribute_containers.swap(amap.mattribute_containers); -#ifndef CGAL_CMAP_DEPRECATED std::swap(null_dart_handle, amap.null_dart_handle); this->mnull_dart_container.swap(amap.mnull_dart_container); -#endif // CGAL_CMAP_DEPRECATED } } @@ -949,11 +947,7 @@ namespace CGAL { void mark_null_dart(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - -#ifdef CGAL_CMAP_DEPRECATED - if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED - set_dart_mark(null_dart_handle, amark, !mmask_marks[amark]); + set_dart_mark(null_dart_handle, amark, !mmask_marks[amark]); } /** Unmark null_dart. @@ -962,11 +956,7 @@ namespace CGAL { void unmark_null_dart(size_type amark) const { CGAL_assertion( is_reserved(amark) ); - -#ifdef CGAL_CMAP_DEPRECATED - if ( null_dart_handle!=NULL ) // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED - set_dart_mark(null_dart_handle, amark, mmask_marks[amark]); + set_dart_mark(null_dart_handle, amark, mmask_marks[amark]); } /** Unmark all the darts of the map for a given mark. diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h index 4ad8b8cfd96..8a8c77d3baa 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_iterators_base.h @@ -154,9 +154,6 @@ namespace CGAL { /// test if adart->beta(ai) exists and is not marked for amark bool is_unmarked(Dart_handle adart, unsigned int ai, size_type amark) const { return -#ifdef CGAL_CMAP_DEPRECATED - !mmap->is_free(adart,ai) && // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED !mmap->is_marked(mmap->beta(adart,ai), amark); } @@ -168,9 +165,6 @@ namespace CGAL { bool is_unmarked2(Dart_handle adart, unsigned int ai, unsigned int aj, typename Map::size_type amark) const { return -#ifdef CGAL_CMAP_DEPRECATED - exist_betaij(adart, ai, aj) && // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED !mmap->is_marked(mmap->beta(adart, ai, aj), amark); } @@ -271,9 +265,6 @@ namespace CGAL { this->mmap->mark((*this), mmark_number); if ( -#ifdef CGAL_CMAP_DEPRECATED - !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) ) { mto_treat.push(this->mmap->beta(*this, Bi)); @@ -284,9 +275,6 @@ namespace CGAL { { this->mmap->mark((*this), mmark_number); if ( -#ifdef CGAL_CMAP_DEPRECATED - !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED !this->mmap->is_marked(this->mmap->beta(*this, Bi), mmark_number) ) { mto_treat.push(this->mmap->beta(*this, Bi)); @@ -363,9 +351,6 @@ namespace CGAL { CGAL_assertion( this->mmap->is_marked(*this, this->mmark_number) ); if ( -#ifdef CGAL_CMAP_DEPRECATED - !this->mmap->is_free(*this, Bi) && // Pb with static null_dart_handle for windows -#endif // CGAL_CMAP_DEPRECATED !this->mmap->is_marked(this->mmap->beta(*this, Bi), this->mmark_number) ) { this->mto_treat.push(this->mmap->beta(*this, Bi)); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h index fd2a90b8153..d513b818ad1 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_storages.h @@ -107,14 +107,8 @@ namespace CGAL { // Init void init_storage() { -#ifdef CGAL_CMAP_DEPRECATED - // We must do this ony once, but problem because null_dart_handle - // is static ! - if ( mnull_dart_container.empty() ) -#endif // CGAL_CMAP_DEPRECATED - { // emplace null_dart; initialized in Combinatorial_map class - null_dart_handle = mnull_dart_container.emplace(); - } + // emplace null_dart; initialized in Combinatorial_map class + null_dart_handle = mnull_dart_container.emplace(); } /** Return if this dart is free for adimension. @@ -369,9 +363,6 @@ namespace CGAL { public: /// Void dart. A dart d is i-free if beta_i(d)=null_dart_handle. -#ifdef CGAL_CMAP_DEPRECATED - static -#endif // CGAL_CMAP_DEPRECATED Dart_handle null_dart_handle; // Todo Dart_const_handle ?? protected: @@ -379,9 +370,6 @@ namespace CGAL { Dart_container mdarts; /// Container for the null_dart_handle, static data member. -#ifdef CGAL_CMAP_DEPRECATED - static -#endif // CGAL_CMAP_DEPRECATED Dart_container mnull_dart_container; /// Tuple of attributes containers @@ -393,22 +381,6 @@ namespace CGAL { const typename Combinatorial_map_storage_1::Null_handle_type Combinatorial_map_storage_1::null_handle = NULL; -#ifdef CGAL_CMAP_DEPRECATED - /// Allocation of static data members - /// mnull_dart_container - template - typename Combinatorial_map_storage_1::Dart_container - Combinatorial_map_storage_1::mnull_dart_container; - - /// null_dart_handle - template < unsigned int d_, class Items_, class Alloc_ > - typename Combinatorial_map_storage_1::Dart_handle - Combinatorial_map_storage_1::null_dart_handle; - // = mnull_dart_container.emplace( std::bitset() ); - // Does not work on windows => segfault - // Thus we initialize null_dart_handle in the Combinatorial_map constructor -#endif // CGAL_CMAP_DEPRECATED - } // namespace CGAL #if (BOOST_GCC >= 40900) diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index c0980577dd9..03fae724afe 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -104,105 +104,6 @@ namespace CGAL { /// The dimension of the combinatorial map. static const unsigned int dimension = d; -#ifdef CGAL_CMAP_DEPRECATED - - /** Return if this dart is free for adimension. - * @param i the dimension. - * @return true iff the dart is linked with NULL for \em adimension. - */ - template - bool is_free() const - { - CGAL_assertion(i <= dimension); - return mbeta[i] == Refs::null_dart_handle; - } - bool is_free(unsigned int i) const - { - CGAL_assertion(i <= dimension); - return mbeta[i] == Refs::null_dart_handle; - } - - /** Return the highest dimension for which the dart is not free. - * @return the dimension d such that the dart is not d-free but k-free for - * all k>d. -1 if the dart is free for all d in {0..n} - */ - int highest_nonfree_dimension() const - { - for (int i=(int)dimension; i>=0; --i) - { if ( !is_free(i) ) return i; } - return -1; - } - - /** Return a dart belonging to the same edge and to the second vertex - * of the current edge (NULL if such a dart does not exist). - * @return An handle to the opposite dart. - */ - Dart_handle opposite() - { - for (unsigned int i = 2; i <= dimension; ++i) - if (!is_free(i)) return beta(i); - return NULL; - } - Dart_const_handle opposite() const - { - for (unsigned int i = 2; i <= dimension; ++i) - if (!is_free(i)) return beta(i); - return NULL; - } - - /** Return a dart incident to the other extremity of the current edge, - * but contrary to opposite, non necessary to the same edge - * (NULL if such a dart does not exist). - * @return An handle to the opposite dart. - */ - Dart_handle other_extremity() - { - for (unsigned int i = 1; i <= dimension; ++i) - if (!is_free(i)) return beta(i); - return NULL; - } - Dart_const_handle other_extremity() const - { - for (unsigned int i = 1; i <= dimension; ++i) - if (!is_free(i)) return beta(i); - return NULL; - } - - /** Link this dart with a given dart for a given dimension. - * @param adart the dart to link with. - * @param i the dimension. - */ - template - void basic_link_beta(Dart_handle adart) - { - CGAL_assertion(i <= dimension); - CGAL_assertion(this!=&*Refs::null_dart_handle); - mbeta[i] = adart; - } - void basic_link_beta(Dart_handle adart, unsigned int i) - { - CGAL_assertion(i <= dimension); - CGAL_assertion(this!=&*Refs::null_dart_handle); - mbeta[i] = adart; - } - - /** Unlink this dart for a given dimension. - * @param i the dimension. - */ - template - void unlink_beta() - { - CGAL_assertion(i <= dimension); - mbeta[i] = Refs::null_dart_handle; - } - void unlink_beta(unsigned int i) - { - CGAL_assertion(i <= dimension); - mbeta[i] = Refs::null_dart_handle; - } - -#endif // CGAL_CMAP_DEPRECATED - /** Return the beta of this dart for a given dimension. * @param i the dimension. * @return beta(\em i).