Fixed improper guards against the inclusion of deprecated headers

This commit is contained in:
Mael Rouxel-Labbé 2017-05-09 15:17:10 +02:00
parent 7cef85e107
commit cd2a562ffa
25 changed files with 94 additions and 74 deletions

View File

@ -24,17 +24,17 @@
#include <CGAL/license/Alpha_shapes_2.h> #include <CGAL/license/Alpha_shapes_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_alpha_shape_euclidean_traits_2.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Regular_triangulation_euclidean_traits_2.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The class Weighted_alpha_shape_euclidean_traits_2<K> is deprecated in favor of "\
"Regular_triangulation_euclidean_traits_2<K>."
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Regular_triangulation_euclidean_traits_2.h> #include <CGAL/Regular_triangulation_euclidean_traits_2.h>
namespace CGAL { namespace CGAL {
//------------------ Traits class -------------------------------------
#ifdef CGAL_NO_DEPRECATED_CODE
#error The class Weighted_alpha_shape_euclidean_traits_2<K> is deprecated in favor of Regular_triangulation_euclidean_traits_2<K>.
#endif
template< class R > template< class R >
class Weighted_alpha_shape_euclidean_traits_2 : public class Weighted_alpha_shape_euclidean_traits_2 : public
Regular_triangulation_euclidean_traits_2<R, typename R::FT> Regular_triangulation_euclidean_traits_2<R, typename R::FT>

View File

@ -23,19 +23,17 @@
#include <CGAL/license/Alpha_shapes_3.h> #include <CGAL/license/Alpha_shapes_3.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_alpha_shape_euclidean_traits_3.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Regular_triangulation_euclidean_traits_3.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The class Weighted_alpha_shape_euclidean_traits_3<K> is deprecated in favor of "\
"Regular_triangulation_euclidean_traits_3<K>."
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Regular_triangulation_euclidean_traits_3.h> #include <CGAL/Regular_triangulation_euclidean_traits_3.h>
namespace CGAL { namespace CGAL {
//------------------ Traits class -------------------------------------
#ifdef CGAL_NO_DEPRECATED_CODE
#error The class Weighted_alpha_shape_euclidean_traits_3<K> is deprecated in favor of Regular_triangulation_euclidean_traits_3<K>.
#endif
template <class K> template <class K>
class Weighted_alpha_shape_euclidean_traits_3 : public class Weighted_alpha_shape_euclidean_traits_3 : public
Regular_triangulation_euclidean_traits_3<K> Regular_triangulation_euclidean_traits_3<K>

View File

@ -23,17 +23,15 @@
#include <CGAL/license/Arrangement_on_surface_2.h> #include <CGAL/license/Arrangement_on_surface_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Arr_face_map.h>"
/*! \file #define CGAL_REPLACEMENT_HEADER "<CGAL/Arr_face_index_map.h>"
* Definition of the Arr_face_index_map<Arrangement> class. #include <CGAL/internal/deprecation_warning.h>
*/
#if (defined __GNUC__)
#warning Arr_face_map.h is DEPRECATED, please include Arr_face_index_map.h instead
#elif (defined _MSC_VER)
#pragma message("Arr_face_map.h is DEPRECATED, please include Arr_face_index_map.h instead")
#endif
#include <CGAL/Arr_face_index_map.h> #include <CGAL/Arr_face_index_map.h>
/*! \file
* Definition of the Arr_face_index_map<Arrangement> class.
*/
#endif #endif

View File

@ -19,6 +19,11 @@
#include <CGAL/license/Arrangement_on_surface_2.h> #include <CGAL/license/Arrangement_on_surface_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Arr_geometry_traits/Polyline_2.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Arr_geometry_traits/Polycurve_2.h>"
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Arr_geometry_traits/Polycurve_2.h>
/*! \file /*! \file
* Header file for the polyline classes used by the * Header file for the polyline classes used by the
@ -26,12 +31,6 @@
* Arr_polyline_traits_2 classes. * Arr_polyline_traits_2 classes.
*/ */
#if (defined __GNUC__)
#warning Polyline_2.h is DEPRECATED, please include Polycurve_2.h instead
#elif (defined _MSC_VER)
#pragma message("Polyline_2.h is DEPRECATED, please include Polycurve_2.h instead")
#endif
#include <CGAL/Arr_geometry_traits/Polycurve_2.h> #include <CGAL/Arr_geometry_traits/Polycurve_2.h>
namespace CGAL { namespace CGAL {

View File

@ -23,17 +23,16 @@
#include <CGAL/license/Arrangement_on_surface_2.h> #include <CGAL/license/Arrangement_on_surface_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Arr_overlay.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Arr_overlay_2.h>"
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Arr_overlay_2.h>
/*! \file /*! \file
* Helping file to include Arr_overlay_2 for backward compatibility. * Helping file to include Arr_overlay_2 for backward compatibility.
*/ */
#if (defined __GNUC__)
#warning Arr_overlay.h is DEPRECATED, please include Arr_overlay_2.h instead
#elif (defined _MSC_VER)
#pragma message("Arr_overlay.h is DEPRECATED, please include Arr_overlay_2.h instead")
#endif
#include <CGAL/Arr_overlay_2.h> #include <CGAL/Arr_overlay_2.h>
#endif #endif

View File

@ -24,17 +24,16 @@
#include <CGAL/license/Arrangement_on_surface_2.h> #include <CGAL/license/Arrangement_on_surface_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Arr_vertex_map.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Arr_vertex_index_map.h>"
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Arr_vertex_index_map.h>
/*! \file /*! \file
* Definition of the Arr_vertex_index_map<Arrangement> class. * Definition of the Arr_vertex_index_map<Arrangement> class.
*/ */
#if (defined __GNUC__)
#warning Arr_vertex_map.h is DEPRECATED, please include Arr_vertex_index_map.h instead
#elif (defined _MSC_VER)
#pragma message("Arr_vertex_map.h is DEPRECATED, please include Arr_vertex_index_map.h instead")
#endif
#include <CGAL/Arr_vertex_index_map.h> #include <CGAL/Arr_vertex_index_map.h>
#endif #endif

View File

@ -24,10 +24,11 @@
#include <CGAL/license/Bounding_volumes.h> #include <CGAL/license/Bounding_volumes.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Minimum_enclosing_quadrilateral_traits_2.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Min_quadrilateral_traits_2.h>"
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE
#include <CGAL/Min_quadrilateral_traits_2.h> #include <CGAL/Min_quadrilateral_traits_2.h>
#endif // CGAL_NO_DEPRECATED_CODE
#endif // ! (CGAL_MINIMUM_ENCLOSING_QUADRILATERAL_TRAITS_2_H) #endif // ! (CGAL_MINIMUM_ENCLOSING_QUADRILATERAL_TRAITS_2_H)

View File

@ -24,10 +24,11 @@
#include <CGAL/license/Bounding_volumes.h> #include <CGAL/license/Bounding_volumes.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/minimum_enclosing_quadrilateral_2.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/min_quadrilateral_2.h>"
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE
#include <CGAL/min_quadrilateral_2.h> #include <CGAL/min_quadrilateral_2.h>
#endif // CGAL_NO_DEPRECATED_CODE
#endif // ! (CGAL_MINIMUM_ENCLOSING_QUADRILATERAL_2_H) #endif // ! (CGAL_MINIMUM_ENCLOSING_QUADRILATERAL_2_H)

View File

@ -32,7 +32,8 @@
#include <CGAL/license/Convex_hull_d.h> #include <CGAL/license/Convex_hull_d.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d.h>"
#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)" #define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The Triangulation package (see http://doc.cgal.org/latest/Triangulation) should be used instead."
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
/*{\Manpage {Convex_hull_d}{R}{Convex Hulls}{C}}*/ /*{\Manpage {Convex_hull_d}{R}{Convex Hulls}{C}}*/

View File

@ -24,7 +24,8 @@
#include <CGAL/license/Convex_hull_d.h> #include <CGAL/license/Convex_hull_d.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d_to_polyhedron_3.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d_to_polyhedron_3.h>"
#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)" #define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The Triangulation package (see http://doc.cgal.org/latest/Triangulation) should be used instead."
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Convex_hull_d.h> #include <CGAL/Convex_hull_d.h>

View File

@ -24,7 +24,8 @@
#include <CGAL/license/Convex_hull_d.h> #include <CGAL/license/Convex_hull_d.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d_traits_3.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Convex_hull_d_traits_3.h>"
#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)" #define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The Triangulation package (see http://doc.cgal.org/latest/Triangulation) should be used instead."
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Point_3.h> #include <CGAL/Point_3.h>

View File

@ -32,7 +32,8 @@
#include <CGAL/license/Convex_hull_d.h> #include <CGAL/license/Convex_hull_d.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Delaunay_d.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Delaunay_d.h>"
#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)" #define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The Triangulation package (see http://doc.cgal.org/latest/Triangulation) should be used instead."
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
/*{\Manpage {Delaunay_d}{R,Lifted_R}{Delaunay Triangulations}{DT}}*/ /*{\Manpage {Delaunay_d}{R,Lifted_R}{Delaunay Triangulations}{DT}}*/

View File

@ -32,7 +32,8 @@
#include <CGAL/license/Convex_hull_d.h> #include <CGAL/license/Convex_hull_d.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Regular_complex_d.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Regular_complex_d.h>"
#define CGAL_REPLACEMENT_HEADER "the Triangulation package (see http://doc.cgal.org/latest/Triangulation)" #define CGAL_DEPRECATED_MESSAGE_DETAILS \
"The Triangulation package (see http://doc.cgal.org/latest/Triangulation) should be used instead."
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/basic.h> #include <CGAL/basic.h>

View File

@ -24,6 +24,9 @@
#include <CGAL/license/Envelope_2.h> #include <CGAL/license/Envelope_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Env_default_diagram_1.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Envelope_diagram_1>"
#include <CGAL/internal/deprecation_warning.h>
#if (defined __GNUC__) #if (defined __GNUC__)
#if !(defined __STRICT_ANSI__) #if !(defined __STRICT_ANSI__)

View File

@ -23,10 +23,9 @@
#include <CGAL/license/Nef_2.h> #include <CGAL/license/Nef_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Nef_2/geninfo.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
//This file is deprecated and something like boost::any or boost::variant should "Something like boost::any or boost::variant should be used instead."
//be used instead
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/config.h> #include <CGAL/config.h>

View File

@ -31,11 +31,9 @@
#ifndef CGAL_KNOWN_BIT_SIZE_INTEGERS_H #ifndef CGAL_KNOWN_BIT_SIZE_INTEGERS_H
#define CGAL_KNOWN_BIT_SIZE_INTEGERS_H #define CGAL_KNOWN_BIT_SIZE_INTEGERS_H
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined(__DMC__) #define CGAL_DEPRECATED_HEADER "<CGAL/known_bit_size_integers.h>"
# pragma message ("Warning: This header is deprecated. Please use boost/cstdint.hpp instead") #define CGAL_REPLACEMENT_HEADER "<boost/cstdint.hpp>"
#elif defined(__GNUC__) || defined(__HP_aCC) || defined(__SUNPRO_CC) || defined(__IBMCPP__) #include <CGAL/internal/deprecation_warning.h>
# warning "This header is deprecated. Please use boost/cstdint.hpp instead"
#endif
#include <CGAL/number_type_basic.h> #include <CGAL/number_type_basic.h>
#include <boost/cstdint.hpp> #include <boost/cstdint.hpp>

View File

@ -27,6 +27,10 @@
#include <CGAL/config.h> #include <CGAL/config.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Fourtuple.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS "Please use `CGAL::cpp11::array` instead."
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE #ifndef CGAL_NO_DEPRECATED_CODE
namespace CGAL { namespace CGAL {

View File

@ -27,6 +27,10 @@
#include <CGAL/config.h> #include <CGAL/config.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Sixtuple.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS "Please use `CGAL::cpp11::array` instead."
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE #ifndef CGAL_NO_DEPRECATED_CODE
namespace CGAL { namespace CGAL {

View File

@ -27,6 +27,10 @@
#include <CGAL/config.h> #include <CGAL/config.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Threetuple.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS "Please use `CGAL::cpp11::array` instead."
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE #ifndef CGAL_NO_DEPRECATED_CODE
namespace CGAL { namespace CGAL {

View File

@ -27,6 +27,10 @@
#include <CGAL/config.h> #include <CGAL/config.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Twotuple.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS "Please use `CGAL::cpp11::array` instead."
#include <CGAL/internal/deprecation_warning.h>
#ifndef CGAL_NO_DEPRECATED_CODE #ifndef CGAL_NO_DEPRECATED_CODE
namespace CGAL { namespace CGAL {

View File

@ -24,11 +24,11 @@
#include <CGAL/license/Triangulation_2.h> #include <CGAL/license/Triangulation_2.h>
#ifdef CGAL_NO_DEPRECATED_CODE #define CGAL_DEPRECATED_HEADER "<CGAL/Regular_triangulation_euclidean_traits_2.h>"
#error The class Regular_triangulation_euclidean_traits_2<K> is deprecated; #define CGAL_DEPRECATED_MESSAGE_DETAILS \
the kernel K can be used directly as traits since the weighted point and "The kernel K can be used directly as traits since weighted points and "\
the function objects for weighted points are part of the concept Kernel. "the associated function objects are now part of the concept Kernel."
#endif #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/config.h> #include <CGAL/config.h>

View File

@ -24,11 +24,10 @@
#include <CGAL/license/Triangulation_2.h> #include <CGAL/license/Triangulation_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_2_filtered_projection_traits_3.h>" #define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_2_filtered_projection_traits_3.h>"
#define CGAL_REPLACEMENT_HEADER "<CGAL/Triangulation_2_projection_traits_3.h>" #define CGAL_REPLACEMENT_HEADER "<CGAL/Triangulation_2_projection_traits_3.h>"
#include <CGAL/internal/deprecation_warning.h> #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/internal/Triangulation_2_filtered_projection_traits_3.h> #include <CGAL/Triangulation_2_projection_traits_3.h>
#endif // CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H #endif // CGAL_TRIANGULATION_2_FILTERED_PROJECTION_TRAITS_3_H

View File

@ -24,6 +24,11 @@
#include <CGAL/license/Triangulation_2.h> #include <CGAL/license/Triangulation_2.h>
#define CGAL_DEPRECATED_HEADER "<CGAL/Weighted_point.h>"
#define CGAL_DEPRECATED_MESSAGE_DETAILS \
"Weighted points are now part of the concept Kernel. One should therefore "\
"use `CGAL::Weighted_point_2<K>` and `CGAL::Weighted_point_3<K>`."
#include <CGAL/internal/deprecation_warning.h>
#include <CGAL/Kernel_traits.h> #include <CGAL/Kernel_traits.h>
#include <CGAL/Dimension.h> #include <CGAL/Dimension.h>

View File

@ -24,16 +24,14 @@
#include <CGAL/license/Triangulation_3.h> #include <CGAL/license/Triangulation_3.h>
#ifdef CGAL_NO_DEPRECATED_CODE #define CGAL_DEPRECATED_HEADER "<CGAL/Regular_triangulation_euclidean_traits_3.h>"
#error The class Regular_triangulation_euclidean_traits_3<K> is deprecated; #define CGAL_DEPRECATED_MESSAGE_DETAILS \
the kernel K can be used directly as traits since the weighted point and "The kernel K can be used directly as traits since weighted points and "\
the function objects for weighted points are part of the concept Kernel. "the associated function objects are now part of the concept Kernel."
#endif #include <CGAL/internal/deprecation_warning.h>
namespace CGAL { namespace CGAL {
template < class K_, class Weight = typename K_::RT > template < class K_, class Weight = typename K_::RT >
class Regular_triangulation_euclidean_traits_3 class Regular_triangulation_euclidean_traits_3
: public K_ : public K_

View File

@ -23,6 +23,8 @@
#include <CGAL/license/Triangulation_3.h> #include <CGAL/license/Triangulation_3.h>
// #define CGAL_DEPRECATED_HEADER "<CGAL/Triangulation_hierarchy_3.h>"
// #include <CGAL/internal/deprecation_warning.h>
#include <CGAL/basic.h> #include <CGAL/basic.h>
#include <CGAL/triangulation_assertions.h> #include <CGAL/triangulation_assertions.h>