Remove deprecated code in CMap and LCC (deprecated since CGAL 4.9)

This commit is contained in:
Guillaume Damiand 2022-01-27 10:36:22 +01:00
parent a5a5a43205
commit 46f5325c1b
26 changed files with 13 additions and 1044 deletions

View File

@ -34,8 +34,6 @@ 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_DART_DEPRECATED` can be defined to keep the old behavior.
*/
template< unsigned int d, typename Items, typename Alloc >
class Combinatorial_map {

View File

@ -1,48 +0,0 @@
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsConstructions
\deprecated Creates a combinatorial hexahedron. Deprecated. Use `cm.make_combinatorial_hexahedron()` instead.
*/
template < class CMap >
typename CMap::Dart_handle make_combinatorial_hexahedron(CMap& cm);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsConstructions
\deprecated Creates a combinatorial polygon of length `lg`. Deprecated. Use `cm.make_combinatorial_polygon()` instead.
*/
template < class CMap > typename CMap::Dart_handle
make_combinatorial_polygon(CMap& cm, unsigned int lg);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsConstructions
\deprecated Creates a combinatorial tetrahedron. Deprecated. Use `cm.make_combinatorial_tetrahedron()` instead.
*/
template < class CMap >
typename CMap::Dart_handle make_combinatorial_tetrahedron(CMap& cm);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsConstructions
\deprecated Creates an isolated edge. Deprecated. Use `cm.make_edge()` instead.
*/
template < class CMap >
typename CMap::Dart_handle make_edge(CMap& cm);
} /* namespace CGAL */

View File

@ -1,37 +0,0 @@
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsClasses
The class `Combinatorial_map_min_items` defines the type of darts which is a `Dart<d,CMap>`. The `Combinatorial_map_min_items` has a template argument for the dimension of the combinatorial map. In this class, no attribute is enabled.
\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_DART_DEPRECATED` can be defined to keep the old behavior.
\cgalHeading{Example}
The following example shows the implementation of the `Combinatorial_map_min_items` class.
\code{.cpp}
template <unsigned int d>
struct Combinatorial_map_min_items
{
template <class CMap>
struct Dart_wrapper
{
typedef CGAL::Dart<d, CMap> Dart;
typedef std::tuple<> Attributes;
};
};
\endcode
\sa `Generic_map_items`
*/
template< unsigned int d >
struct Combinatorial_map_min_items {
}; /* end Combinatorial_map_min_items */
} /* end namespace CGAL */

View File

@ -1,118 +0,0 @@
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Inserts a 0-cell in the 1-cell containing `dh`. Deprecated. Use `cm.insert_cell_0_in_cell_1()` instead.
*/
template < class CMap >
typename CMap::Dart_handle insert_cell_0_in_cell_1(CMap& cm,
typename CMap::Dart_handle dh);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Inserts a 0-cell in the 2-cell containing `dh`. Deprecated. Use `cm.insert_cell_0_in_cell_2()` instead.
*/
template <class CMap>
typename CMap::Dart_handle insert_cell_0_in_cell_2(CMap & cm,
typename CMap::Dart_handle dh);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Inserts a 1-cell in the 2-cell containing `dh1` and `dh2`. Deprecated. Use `cm.insert_cell_1_in_cell_2()` instead.
*/
template < class CMap >
typename CMap::Dart_handle insert_cell_1_in_cell_2(CMap& cm,
typename CMap::Dart_handle dh1,typename CMap::Dart_handle dh2);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Inserts a 2-cell along the path of 1-cells containing darts given by the range `[afirst,alast)`. Deprecated. Use `cm.insert_cell_2_in_cell_3()` instead.
*/
template <class CMap, class InputIterator>
typename CMap::Dart_handle insert_cell_2_in_cell_3(CMap & cm,
InputIterator afirst, InputIterator alast);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Inserts a 1-cell in a the 2-cell containing `dh`, the 1-cell
being attached only by one of its extremity to the 0-cell containing `dh`. Deprecated. Use `cm.insert_dangling_cell_1_in_cell_2()` instead.
*/
template < class CMap >
typename CMap::Dart_handle insert_dangling_cell_1_in_cell_2(CMap& cm,
typename CMap::Dart_handle dh);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Returns true iff it is possible to insert a 1-cell in `cm` between `dh1` and `dh2`. Deprecated. Use `cm.is_insertable_cell_1_in_cell_2()` instead.
*/
template < class CMap >
bool is_insertable_cell_1_in_cell_2(const CMap & cm,
typename CMap::Dart_const_handle dh1,
typename CMap::Dart_const_handle dh2);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Returns true iff it is possible to insert a 2-cell in `cm` along the path
of darts given by the range `[afirst,alast)`. Deprecated. Use `cm.is_insertable_cell_2_in_cell_3()` instead.
*/
template <class CMap, class InputIterator>
bool is_insertable_cell_2_in_cell_3(const CMap & cm,
InputIterator afirst, InputIterator alast);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Returns true iff the <I>i</I>-cell containing `dh` can be removed. Deprecated. Use `cm.is_removable()` instead.
*/
template <class CMap, unsigned int i>
bool is_removable(const CMap& cm, typename CMap::Dart_const_handle dh);
} /* namespace CGAL */
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsOperations
\deprecated Removes the <I>i</I>-cell containing `dh`. Deprecated. Use `cm.remove_cell()` instead.
*/
template <class CMap, unsigned int i>
typename CMap::size_type remove_cell(CMap& cm, typename CMap::Dart_handle dh);
} /* namespace CGAL */

