remove old API deprecated since CGAL 4.4

This commit is contained in:
Sébastien Loriot 2016-07-21 11:51:11 +02:00
parent e2a0aef1a5
commit 7f350f7507
6 changed files with 4 additions and 210 deletions

View File

@ -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>i</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>i</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;

View File

@ -18,7 +18,6 @@ its attribute handles initialized to `NULL`, for each non `void` attribute.
\cgalHasModel \ref CGAL::Dart "CGAL::Dart<d,CMap>"
\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>i</I>-free.
\pre 0\f$ \leq\f$<I>i</I>\f$ \leq\f$<I>dimension</I>.
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>i</I> such that the dart is not <I>i</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>i</I>-attribute associated to the dart.

View File

@ -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.

View File

@ -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));

View File

@ -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<d_, Items_, Alloc_>::Null_handle_type
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_handle = NULL;
#ifdef CGAL_CMAP_DEPRECATED
/// Allocation of static data members
/// mnull_dart_container
template<unsigned int d_, class Items_, class Alloc_ >
typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_container
Combinatorial_map_storage_1<d_, Items_, Alloc_>::mnull_dart_container;
/// null_dart_handle
template < unsigned int d_, class Items_, class Alloc_ >
typename Combinatorial_map_storage_1<d_, Items_, Alloc_>::Dart_handle
Combinatorial_map_storage_1<d_, Items_, Alloc_>::null_dart_handle;
// = mnull_dart_container.emplace( std::bitset<NB_MARKS>() );
// 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)

View File

@ -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<unsigned int i>
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<unsigned int i>
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<unsigned int i>
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).