mirror of https://github.com/CGAL/cgal
* replace CGAL_CMAP_DEPRECATED macro by CGAL_CMAP_DART_DEPRECATED
* protect deprecated code with #ifndef CGAL_NO_DEPRECATED_CODE
This commit is contained in:
parent
21a121019a
commit
57e4ff3abd
|
|
@ -34,7 +34,7 @@ Other methods have all a constant time complexity.
|
|||
|
||||
\sa `GenericMapItems`
|
||||
|
||||
\deprecated Before CGAL 4.9, `Items` had to define the type of dart used, and the default class was `Combinatorial_map_min_items`. This is now deprecated, the `Dart` type is no more defined in the item class, but replaced by the `Dart_info` type. `CGAL_CMAP_DEPRECATED` can be defined to keep the old behavior.
|
||||
\deprecated Before CGAL 4.9, `Items` had to define the type of dart used, and the default class was `Combinatorial_map_min_items`. This is now deprecated, the `Dart` type is no more defined in the item class, but replaced by the `Dart_info` type. `CGAL_CMAP_DART_DEPRECATED` can be defined to keep the old behavior.
|
||||
|
||||
*/
|
||||
template< unsigned int d, typename Items, typename Alloc >
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The class `Combinatorial_map_min_items` defines the type of darts which is a `Da
|
|||
|
||||
\tparam d the dimension of the combinatorial map.
|
||||
|
||||
\deprecated This class is deprecated since CGAL 4.9. Users are required to use class `Generic_map_min_items` instead, where the `Dart` type is no more defined, but replaced by the `Dart_info` type. `CGAL_CMAP_DEPRECATED` can be defined to keep the old behavior.
|
||||
\deprecated This class is deprecated since CGAL 4.9. Users are required to use class `Generic_map_min_items` instead, where the `Dart` type is no more defined, but replaced by the `Dart_info` type. `CGAL_CMAP_DART_DEPRECATED` can be defined to keep the old behavior.
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ namespace CGAL {
|
|||
|
||||
The class `Dart` represents a <I>d</I>D dart in a combinatorial map.
|
||||
|
||||
\deprecated This class is deprecated since CGAL 4.9. Dart is now a type defined internally; users can now only define the information associated with darts. All functions defined in this class are now defined as methods of a combinatorial map taking a `Dart_handle` as first parameter. `CGAL_CMAP_DEPRECATED` can be defined to keep the old behavior.
|
||||
\deprecated This class is deprecated since CGAL 4.9. Dart is now a type defined internally; users can now only define the information associated with darts. All functions defined in this class are now defined as methods of a combinatorial map taking a `Dart_handle` as first parameter. `CGAL_CMAP_DART_DEPRECATED` can be defined to keep the old behavior.
|
||||
|
||||
*/
|
||||
template< typename d, typename CMap >
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
#include <CGAL/internal/Combinatorial_map_sewable.h>
|
||||
#include <CGAL/Combinatorial_map_functors.h>
|
||||
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
#include <CGAL/Combinatorial_map_min_items.h>
|
||||
#else
|
||||
#include <CGAL/Generic_map_min_items.h>
|
||||
|
|
@ -71,7 +71,7 @@ namespace CGAL {
|
|||
* the beta links, and to manage enabled attributes.
|
||||
*/
|
||||
template < unsigned int d_, class Refs,
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
class Items_=Combinatorial_map_min_items<d_>,
|
||||
#else
|
||||
class Items_=Generic_map_min_items,
|
||||
|
|
@ -174,7 +174,7 @@ namespace CGAL {
|
|||
*/
|
||||
Combinatorial_map_base()
|
||||
{
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
CGAL_static_assertion_msg(Dart::dimension==dimension,
|
||||
"Dimension of dart different from dimension of map");
|
||||
#endif
|
||||
|
|
@ -4803,7 +4803,7 @@ namespace CGAL {
|
|||
};
|
||||
|
||||
template < unsigned int d_,
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
class Items_=Combinatorial_map_min_items<d_>,
|
||||
#else
|
||||
class Items_=Generic_map_min_items,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ namespace CGAL {
|
|||
* Combinatorial_map_min_items defines what is the minimal item
|
||||
* class for a d-map It provides definitions for darts without attribute.
|
||||
*/
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
template <unsigned int d>
|
||||
struct CGAL_DEPRECATED Combinatorial_map_min_items
|
||||
{
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
|
||||
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
typedef typename Dart_wrapper::Dart Dart;
|
||||
#else
|
||||
typedef typename internal::template Get_dart_info<Dart_wrapper>::type
|
||||
|
|
@ -312,7 +312,7 @@ namespace CGAL {
|
|||
ah->set_dart(adart);
|
||||
}
|
||||
|
||||
#ifndef CGAL_CMAP_DEPRECATED
|
||||
#if !defined(CGAL_CMAP_DART_DEPRECATED)
|
||||
// Get the information associated with a given dart
|
||||
typename Dart::Info& info(Dart_handle adart)
|
||||
{ return adart->info(); }
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ namespace CGAL {
|
|||
typename Helper::Attribute_handles mattribute_handles;
|
||||
};
|
||||
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
|
||||
#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
|
||||
|
||||
|
|
@ -268,7 +268,7 @@ namespace CGAL {
|
|||
(mattribute_handles);
|
||||
}
|
||||
};
|
||||
#else // CGAL_CMAP_DEPRECATED
|
||||
#else // CGAL_CMAP_DART_DEPRECATED
|
||||
// Dart definition with an info;
|
||||
// (there is a specialization below when Info_==void)
|
||||
template <unsigned int d, typename Refs, typename Info_=void>
|
||||
|
|
@ -320,7 +320,7 @@ namespace CGAL {
|
|||
typedef CGAL::Void Info;
|
||||
};
|
||||
|
||||
#endif // CGAL_CMAP_DEPRECATED
|
||||
#endif // CGAL_CMAP_DART_DEPRECATED
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#ifndef CGAL_NO_DEPRECATED_CODE
|
||||
|
||||
#define CGAL_NO_DEPRECATION_WARNINGS 1
|
||||
#define CGAL_CMAP_DEPRECATED 1
|
||||
#define CGAL_CMAP_DART_DEPRECATED 1
|
||||
|
||||
#include <CGAL/Combinatorial_map.h>
|
||||
#include <CGAL/Combinatorial_map_constructors.h>
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ and <code>src/</code> directories).
|
|||
<h3>Combinatorial Maps and Linear cell complex</h3>
|
||||
<ul>
|
||||
<li>
|
||||
<b>Breaking change</b>: the requirements of the item class used to customize a combinatorial map and a linear cell complex changed. Instead of defining the type of darts used, you have to define the information you want to add in each dart. You can define the CGAL_CMAP_DEPRECATED macro to keep the old behavior.
|
||||
<b>Breaking change</b>: the requirements of the item class used to customize a combinatorial map and a linear cell complex changed. Instead of defining the type of darts used, you have to define the information you want to add in each dart. You can define the CGAL_CMAP_DART_DEPRECATED macro to keep the old behavior.
|
||||
</li>
|
||||
</ul>
|
||||
<h3>Linear cell complex</h3>
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Note that there is an additional, and undocumented, template parameter `CMap` fo
|
|||
|
||||
\deprecated Before CGAL 4.9, this class was named `%Linear_cell_complex`. This old name still exist for backward compatibility.
|
||||
|
||||
\deprecated Before CGAL 4.9, `Items` had to define the type of dart used. This is now deprecated, the `Dart` type is no more defined in the item class, but replaced by the `Dart_info` type. See deprecated note in the `Linear_cell_complex_min_items` class. `CGAL_CMAP_DEPRECATED` can be defined to keep the old behavior.
|
||||
\deprecated Before CGAL 4.9, `Items` had to define the type of dart used. This is now deprecated, the `Dart` type is no more defined in the item class, but replaced by the `Dart_info` type. See deprecated note in the `Linear_cell_complex_min_items` class. `CGAL_CMAP_DART_DEPRECATED` can be defined to keep the old behavior.
|
||||
|
||||
*/
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ The class `Linear_cell_complex_min_items` defines `void` as the information asso
|
|||
|
||||
\cgalModels `LinearCellComplexItems`
|
||||
|
||||
\deprecated Before CGAL 4.9, this class was templated by the dimension of the darts, and users must define the type of darts used (see also deprecated class `Combinatorial_map_min_items`). `CGAL_CMAP_DEPRECATED` can be defined to keep the old behavior (only possible with `Combinatorial_map` and not for `Generalized_map`).
|
||||
\deprecated Before CGAL 4.9, this class was templated by the dimension of the darts, and users must define the type of darts used (see also deprecated class `Combinatorial_map_min_items`). `CGAL_CMAP_DART_DEPRECATED` can be defined to keep the old behavior (only possible with `Combinatorial_map` and not for `Generalized_map`).
|
||||
|
||||
\cgalHeading{Example}
|
||||
|
||||
|
|
|
|||
|
|
@ -788,7 +788,7 @@ namespace CGAL {
|
|||
// 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<ambient_dim>,
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
class Items_ = Linear_cell_complex_min_items<d_>,
|
||||
#else
|
||||
class Items_ = Linear_cell_complex_min_items,
|
||||
|
|
@ -877,9 +877,10 @@ namespace CGAL {
|
|||
|
||||
};
|
||||
|
||||
#if !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
template < unsigned int d_, unsigned int ambient_dim = d_,
|
||||
class Traits_ = Linear_cell_complex_traits<ambient_dim>,
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED)
|
||||
class Items_ = Linear_cell_complex_min_items<d_>,
|
||||
#else
|
||||
class Items_ = Linear_cell_complex_min_items,
|
||||
|
|
@ -894,6 +895,7 @@ namespace CGAL {
|
|||
public Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_,
|
||||
Alloc_, CMap, Storage_>
|
||||
{};
|
||||
#endif
|
||||
|
||||
} // namespace CGAL
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#ifndef CGAL_LINEAR_CELL_COMPLEX_MIN_ITEMS_H
|
||||
#define CGAL_LINEAR_CELL_COMPLEX_MIN_ITEMS_H 1
|
||||
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
#include <CGAL/Dart.h>
|
||||
#endif
|
||||
|
||||
|
|
@ -37,7 +37,7 @@ namespace CGAL {
|
|||
* for a linear cell complex. It provides definitions for attributes
|
||||
* associated to vertices (containing points), and information associated with darts.
|
||||
*/
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
template <unsigned int d>
|
||||
struct CGAL_DEPRECATED Linear_cell_complex_min_items
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ namespace CGAL {
|
|||
|
||||
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
|
||||
|
||||
#ifdef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
typedef typename Dart_wrapper::Dart Dart;
|
||||
#else
|
||||
typedef typename internal::template Get_dart_info<Dart_wrapper>::type
|
||||
|
|
@ -313,7 +313,7 @@ namespace CGAL {
|
|||
ah->set_dart(adart);
|
||||
}
|
||||
|
||||
#ifndef CGAL_CMAP_DEPRECATED
|
||||
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
|
||||
// Get the information associated with a given dart
|
||||
typename Dart::Info& info(Dart_handle adart)
|
||||
{ return adart->info(); }
|
||||
|
|
|
|||
Loading…
Reference in New Issue