View File

@ -1,61 +0,0 @@
namespace CGAL {
/*!
\ingroup PkgCombinatorialMapsClasses
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_DART_DEPRECATED` can be defined to keep the old behavior.
*/
template< typename d, typename CMap >
struct Dart {
/*!
*/
typedef CMap::Dart_handle Dart_handle;
/*!
*/
typedef CMap::Dart_const_handle Dart_const_handle;
/*!
*/
template <unsigned int i>
using Attribute_handle = CMap::Attribute_handle<i>;
/*!
*/
template <unsigned int i>
using Attribute_const_handle = CMap::Attribute_const_handle<i>;
/*!
Returns \f$ \beta_i\f$(`*this`).
\pre 0 \f$ \leq \f$ <I>i</I> \f$ \leq \f$ <I>dimension</I>.
*/
Dart_handle beta(unsigned int i);
/*!
Returns \f$ \beta_i\f$(`*this`) when the dart is const.
\pre 0 \f$ \leq \f$ <I>i</I> \f$ \leq \f$ <I>dimension</I>.
*/
Dart_const_handle beta(unsigned int i) const;
/*!
Returns \f$ \beta_i^{-1}\f$(`*this`).
\pre 0 \f$ \leq \f$ <I>i</I> \f$ \leq \f$ <I>dimension</I>.
*/
Dart_handle beta_inv(unsigned int i);
/*!
Returns \f$ \beta_i^{-1}\f$(`*this`) when the dart is const.
\pre 0 \f$ \leq \f$ <I>i</I> \f$ \leq \f$ <I>dimension</I>.
*/
Dart_const_handle beta_inv(unsigned int i) const;
}; /* end Dart */
} /* end namespace CGAL */

View File

@ -6,23 +6,6 @@
/// \defgroup PkgCombinatorialMapsClasses Classes
/// \ingroup PkgCombinatorialMapsRef
/*! Basic constructions.
\code
#include <CGAL/Combinatorial_map_constructors.h>
\endcode
*/
/// \defgroup PkgCombinatorialMapsConstructions Constructions
/// \ingroup PkgCombinatorialMapsRef
/*! High-level operations.
\code
#include <CGAL/Combinatorial_map_operations.h>
\endcode
*/
/// \defgroup PkgCombinatorialMapsOperations Operations
/// \ingroup PkgCombinatorialMapsRef
/*!
\addtogroup PkgCombinatorialMapsRef
\cgalPkgDescriptionBegin{Combinatorial Maps,PkgCombinatorialMaps}
@ -53,23 +36,5 @@
- `CGAL::Cell_attribute_with_id<CMap,Info_,Tag,OnMerge,OnSplit>`
- `CGAL::Generic_map_min_items`
\cgalCRPSection{Global Functions}
\cgalCRPSubsection{Constructions for Combinatorial Maps}
- `CGAL::make_edge<CMap>`
- `CGAL::make_combinatorial_polygon<CMap>`
- `CGAL::make_combinatorial_tetrahedron<CMap>`
- `CGAL::make_combinatorial_hexahedron<CMap>`
\cgalCRPSubsection{Operations for Combinatorial Maps}
- `CGAL::is_removable<CMap,i>`
- `CGAL::remove_cell<CMap,i>`
- `CGAL::is_insertable_cell_1_in_cell_2<CMap>`
- `CGAL::is_insertable_cell_2_in_cell_3<CMap,InputIterator>`
- `CGAL::insert_cell_0_in_cell_1<CMap>`
- `CGAL::insert_cell_0_in_cell_2<CMap>`
- `CGAL::insert_cell_1_in_cell_2<CMap>`
- `CGAL::insert_dangling_cell_1_in_cell_2<CMap>`
- `CGAL::insert_cell_2_in_cell_3<CMap,InputIterator>`
*/

View File

@ -1,5 +1,4 @@
#include <CGAL/Combinatorial_map.h>
#include <CGAL/Combinatorial_map_constructors.h>
#include <iostream>
#include <algorithm>

View File

@ -27,12 +27,7 @@
#include <CGAL/Combinatorial_map_basic_operations.h>
#include <CGAL/Combinatorial_map_operations.h>
#include <CGAL/Combinatorial_map_save_load.h>
#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>
#endif
#include <CGAL/Dart_const_iterators.h>
#include <CGAL/Cell_const_iterators.h>
@ -185,11 +180,6 @@ namespace CGAL {
*/
Combinatorial_map_base()
{
#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
CGAL_static_assertion_msg(Helper::nb_attribs<=dimension+1,
"Too many attributes in the tuple Attributes_enabled");
this->init_storage();
@ -3458,10 +3448,6 @@ namespace CGAL {
bool testAttributes=true,
bool testPoint=true) const
{
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
CGAL_USE(testDartInfo);
#endif
typedef Combinatorial_map_base<d2,Refs2,Items2,Alloc2, Storage2> Map2;
bool match = true;
@ -3510,11 +3496,9 @@ namespace CGAL {
map2.mark(other, m2);
// We first test info of darts
#if !defined(CGAL_CMAP_DART_DEPRECATED) || defined(CGAL_NO_DEPRECATED_CODE)
if (match && testDartInfo)
match=internal::Test_is_same_dart_info_functor<Self, Map2>::
run(*this, map2, current, other);
#endif
// We need to test in both direction because
// Foreach_enabled_attributes only test non void attributes

View File

@ -1,135 +0,0 @@
// 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 <guillaume.damiand@liris.cnrs.fr>
//
#ifndef CGAL_COMBINATORIAL_MAP_CONSTRUCTORS_H
#define CGAL_COMBINATORIAL_MAP_CONSTRUCTORS_H 1
#include <CGAL/config.h>
#ifndef CGAL_NO_DEPRECATED_CODE
namespace CGAL {
/** @file Combinatorial_map_constructors.h
* Basic creation operations for a combinatorial map.
* Create edge, triangle, quadrilateral, tetrahedron, hexahedron.
*/
/** Create an edge.
* @param amap the used combinatorial map.
* @return a dart of the new edge.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle make_edge(Map& amap)
{ return amap.make_edge(); }
/** Create a combinatorial polygon of length alg
* (a cycle of alg darts beta1 links together).
* @param amap the used combinatorial map.
* @return a new dart.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle make_combinatorial_polygon(Map& amap,
unsigned int alg)
{ return amap.make_combinatorial_polygon(alg); }
/** Test if a face is a combinatorial polygon of length alg
* (a cycle of alg darts beta1 links together).
* @param amap the used combinatorial map.
* @param adart an intial dart
* @return true iff the face containing adart is a polygon of length alg.
*/
template < class Map >
CGAL_DEPRECATED bool is_face_combinatorial_polygon(const Map& amap,
typename Map::Dart_const_handle adart,
unsigned int alg)
{ return amap.is_face_combinatorial_polygon(adart, alg); }
/** Create a combinatorial tetrahedron from 4 triangles.
* @param amap the used combinatorial map.
* @param d1 a dart onto a first triangle.
* @param d2 a dart onto a second triangle.
* @param d3 a dart onto a third triangle.
* @param d4 a dart onto a fourth triangle.
* @return a new dart.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle
make_combinatorial_tetrahedron(Map& amap,
typename Map::Dart_handle d1,
typename Map::Dart_handle d2,
typename Map::Dart_handle d3,
typename Map::Dart_handle d4)
{ return amap.make_combinatorial_tetrahedron(d1, d2, d3, d4); }
/** Test if a volume is a combinatorial tetrahedron.
* @param amap the used combinatorial map.
* @param adart an intial dart
* @return true iff the volume containing adart is a combinatorial tetrahedron.
*/
template < class Map >
CGAL_DEPRECATED bool is_volume_combinatorial_tetrahedron(const Map& amap,
typename Map::Dart_const_handle d1)
{ return amap.is_volume_combinatorial_tetrahedron(d1); }
/** Create a new combinatorial tetrahedron.
* @param amap the used combinatorial map.
* @return a new dart.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle make_combinatorial_tetrahedron(Map& amap)
{ return amap.make_combinatorial_tetrahedron(); }
/** Create a combinatorial hexahedron from 6 quadrilaterals.
* @param amap the used combinatorial map.
* @param d1 a dart onto a first quadrilateral.
* @param d2 a dart onto a second quadrilateral.
* @param d3 a dart onto a third quadrilateral.
* @param d4 a dart onto a fourth quadrilateral.
* @param d5 a dart onto a fifth quadrilateral.
* @param d6 a dart onto a sixth quadrilateral.
* @return a dart of the new cuboidal_cell.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle
make_combinatorial_hexahedron(Map& amap,
typename Map::Dart_handle d1,
typename Map::Dart_handle d2,
typename Map::Dart_handle d3,
typename Map::Dart_handle d4,
typename Map::Dart_handle d5,
typename Map::Dart_handle d6)
{ return amap.make_combinatorial_hexahedron(d1, d2, d3, d4, d5, d6); }
/** Test if a volume is a combinatorial hexahedron.
* @param amap the used combinatorial map.
* @param adart an intial dart
* @return true iff the volume containing adart is a combinatorial hexahedron.
*/
template < class Map >
CGAL_DEPRECATED bool is_volume_combinatorial_hexahedron(const Map& amap,
typename Map::Dart_const_handle d1)
{ return amap.is_volume_combinatorial_hexahedron(d1); }
/** Create a new combinatorial hexahedron.
* @param amap the used combinatorial map.
* @return a new dart.
*/
template < class Map >
CGAL_DEPRECATED typename Map::Dart_handle make_combinatorial_hexahedron(Map& amap)
{ return amap.make_combinatorial_hexahedron(); }
} // namespace CGAL
#endif // CGAL_NO_DEPRECATED_CODE
#endif // CGAL_COMBINATORIAL_MAP_CONSTRUCTORS_H //
// EOF //

View File

@ -17,32 +17,19 @@
namespace CGAL {
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
template <unsigned int d>
struct Combinatorial_map_min_items;
#else
struct Generic_map_min_items;
#endif
template<unsigned int d_, class Items_, class Alloc_, class Concurrent_tag=CGAL::Tag_false >
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<d_>,
#else
class Items_=Generic_map_min_items,
#endif
class Alloc_=CGAL_ALLOCATOR(int),
class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_, CGAL::Tag_false> >
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<d_>,
#else
class Items_=Generic_map_min_items,
#endif
class Alloc_=CGAL_ALLOCATOR(int),
class Storage_= Combinatorial_map_storage_1<d_, Items_, Alloc_, CGAL::Tag_false> >
class Combinatorial_map;

View File

@ -1,146 +0,0 @@
// 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 <guillaume.damiand@liris.cnrs.fr>
//
#ifndef CGAL_COMBINATORIAL_MAP_INSERTIONS_H
#define CGAL_COMBINATORIAL_MAP_INSERTIONS_H
#include <CGAL/config.h>
namespace CGAL
{
/** @file Combinatorial_map_insertions.h
* Insertion operations on combinatorial map.
*/
#ifndef CGAL_NO_DEPRECATED_CODE
/** Insert a vertex in a given edge.
* @param amap the used combinatorial map.
* @param adart a dart of the edge (!=nullptr && !=null_dart_handle).
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
* @return a dart of the new vertex.
*/
template<class CMap>
CGAL_DEPRECATED typename CMap::Dart_handle
insert_cell_0_in_cell_1( CMap& amap, typename CMap::Dart_handle adart,
typename CMap::template
Attribute_handle<0>::type ah=CMap::null_handle,
bool update_attributes=true )
{
return amap.insert_cell_0_in_cell_1(adart, ah, update_attributes);
}
/** Insert a vertex in the given 2-cell which is split in triangles,
* once for each inital edge of the facet.
* @param amap the used combinatorial map.
* @param adart a dart of the facet to triangulate.
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
* @return A dart incident to the new vertex.
*/
template < class CMap >
CGAL_DEPRECATED typename CMap::Dart_handle
insert_cell_0_in_cell_2( CMap& amap, typename CMap::Dart_handle adart,
typename CMap::template
Attribute_handle<0>::type ah=CMap::null_handle,
bool update_attributes=true )
{
return amap.insert_cell_0_in_cell_2(adart, ah, update_attributes);
}
/** Insert a dangling edge in a 2-cell between given by a dart.
* @param amap the used combinatorial map.
* @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle).
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
* @return a dart of the new edge, not incident to the vertex of adart1.
*/
template<class CMap>
CGAL_DEPRECATED typename CMap::Dart_handle
insert_dangling_cell_1_in_cell_2( CMap& amap,
typename CMap::Dart_handle adart1,
typename CMap::template
Attribute_handle<0>::type ah=CMap::null_handle,
bool update_attributes=true )
{
return amap.insert_dangling_cell_1_in_cell_2(adart1,
ah, update_attributes);
}
/** Test if an edge can be inserted onto a 2-cell between two given darts.
* @param amap the used combinatorial map.
* @param adart1 a first dart.
* @param adart2 a second dart.
* @return true iff an edge can be inserted between adart1 and adart2.
*/
template < class CMap >
CGAL_DEPRECATED bool is_insertable_cell_1_in_cell_2
(const CMap& amap, typename CMap::Dart_const_handle adart1,
typename CMap::Dart_const_handle adart2)
{
return amap.is_insertable_cell_1_in_cell_2(adart1, adart2);
}
/** Insert an edge in a 2-cell between two given darts.
* @param amap the used combinatorial map.
* @param adart1 a first dart of the facet (!=nullptr && !=null_dart_handle).
* @param adart2 a second dart of the facet. If nullptr insert a dangling edge.
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
* @return a dart of the new edge, and not incident to the
* same vertex than adart1.
*/
template<class CMap>
CGAL_DEPRECATED typename CMap::Dart_handle
insert_cell_1_in_cell_2(CMap& amap,
typename CMap::Dart_handle adart1,
typename CMap::Dart_handle adart2,
bool update_attributes=true)
{
return amap.insert_cell_1_in_cell_2(adart1, adart2,
update_attributes);
}
/** Test if a 2-cell can be inserted onto a given 3-cell along
* a path of edges.
* @param amap the used combinatorial map.
* @param afirst iterator on the beginning of the path.
* @param alast iterator on the end of the path.
* @return true iff a 2-cell can be inserted along the path.
*/
template <class CMap, class InputIterator>
CGAL_DEPRECATED bool is_insertable_cell_2_in_cell_3
(const CMap& amap, InputIterator afirst, InputIterator alast)
{
return amap.is_insertable_cell_2_in_cell_3(afirst, alast);
}
/** Insert a 2-cell in a given 3-cell along a path of darts.
* @param amap the used combinatorial map.
* @param afirst iterator on the beginning of the path.
* @param alast iterator on the end of the path.
* @param update_attributes a boolean to update the enabled attributes
* (deprecated, now we use are_attributes_automatically_managed())
* @return a dart of the new 2-cell.
*/
template<class CMap, class InputIterator>
CGAL_DEPRECATED typename CMap::Dart_handle
insert_cell_2_in_cell_3(CMap& amap, InputIterator afirst, InputIterator alast,
bool update_attributes=true)
{
return amap.insert_cell_2_in_cell_3(afirst, alast, update_attributes);
}
#endif // CGAL_NO_DEPRECATED_CODE
} // namespace CGAL
#endif // CGAL_COMBINATORIAL_MAP_INSERTIONS_H

View File

@ -1,46 +0,0 @@
// 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 <guillaume.damiand@liris.cnrs.fr>
//
#ifndef CGAL_COMBINATORIAL_MAP_MIN_ITEMS_H
#define CGAL_COMBINATORIAL_MAP_MIN_ITEMS_H 1
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
#include <CGAL/Dart.h>
#include <CGAL/tuple.h>
namespace CGAL {
/** @file Combinatorial_map_min_items.h
* Definition of min item class for dD combinatorial map.
*/
/** Minimal items for dD combinatorial map.
* Combinatorial_map_min_items defines what is the minimal item
* class for a d-map It provides definitions for darts without attribute.
*/
template <unsigned int d>
struct CGAL_DEPRECATED Combinatorial_map_min_items
{
/// Dart_wrapper defines the type of darts used, and enabled attributes.
template < class Refs >
struct Dart_wrapper
{
typedef CGAL::Dart< d, Refs > Dart;
typedef std::tuple<> Attributes;
};
};
} // namespace CGAL
#endif // defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
#endif // CGAL_COMBINATORIAL_MAP_MIN_ITEMS_H //
// EOF //

View File

@ -62,18 +62,6 @@ namespace CGAL
static bool run(const CMap&, typename CMap::Dart_const_handle)
{ return true; }
};
/** Test if an i-cell can be removed.
* An i-cell can be removed if i==CMap::dimension or i==CMap::dimension-1,
* or if there are at most two (i+1)-cell incident to it.
* @param adart a dart of the i-cell.
* @return true iff the i-cell can be removed.
*/
#ifndef CGAL_NO_DEPRECATED_CODE
template < class CMap, unsigned int i >
CGAL_DEPRECATED bool is_removable(const CMap& amap,
typename CMap::Dart_const_handle adart)
{ return CGAL::Is_removable_functor<CMap, i>::run(amap,adart); }
#endif // CGAL_NO_DEPRECATED_CODE
/** Remove an i-cell, 0<i<dimension, and merge eventually both incident
* (i+1)-cells.
@ -455,22 +443,6 @@ namespace CGAL
}
};
/** Remove an i-cell, 0<=i<=dimension.
* @param amap the used combinatorial map.
* @param adart a dart of the i-cell to remove.
* @param update_attributes a boolean to update the enabled attributes
* @return the number of deleted darts.
*/
#ifndef CGAL_NO_DEPRECATED_CODE
template < class CMap, unsigned int i >
CGAL_DEPRECATED size_t remove_cell(CMap& amap, typename CMap::Dart_handle adart,
bool update_attributes = true)
{
return CGAL::Remove_cell_functor<CMap,i,CMap::dimension-i>::
run(amap,adart,update_attributes);
}
#endif // CGAL_NO_DEPRECATED_CODE
/** Test if an i-cell can be contracted.
* An i-cell can be contracted if i==1
* or if there are at most two (i-1)-cell incident to it.
@ -508,17 +480,6 @@ namespace CGAL
static bool run(const CMap&, typename CMap::Dart_const_handle)
{ return true; }
};
/** Test if an i-cell can be contracted.
* An i-cell can be contracted if i==1
* or if there are at most two (i-1)-cell incident to it.
* @param adart a dart of the i-cell.
* @return true iff the i-cell can be contracted.
*/
#ifndef CGAL_NO_DEPRECATED_CODE
template < class CMap, unsigned int i >
CGAL_DEPRECATED bool is_contractible(const CMap& amap, typename CMap::Dart_const_handle adart)
{ return CGAL::Is_contractible_functor<CMap, i>::run(amap,adart); }
#endif // CGAL_NO_DEPRECATED_CODE
/** Contract an i-cell, 1<i<=dimension, and merge eventually both incident
* (i-1)-cells.
@ -795,18 +756,6 @@ namespace CGAL
}
};
/** Contract an i-cell, 1<=i<=dimension.
* @param amap the used combinatorial map.
* @param adart a dart of the i-cell to remove.
* @return the number of deleted darts.
*/
#ifndef CGAL_NO_DEPRECATED_CODE
template < class CMap, unsigned int i >
CGAL_DEPRECATED size_t contract_cell(CMap& amap, typename CMap::Dart_handle adart,
bool update_attributes)
{ return CGAL::Contract_cell_functor<CMap,i>::run(amap,adart, update_attributes); }
#endif // CGAL_NO_DEPRECATED_CODE
} // namespace CGAL
#endif // CGAL_COMBINATORIAL_MAP_OPERATIONS_H //

View File

@ -49,15 +49,11 @@ namespace CGAL {
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
#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
Dart_info;
typedef typename internal::template Get_darts_with_id<Dart_wrapper>::type
Darts_with_id;
typedef CGAL::Dart<d_, Self, Dart_info, Darts_with_id> Dart;
#endif
typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
@ -304,13 +300,11 @@ namespace CGAL {
ah->set_dart(adart);
}
#if !defined(CGAL_CMAP_DART_DEPRECATED) || defined(CGAL_NO_DEPRECATED_CODE)
// Get the information associated with a given dart
Dart_info& info(Dart_handle adart)
{ return adart->info(); }
const Dart_info& info(Dart_const_handle adart) const
{ return adart->info(); }
#endif
// Get the info of the given attribute
template<unsigned int i>

View File

@ -200,109 +200,6 @@ namespace CGAL {
typename Helper::Attribute_handles mattribute_handles;
};
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
#define CGAL_BETAINV(i) (i>1?i:(i==1?0:1))
/** Definition of nD dart for combinatorial map. Add functions beta and attributes which
* are now deprecated.
*/
template <unsigned int d, typename Refs, class WithID=Tag_false>
struct CGAL_DEPRECATED Dart : public Dart_without_info<d, Refs, WithID>
{
template<unsigned int, class, class, class>
friend class Combinatorial_map_storage_1;
template<unsigned int, unsigned int, class, class, class, class>
friend class CMap_linear_cell_complex_storage_1;
template <class, class, class, class>
friend class Compact_container;
template <class, class>
friend class Concurrent_compact_container;
typedef Dart_without_info<d, Refs, WithID> Base;
using Base::dimension;
using Base::mf;
using Base::mattribute_handles;
typedef typename Base::Dart_handle Dart_handle;
typedef typename Base::Dart_const_handle Dart_const_handle;
typedef typename Base::Helper Helper;
/// Typedef for attributes
template<int i>
struct Attribute_handle: public Refs::template Attribute_handle<i>
{};
template<int i>
struct Attribute_const_handle:
public Refs::template Attribute_const_handle<i>
{};
public:
/** Return the beta of this dart for a given dimension.
* @param i the dimension.
* @return beta(\em i).
*/
template<unsigned int i>
Dart_handle beta()
{
CGAL_assertion(i <= dimension);
return mf[i];
}
Dart_handle beta(unsigned int i)
{
CGAL_assertion(i <= dimension);
return mf[i];
}
template<unsigned int i>
Dart_const_handle beta() const
{
CGAL_assertion(i <= dimension);
return mf[i];
}
Dart_const_handle beta(unsigned int i) const
{
CGAL_assertion(i <= dimension);
return mf[i];
}
/** Return the beta inverse of this dart for a given dimension.
* @param i the dimension.
* @return beta^{-1}(\em i).
*/
template<unsigned int i>
Dart_handle beta_inv()
{ return beta<CGAL_BETAINV(i)>(); }
Dart_handle beta_inv(unsigned int i)
{ return beta(CGAL_BETAINV(i)); }
template<unsigned int i>
Dart_const_handle beta_inv() const
{ return beta<CGAL_BETAINV(i)>(); }
Dart_const_handle beta_inv(unsigned int i) const
{ return beta(CGAL_BETAINV(i)); }
/// @return a handle on the i-attribute
template<int i>
typename Attribute_handle<i>::type attribute()
{
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value>
(mattribute_handles);
}
template<int i>
typename Attribute_const_handle<i>::type attribute() const
{
CGAL_static_assertion_msg(Helper::template Dimension_index<i>::value>=0,
"attribute<i> called but i-attributes are disabled.");
return std::get<Helper::template Dimension_index<i>::value>
(mattribute_handles);
}
};
#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,
@ -358,8 +255,6 @@ namespace CGAL {
typedef CGAL::Void Info;
};
#endif // CGAL_CMAP_DART_DEPRECATED
} // namespace CGAL
#endif // CGAL_DART_H //

View File

@ -12,8 +12,6 @@
#ifndef CGAL_COMBINATORIAL_MAP_2_TEST
#define CGAL_COMBINATORIAL_MAP_2_TEST 1
#include <CGAL/Combinatorial_map_constructors.h>
#include <CGAL/Combinatorial_map_operations.h>
#include "Combinatorial_map_test_iterators.h"
#include <iostream>

View File

@ -12,8 +12,6 @@
#ifndef CGAL_COMBINATORIAL_MAP_3_TEST
#define CGAL_COMBINATORIAL_MAP_3_TEST 1
#include <CGAL/Combinatorial_map_constructors.h>
#include <CGAL/Combinatorial_map_operations.h>
#include "Combinatorial_map_test_iterators.h"
#include <iostream>

View File

@ -1,89 +0,0 @@
#include <cstdlib>
#include <CGAL/Installation/internal/disable_deprecation_warnings_and_errors.h>
#define CGAL_CMAP_DART_DEPRECATED 1
#include <CGAL/Combinatorial_map.h>
#include <CGAL/Combinatorial_map_constructors.h>
#include <CGAL/Combinatorial_map_operations.h>
#include <CGAL/Combinatorial_map_insertions.h>
#include <CGAL/Cell_attribute.h>
struct My_items
{
/// Dart_wrapper defines the type of darts used, and enabled attributes.
template < class Refs >
struct Dart_wrapper
{
typedef CGAL::Dart< 3, Refs > Dart;
typedef std::tuple<> Attributes;
};
};
typedef CGAL::Combinatorial_map<3, My_items> CMap;
bool test()
{
CMap map;
for ( int i=0; i<15; ++i )
{
CGAL::make_edge(map);
CGAL::make_combinatorial_polygon(map, 6);
CGAL::make_combinatorial_tetrahedron(map);
CGAL::make_combinatorial_hexahedron(map);
}
for ( int i=0; i<20; ++i )
{
CMap::Dart_handle d1=map.darts().begin();
while ( !map.is_free<3>(d1) ) ++d1;
CMap::Dart_handle d2=map.darts().begin();
while ( !map.is_sewable<3>(d1, d2) ) ++d2;
map.sew<3>(d1,d2);
if (CGAL::is_face_combinatorial_polygon(map, d1, 6))
{}
if (CGAL::is_volume_combinatorial_hexahedron(map, d1))
{}
if (CGAL::is_volume_combinatorial_tetrahedron(map, d1))
{}
if (CGAL::is_removable<CMap, 1>(map, d1))
CGAL::remove_cell<CMap, 1>(map, d1);
else if (CGAL::is_contractible<CMap, 1>(map, d1))
CGAL::contract_cell<CMap, 1>(map, d1, true);
CMap::Dart_handle d3=CGAL::insert_cell_0_in_cell_1<CMap>(map, d2);
CGAL::insert_cell_0_in_cell_2<CMap>(map, d2);
CGAL::insert_dangling_cell_1_in_cell_2<CMap>(map, d2);
if (CGAL::is_insertable_cell_1_in_cell_2<CMap>(map, d2, d3))
CGAL::insert_cell_1_in_cell_2<CMap>(map, d2, d3);
std::vector<CMap::Dart_handle> adarts;
adarts.push_back(d2);
adarts.push_back(d3);
adarts.push_back(map.beta<1>(d3));
if (CGAL::is_insertable_cell_2_in_cell_3(map, adarts.begin(), adarts.end()))
CGAL::insert_cell_2_in_cell_3<CMap>(map, adarts.begin(), adarts.end());
}
return true;
}
int main()
{
std::cout<<"Combinatorial map deprecated test (v1)."<<std::flush;
if ( !test() )
{
std::cout<<" Failed."<<std::endl;
return EXIT_FAILURE;
}
std::cout<<" Success."<<std::endl;
return EXIT_SUCCESS;
}

View File

@ -20,7 +20,7 @@
#include <CGAL/Constrained_Delaunay_triangulation_2.h>
#include <CGAL/Constrained_triangulation_plus_2.h>
#include <CGAL/Linear_cell_complex.h>
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/Linear_cell_complex_constructors.h>
#include <CGAL/Linear_cell_complex_operations.h>
#include <CGAL/Combinatorial_map_save_load.h>

View File

@ -1,17 +0,0 @@
namespace CGAL {
/*!
\ingroup PkgLinearCellComplexClasses
The class `Linear_cell_complex` represents a linear cell complex in dimension `d`, in an ambient space of dimension `d2`, using a combinatorial map as underlying combinatorial data-structure.
\deprecated This class is deprecated since CGAL 4.9 and has been renamed to `Linear_cell_complex_for_combinatorial_map`.
*/
template< typename d, typename d2, typename LCCTraits, typename Items, typename Alloc >
class Linear_cell_complex {
}; /* end Linear_cell_complex */
} /* end namespace CGAL */

View File

@ -22,10 +22,6 @@ Note that there is an additional, and undocumented, template parameter `CMap` fo
\sa `CGAL::Linear_cell_complex_traits<d,K>`
\sa `CGAL::Linear_cell_complex_min_items<d>`
\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_DART_DEPRECATED` can be defined to keep the old behavior.
*/
template< typename d, typename d2, typename LCCTraits, typename Items, typename Alloc >

View File

@ -8,8 +8,6 @@ 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_DART_DEPRECATED` can be defined to keep the old behavior (only possible with `Combinatorial_map` and not for `Generalized_map`).
\cgalHeading{Example}
The following example shows one implementation of the `Linear_cell_complex_min_items` class.

View File

@ -60,15 +60,11 @@ namespace CGAL {
typedef typename Items_::template Dart_wrapper<Self> Dart_wrapper;
#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
Dart_info;
typedef typename internal::template Get_darts_with_id<Dart_wrapper>::type
Darts_with_id;
typedef CGAL::Dart<d_, Self, Dart_info, Darts_with_id> Dart;
#endif
typedef std::allocator_traits<Alloc_> Allocator_traits;
typedef typename Allocator_traits::template rebind_alloc<Dart> Dart_allocator;
@ -324,13 +320,11 @@ namespace CGAL {
ah->set_dart(adart);
}
#if !defined(CGAL_CMAP_DART_DEPRECATED) || defined(CGAL_NO_DEPRECATED_CODE)
// Get the information associated with a given dart
Dart_info& info(Dart_handle adart)
{ return adart->info(); }
const Dart_info& info(Dart_const_handle adart) const
{ return adart->info(); }
#endif
// Get the info of the given attribute
template<unsigned int i>

View File

@ -1,43 +0,0 @@
// Copyright (c) 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 <guillaume.damiand@liris.cnrs.fr>
//
#ifndef CGAL_LINEAR_CELL_COMPLEX_H
#define CGAL_LINEAR_CELL_COMPLEX_H 1
#include <CGAL/Linear_cell_complex_fwd.h>
#include <CGAL/Linear_cell_complex_for_combinatorial_map.h>
#include <CGAL/Linear_cell_complex_traits.h>
#include <CGAL/Linear_cell_complex_min_items.h>
#include <CGAL/Combinatorial_map.h>
#include <CGAL/CMap_linear_cell_complex_storages.h>
namespace CGAL {
/** @file Linear_cell_complex.h
* Definition of a linear cell complex, i.e. a combinatorial map with points
* associated to all vertices. Deprecated class.
*/
#if !defined(CGAL_NO_DEPRECATED_CODE)
template < unsigned int d_, unsigned int ambient_dim,
class Traits_, class Items_, class Alloc_,
template<unsigned int,class,class,class,class> class CMap,
class Storage_ >
class CGAL_DEPRECATED Linear_cell_complex:
public Linear_cell_complex_for_combinatorial_map<d_, ambient_dim, Traits_, Items_,
Alloc_, CMap, Storage_>
{};
#endif
} // namespace CGAL
#endif // CGAL_LINEAR_CELL_COMPLEX_H //
// EOF //

View File

@ -33,12 +33,7 @@ template <unsigned int d_,
class Kernel=typename LCC_default_kernel<d_>::type >
struct Linear_cell_complex_traits;
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
template <unsigned int d>
struct CGAL_DEPRECATED Linear_cell_complex_min_items;
#else
struct Linear_cell_complex_min_items;
#endif
struct Linear_cell_complex_min_items;
template < unsigned int d_, unsigned int ambient_dim,
class Traits_,
@ -52,46 +47,25 @@ class Linear_cell_complex_base;
template < unsigned int d_, unsigned int ambient_dim = d_,
class Traits_ = Linear_cell_complex_traits<ambient_dim>,
#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,
#endif
class Alloc_ = CGAL_ALLOCATOR(int),
template<unsigned int,class,class,class,class>
class CMap = Combinatorial_map_base,
class Storage_ = CMap_linear_cell_complex_storage_1<d_, ambient_dim,
Traits_, Items_,
Alloc_, CGAL::Tag_false> >
class Linear_cell_complex_for_combinatorial_map;
class Linear_cell_complex_for_combinatorial_map;
template < unsigned int d_, unsigned int ambient_dim = d_,
class Traits_ = Linear_cell_complex_traits<ambient_dim>,
class Items_ = Linear_cell_complex_min_items,
class Alloc_ = CGAL_ALLOCATOR(int),
template<unsigned int,class,class,class,class>
class CMap = Generalized_map_base,
class Storage_ = GMap_linear_cell_complex_storage_1<d_, ambient_dim,
Traits_, Items_,
Alloc_, CGAL::Tag_false> >
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<ambient_dim>,
#if defined(CGAL_CMAP_DART_DEPRECATED)
class Items_ = Linear_cell_complex_min_items<d_>,
#else
class Items_ = Linear_cell_complex_min_items,
#endif
class Alloc_ = CGAL_ALLOCATOR(int),
template<unsigned int,class,class,class,class>
class CMap = Combinatorial_map_base,
class Storage_ = CMap_linear_cell_complex_storage_1<d_, ambient_dim,
Traits_, Items_,
Alloc_, CGAL::Tag_false> >
class Linear_cell_complex;
#endif
template < unsigned int d_, unsigned int ambient_dim = d_,
class Traits_ = Linear_cell_complex_traits<ambient_dim>,
class Items_ = Linear_cell_complex_min_items,
class Alloc_ = CGAL_ALLOCATOR(int),
template<unsigned int,class,class,class,class>
class CMap = Generalized_map_base,
class Storage_ = GMap_linear_cell_complex_storage_1<d_, ambient_dim,
Traits_, Items_,
Alloc_, CGAL::Tag_false> >
class Linear_cell_complex_for_generalized_map;
} // CGAL

View File

@ -12,10 +12,6 @@
#ifndef CGAL_LINEAR_CELL_COMPLEX_MIN_ITEMS_H
#define CGAL_LINEAR_CELL_COMPLEX_MIN_ITEMS_H 1
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
#include <CGAL/Dart.h>
#endif
#include <CGAL/Linear_cell_complex_fwd.h>
#include <CGAL/Cell_attribute_with_point.h>
#include <CGAL/tuple.h>
@ -31,21 +27,6 @@ namespace CGAL {
* for a linear cell complex. It provides definitions for attributes
* associated to vertices (containing points), and information associated with darts.
*/
#if defined(CGAL_CMAP_DART_DEPRECATED) && !defined(CGAL_NO_DEPRECATED_CODE)
template <unsigned int d>
struct CGAL_DEPRECATED Linear_cell_complex_min_items
{
/// Dart_wrapper defines the type of darts used.
template <class LCC>
struct Dart_wrapper
{
typedef CGAL::Dart<d, LCC> Dart;
typedef CGAL::Cell_attribute_with_point<LCC> Vertex_attrib;
typedef std::tuple<Vertex_attrib> Attributes;
};
};
#else
struct Linear_cell_complex_min_items
{
/// Dart_wrapper defines the type of darts used.
@ -56,7 +37,6 @@ namespace CGAL {
typedef std::tuple<Vertex_attrib> Attributes;
};
};
#endif
} // namespace CGAL