diff --git a/BGL/doc/BGL/PackageDescription.txt b/BGL/doc/BGL/PackageDescription.txt index 68a57a60d14..395584b1b30 100644 --- a/BGL/doc/BGL/PackageDescription.txt +++ b/BGL/doc/BGL/PackageDescription.txt @@ -509,8 +509,7 @@ the requirement for traversal of all faces in a graph. /// I/O Functions for the \ref IOStream3MF /// \ingroup PkgBGLIOFct -/// \defgroup PkgBGLIOFctDeprecated I/O Functions (Deprecated) -/// \ingroup PkgBGLIOFct + /*! \addtogroup PkgBGLPropertiesDynamic diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index 25f76b2b1d6..441b088597a 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -247,36 +247,7 @@ bool read_OFF(const std::string& fname, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE -/*! - \ingroup PkgBGLIOFctDeprecated - - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_off(std::istream& is, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_OFF(is, g, np); -} - -/*! -\ingroup PkgBGLIOFctDeprecated - -\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF()` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_OFF(fname, g, np); -} -template -CGAL_DEPRECATED bool read_off(const std::string& fname, Graph& g) -{ - return read_off(fname.c_str(), g, parameters::default_values()); -} - -#endif // CGAL_NO_DEPRECATED_CODE //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// @@ -453,31 +424,6 @@ bool write_OFF(const std::string& fname, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgBGLIOFctDeprecated - - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_OFF(os, g, np); -} - -/*! -\ingroup PkgBGLIOFctDeprecated - -\deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF()` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_OFF(fname, g, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index 931c744765e..cfc33c2b867 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -529,20 +529,7 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE -/*! - \ingroup PkgBGLIOFctDeprecated - - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_VTP()` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_vtp(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_VTP(os, g, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index b92429a193b..b2179a8907c 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -111,20 +111,7 @@ bool write_WRL(const std::string& fname, const Graph& g, const CGAL_NP_CLASS& np } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE -/*! - \ingroup PkgBGLIOFctDeprecated - - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_WRL()` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_WRL(os, g, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE } // namespace CGAL diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 016e0009d4f..6affc9511d8 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -38,7 +38,6 @@ create_single_source_cgal_program("test_graph_traits.cpp") create_single_source_cgal_program("test_Properties.cpp") create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp") create_single_source_cgal_program("graph_traits_inheritance.cpp" ) -create_single_source_cgal_program("test_deprecated_io.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) @@ -69,8 +68,6 @@ if (VTK_FOUND AND VTK_LIBRARIES) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES}) target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX) - target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES}) - target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX) else() message(STATUS "Tests that use VTK will not be compiled.") endif() #VTK_FOUND diff --git a/BGL/test/BGL/test_deprecated_io.cpp b/BGL/test/BGL/test_deprecated_io.cpp deleted file mode 100644 index 8c22b9f17df..00000000000 --- a/BGL/test/BGL/test_deprecated_io.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include -#include -#include -#include -#include - -#include -#include -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef Kernel::Point_3 Point_3; -typedef CGAL::Surface_mesh SM; - -int main() -{ - // OFF - SM sm_in, sm_out; - Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); - CGAL::make_triangle(p0, p1, p2, sm_out); - bool ok = CGAL::write_off("tmp_deprecated.off", sm_out); - assert(ok); - ok = CGAL::read_off("tmp_deprecated.off", sm_in); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - sm_in.clear(); - - std::ofstream os("tmp_deprecated.off"); - ok = CGAL::write_off(os, sm_out); - assert(ok); - os.close(); - std::ifstream is("tmp_deprecated.off"); - ok = CGAL::read_off(is, sm_in); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - is.close(); - sm_in.clear(); -#ifdef CGAL_USE_VTK - //vtk - os.open("tmp_deprecated.vtp"); - ok = CGAL::write_vtp(os, sm_out); - assert(ok); - os.close(); - - ok = CGAL::IO::read_VTP("tmp_deprecated.vtp", sm_in); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - sm_in.clear(); -#endif - //wrl - os.open("tmp_deprecated.wrl"); - ok = CGAL::write_wrl(os, sm_out); - assert(ok); - os.close(); - return EXIT_SUCCESS; -} diff --git a/Point_set_processing_3/include/CGAL/IO/read_las_points.h b/Point_set_processing_3/include/CGAL/IO/read_las_points.h index c1dc8453fc9..258a580160c 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_las_points.h @@ -547,91 +547,6 @@ bool read_LAS(const std::string& fname, OutputIterator output, const CGAL_NP_CLA } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -using IO::make_las_point_reader; -namespace LAS_property = IO::LAS_property; - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_las_points(), please update your code") -bool read_las_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return read_las_points(is, output, CGAL::parameters::point_map (point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_las_points(), please update your code") -bool read_las_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return read_las_points::type>(is, output, - CGAL::parameters::point_map(point_map)); -} - -/// \endcond - - -template -CGAL_DEPRECATED bool read_las_points_with_properties(std::istream& is, - OutputIterator output, - PropertyHandler&& ... properties) -{ - return IO::read_LAS_with_properties(is, output, std::forward(properties)...); -} - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED bool read_las_points_with_properties(std::istream& is, - OutputIterator output, - PropertyHandler&& ... properties) -{ - return IO::read_LAS_with_properties::type>(is, output, std::forward(properties)...); -} - -/// \endcond - -template -CGAL_DEPRECATED bool read_las_points(std::istream& is, - OutputIterator output, - const CGAL_NP_CLASS& np = parameters::default_values()) -{ - using parameters::choose_parameter; - using parameters::get_parameter; - - typename CGAL::GetPointMap, CGAL_NP_CLASS>::type point_map = - choose_parameter, CGAL_NP_CLASS>::type>(get_parameter(np, internal_np::point_map)); - - return IO::read_LAS(is, output, make_las_point_reader(point_map)); -} - -/// \cond SKIP_IN_MANUAL - - -// variant with default output iterator value type -template -CGAL_DEPRECATED bool read_las_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_LAS::type>(is, output, np); -} - -/// \endcond - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_READ_LAS_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/read_off_points.h b/Point_set_processing_3/include/CGAL/IO/read_off_points.h index e193661dffd..cd752f463c7 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_off_points.h @@ -271,174 +271,6 @@ bool read_OFF(const std::string& fname, OutputIterator output, const CGAL_NP_CLA } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3. - const Kernel& /*kernel*/) ///< geometric traits. -{ - return IO::read_OFF(is, output, - parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(Kernel())); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3. - const Kernel& kernel) ///< geometric traits. -{ - return IO::read_OFF::type>(is, output, - parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_OFF(is, output, parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_OFF::type>(is, output, - parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_OFF(is, output, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points_and_normals(), please update your code") -bool read_off_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_OFF::type>(is, output, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code") -bool read_off_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - const Kernel& kernel) ///< geometric traits. -{ - return read_off_points(is, output, parameters::point_map(point_map) - .geom_traits(kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code") -bool read_off_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - const Kernel& kernel) ///< geometric traits. -{ - return read_off_points::type>(is, output, - parameters::point_map(point_map) - .geom_traits (kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code") -bool read_off_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return read_off_points(is, output, parameters::point_map (point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_off_points(), please update your code") -bool read_off_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return read_off_points::type>(is, output, parameters::point_map(point_map)); -} - -/// \endcond - -template -CGAL_DEPRECATED bool read_off_points(std::istream& is, - OutputIterator output, - const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_OFF(is, output, np); -} - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED bool read_off_points(std::istream& is, OutputIterator output) -{ - return IO::read_OFF(is, output); -} - -// variant with default output iterator value type -template -CGAL_DEPRECATED bool read_off_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_OFF(is, output, np); -} - -/// \endcond - -#endif //CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_READ_OFF_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h index f49e6ba1f2c..69775af74d0 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_ply_points.h @@ -358,114 +358,6 @@ bool read_PLY(const std::string& fname, OutputIterator output, const CGAL_NP_CLA } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code") -bool read_ply_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_PLY(is, output, parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code") -bool read_ply_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_PLY::type>(is, output, parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code") -bool read_ply_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_PLY(is, output, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points_and_normals(), please update your code") -bool read_ply_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_PLY::type>(is, output, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points(), please update your code") -bool read_ply_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return IO::read_PLY(is, output, parameters::point_map(point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_ply_points(), please update your code") -bool read_ply_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return IO::read_PLY::type>(is, output, parameters::point_map(point_map)); -} - -/// \endcond - -template -CGAL_DEPRECATED bool read_ply_points_with_properties(std::istream& is, OutputIterator output, PropertyHandler&& ... properties) -{ - return IO::read_PLY_with_properties(is, output, std::forward(properties)...); -} - - -template -CGAL_DEPRECATED bool read_ply_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_PLY(is, output, np); -} - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED bool read_ply_points_with_properties(std::istream& is, OutputIterator output, PropertyHandler&& ... properties) -{ - return IO::read_PLY_with_properties::type>(is, output, std::forward(properties)...); -} - -// variant with default output iterator value type -template -CGAL_DEPRECATED bool read_ply_points(std::istream& is, OutputIterator output, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_PLY::type>(is, output, np); -} - -/// \endcond - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #undef TRY_TO_GENERATE_POINT_PROPERTY diff --git a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h index 5dd9fa8678f..ddf772be51b 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_xyz_points.h @@ -251,173 +251,6 @@ bool read_XYZ(const std::string& fname, OutputIterator output, const CGAL_NP_CLA -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3. - const Kernel& /*kernel*/) ///< geometric traits. -{ - return IO::read_XYZ(is, output, - parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(Kernel())); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map, ///< property map: value_type of OutputIterator -> Vector_3. - const Kernel& kernel) ///< geometric traits. -{ - return IO::read_XYZ::type>(is, output, - parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_XYZ(is, output, - parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_XYZ::type>(is, output, - parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_XYZ(is, output, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points_and_normals(), please update your code") -bool read_xyz_points_and_normals(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - NormalPMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - return IO::read_XYZ::type>(is, output, - parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code") -bool read_xyz_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - const Kernel& kernel) ///< geometric traits. -{ - return IO::read_XYZ(is, output, - parameters::point_map(point_map) - .geom_traits(kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code") -bool read_xyz_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - const Kernel& kernel) ///< geometric traits. -{ - return IO::read_XYZ::type>(is, output, - parameters::point_map(point_map) - .geom_traits(kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code") -bool read_xyz_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return IO::read_XYZ(is, output, parameters::point_map(point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::read_xyz_points(), please update your code") -bool read_xyz_points(std::istream& is, ///< input stream. - OutputIterator output, ///< output iterator over points. - PointPMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - return IO::read_XYZ::type>(is, output, - parameters::point_map(point_map)); -} - -/// \endcond - - -template -CGAL_DEPRECATED bool read_xyz_points(std::istream& is, - OutputIterator output, - const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_XYZ(is, output, np); -} - -/// \cond SKIP_IN_MANUAL -template -CGAL_DEPRECATED bool read_xyz_points(std::istream& is, - OutputIterator output, - const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_XYZ::type>(is, output, np); -} -/// \endcond - -#endif //CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_READ_XYZ_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/write_las_points.h b/Point_set_processing_3/include/CGAL/IO/write_las_points.h index f3a96c919fd..94ff12182ff 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_las_points.h @@ -379,59 +379,6 @@ bool write_LAS(const std::string& filename, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -using IO::make_las_point_writer; - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_las_points(), please update your code") -bool write_las_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_LAS(os, points, parameters::point_map(point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_las_points(), please update your code") -bool write_las_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond) ///< past-the-end input point. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_LAS(os, points); -} - -/// \endcond - -template -CGAL_DEPRECATED bool write_las_points_with_properties(std::ostream& os, - const PointRange& points, - std::tuple point_property, - PropertyHandler&& ... properties) -{ - return IO::write_LAS_with_properties(os, points, point_property, std::forward(properties)...); -} - - -template -bool write_las_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_LAS(os, points, np); -} - -#endif //CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_WRITE_LAS_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index e99a2c90bce..0ef9d0bbcc7 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -198,107 +198,6 @@ bool write_OFF(const std::string& filename, } // IO namespace -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code") -bool write_off_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< iterator over the first input point. - ForwardIterator beyond, ///< past-the-end iterator over the input points. - PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3. - NormalMap normal_map, ///< property map: value_type of ForwardIterator -> Vector_3. - const Kernel& /*kernel*/) ///< geometric traits. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points, - CGAL::parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(Kernel())); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code") -bool write_off_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points, - parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points_and_normals(), please update your code") -bool write_off_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points, parameters::normal_map (normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code") -bool write_off_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< iterator over the first input point. - ForwardIterator beyond, ///< past-the-end iterator over the input points. - PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3. - const Kernel&) ///< geometric traits. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points, - parameters::point_map(point_map) - .geom_traits(Kernel())); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code") -bool write_off_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points, parameters::point_map (point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_off_points(), please update your code") -bool write_off_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond) ///< past-the-end input point. -{ - CGAL::Iterator_range points(first, beyond); - return write_off_points(os, points); -} - -/// \endcond - -template -CGAL_DEPRECATED bool write_off_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_OFF(os, points, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_WRITE_OFF_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h index 0ddbb70d613..bdc9c8077e0 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_ply_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_ply_points.h @@ -298,80 +298,6 @@ bool write_PLY(const std::string& filename, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points_and_normals(), please update your code") -bool write_ply_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_PLY(os, points, parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points_and_normals(), please update your code") -bool write_ply_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - VectorMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - CGAL::Iterator_range points(first, beyond); - return IO::write_PLY(os, points, parameters::normal_map (normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points(), please update your code") -bool write_ply_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - CGAL::Iterator_range points(first, beyond); - return IO::write_PLY(os, points, parameters::point_map(point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_ply_points(), please update your code") -bool write_ply_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond) ///< past-the-end input point. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_PLY(os, points); -} - -/// \endcond - - -template -CGAL_DEPRECATED bool write_ply_points_with_properties(std::ostream& os, ///< output stream. - const PointRange& points, ///< input point range. - PropertyHandler&& ... properties) ///< parameter pack of property handlers -{ - return IO::write_PLY_with_properties(os, points, std::forward(properties)...); -} - - -template -CGAL_DEPRECATED bool write_ply_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_PLY(os, points, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_WRITE_PLY_POINTS_H diff --git a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h index 036e060367b..da1c2a402ed 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_xyz_points.h @@ -189,106 +189,6 @@ bool write_XYZ(const std::string& filename, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/// \cond SKIP_IN_MANUAL - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code") -bool write_xyz_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< iterator over the first input point. - ForwardIterator beyond, ///< past-the-end iterator over the input points. - PointMap point_map, ///< property map: value_type of ForwardIterator -> Point_3. - NormalMap normal_map, ///< property map: value_type of ForwardIterator -> Vector_3. - const Kernel& /*kernel*/) ///< geometric traits. -{ - CGAL::Iterator_range points(first, beyond); - return IO::write_XYZ(os, points, - parameters::point_map(point_map) - .normal_map(normal_map) - .geom_traits(Kernel())); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code") -bool write_xyz_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - NormalMap normal_map) ///< property map: value_type of OutputIterator -> Vector_3. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_XYZ(os, points, - parameters::point_map(point_map) - .normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points_and_normals(), please update your code") -bool write_xyz_points_and_normals(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - NormalMap normal_map) ///< property map: value_type of ForwardIterator -> Vector_3. -{ - CGAL::Iterator_range points(first, beyond); - return IO::write_XYZ(os, points, parameters::normal_map(normal_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code") -bool write_xyz_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map, ///< property map: value_type of OutputIterator -> Point_3. - const Kernel& kernel) -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_XYZ(os, points, parameters::point_map(point_map) - .geom_traits (kernel)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code") -bool write_xyz_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond, ///< past-the-end input point. - PointMap point_map) ///< property map: value_type of OutputIterator -> Point_3. -{ - CGAL::Iterator_range points(first, beyond); - return IO::write_XYZ(os, points, parameters::point_map(point_map)); -} - -template -CGAL_DEPRECATED_MSG("you are using the deprecated V1 API of CGAL::write_xyz_points(), please update your code") -bool write_xyz_points(std::ostream& os, ///< output stream. - ForwardIterator first, ///< first input point. - ForwardIterator beyond) ///< past-the-end input point. -{ - CGAL::Iterator_range points (first, beyond); - return IO::write_XYZ(os, points); -} - -/// \endcond - - -template -CGAL_DEPRECATED bool write_xyz_points(std::ostream& os, const PointRange& points, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_XYZ(os, points, np); -} - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_POINT_SET_PROCESSING_WRITE_XYZ_POINTS_H diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index a1582cc1f7e..f05160e32fc 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -22,7 +22,6 @@ endif() # Executables that do *not* require Eigen create_single_source_cgal_program( "read_test.cpp" ) create_single_source_cgal_program( "test_read_write_point_set.cpp" ) -create_single_source_cgal_program( "test_deprecated_io_point_set.cpp" ) create_single_source_cgal_program( "test_poisson_eliminate.cpp" ) create_single_source_cgal_program( "read_test_with_different_pmaps.cpp" ) create_single_source_cgal_program( "analysis_test.cpp" ) @@ -39,7 +38,6 @@ if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910 include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) target_link_libraries(test_read_write_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support) - target_link_libraries(test_deprecated_io_point_set PRIVATE ${CGAL_libs} CGAL::LASLIB_support) else() message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.") endif() diff --git a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp b/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp deleted file mode 100644 index 35c6e5b0e6f..00000000000 --- a/Point_set_processing_3/test/Point_set_processing_3/test_deprecated_io_point_set.cpp +++ /dev/null @@ -1,241 +0,0 @@ -#include - -#include - -#include -#include -#include - -// Just to try and create ambiguities -#include -#include - -#include - -#include -#include -#include -#include - -typedef CGAL::Simple_cartesian Kernel; -typedef Kernel::Point_3 Point_3; -typedef Kernel::Vector_3 Vector_3; -typedef std::array Color; -typedef std::pair PointWithColor; -typedef CGAL::Nth_of_tuple_property_map<1, PointWithColor> Color_map; - -struct GetRedMap -{ - typedef PointWithColor key_type; - typedef unsigned short value_type; - typedef const value_type& reference; - typedef boost::lvalue_property_map_tag category; -}; -unsigned short get(const GetRedMap&, const PointWithColor& p) -{ - return p.second[0]; -} - -struct GetGreenMap -{ - typedef PointWithColor key_type; - typedef unsigned short value_type; - typedef const value_type& reference; - typedef boost::lvalue_property_map_tag category; -}; -unsigned short get(const GetGreenMap&, const PointWithColor& p) -{ - return p.second[1]; -} - -struct GetBlueMap -{ - typedef PointWithColor key_type; - typedef unsigned short value_type; - typedef const value_type& reference; - typedef boost::lvalue_property_map_tag category; -}; -unsigned short get(const GetBlueMap&, const PointWithColor& p) -{ - return p.second[2]; -} - -struct GetAlphaMap -{ - typedef PointWithColor key_type; - typedef unsigned short value_type; - typedef const value_type& reference; - typedef boost::lvalue_property_map_tag category; -}; - -unsigned short get(const GetAlphaMap&, const PointWithColor& p) -{ - return p.second[3]; -} - -int main() -{ - std::vector points(3); - points[0] = std::make_pair(Point_3(1,0,0), Color{255,0,0,255}); - points[1] = std::make_pair(Point_3(0,1,0), Color{0,255,0,255}); - points[2] = std::make_pair(Point_3(0,0,1), Color{0,0,255,255}); - - bool ok; - std::vector ps; - ps.push_back(Point_3(1,0,0)); - ps.push_back(Point_3(0,1,0)); - ps.push_back(Point_3(0,0,1)); - - std::string input; - - //LAS -#ifdef CGAL_LINKED_WITH_LASLIB - - { - std::ostringstream os(std::ios::binary); - ok = CGAL::write_las_points_with_properties(os, points, - CGAL::make_las_point_writer(CGAL::First_of_pair_property_map()), - std::make_pair(GetRedMap(),CGAL::LAS_property::R()), - std::make_pair(GetGreenMap(), CGAL::LAS_property::G()), - std::make_pair(GetBlueMap(), CGAL::LAS_property::B()), - std::make_pair(GetAlphaMap(), CGAL::LAS_property::I()) - ); - assert(ok); - os.flush(); - input = os.str(); - - } - - { - points.clear(); - std::istringstream is(input, std::ios::binary); - ok = CGAL::read_las_points_with_properties(is, std::back_inserter (points), - CGAL::make_las_point_reader(CGAL::First_of_pair_property_map()), - std::make_tuple(CGAL::Second_of_pair_property_map(), - CGAL::Construct_array(), - CGAL::LAS_property::R(), - CGAL::LAS_property::G(), - CGAL::LAS_property::B(), - CGAL::LAS_property::I())); - assert(ok); - assert(points.size() == 3); - assert(points[1].second[1] == 255); - } - - { - std::ostringstream os(std::ios_base::binary); - CGAL::write_las_points(os, ps); - assert(ok); - os.flush(); - input = os.str(); - } - - { - ps.clear(); - std::istringstream is(input, std::ios::binary); - ok = CGAL::read_las_points(is, std::back_inserter (ps)); - assert(ok); - assert(ps.size() == 3); - } -#endif - - //PLY - { - std::ostringstream os; - assert(os.good()); - ok = CGAL::write_ply_points_with_properties(os, points, - CGAL::make_ply_point_writer (CGAL::First_of_pair_property_map()), - std::make_pair(GetRedMap(),CGAL::PLY_property("red")), - std::make_pair(GetGreenMap(), CGAL::PLY_property("green")), - std::make_pair(GetBlueMap(), CGAL::PLY_property("blue")), - std::make_pair(GetAlphaMap(), CGAL::PLY_property("alpha")) - ); - assert(! os.fail()); - assert(ok); - os.flush(); - input = os.str(); - } - - { - std::istringstream is(input); - assert(is.good()); - points.clear(); - ok = CGAL::read_ply_points_with_properties(is, std::back_inserter (points), - CGAL::make_ply_point_reader(CGAL::First_of_pair_property_map()), - std::make_tuple(CGAL::Second_of_pair_property_map(), - CGAL::Construct_array(), - CGAL::PLY_property("red"), - CGAL::PLY_property("green"), - CGAL::PLY_property("blue"), - CGAL::PLY_property("alpha"))); - assert(! is.fail()); - assert(ok); - assert(points.size() == 3); - assert(points[1].second[1] == 255); - } - - { - std::ostringstream os; - assert(os.good()); - ok = CGAL::write_ply_points(os, ps); - assert(! os.fail()); - assert(ok); - os.flush(); - input = os.str(); - } - - { - std::istringstream is(input); - assert(is.good()); - ps.clear(); - ok = CGAL::read_ply_points(is, std::back_inserter (ps)); - assert(! is.fail()); - assert(ok); - assert(ps.size() == 3); - } - - //OFF - { - std::ostringstream os; - assert(os.good()); - ok = CGAL::write_off_points(os, ps); - assert(! os.fail()); - assert(ok); - os.flush(); - input = os.str(); - } - - { - std::istringstream is(input); - assert(is.good()); - ps.clear(); - ok = CGAL::read_off_points(is, std::back_inserter (ps)); - assert(! is.fail()); - assert(ok); - assert(ps.size() == 3); - } - - //XYZ - { - std::ostringstream os; - assert(os.good()); - ok = CGAL::write_xyz_points(os, ps); - assert(! os.fail()); - assert(ok); - os.flush(); - input = os.str(); - } - - { - std::istringstream is(input); - assert(is.good()); - ps.clear(); - ok = CGAL::read_xyz_points(is, std::back_inserter (ps)); - assert(! is.fail()); - assert(ok); - assert(ps.size() == 3); - } - - std::cout << "Done" << std::endl; - return EXIT_SUCCESS; -} diff --git a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h index 671dd6f49f8..45f33b220b5 100644 --- a/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h +++ b/Polyhedron/doc/Polyhedron/CGAL/IO/Polyhedron_iostream.h @@ -34,13 +34,6 @@ polyhedral surface. template bool read_OFF( std::istream& in, CGAL::Polyhedron_3& P); -/*! -\deprecated This function is deprecated since \cgal 5.3, - \ref read_OFF(std::istream&, Polyhedron_3&) should be used instead. -*/ -template -bool read_off( std::istream& in, CGAL::Polyhedron_3& P); - } // namespace IO /*! @@ -79,12 +72,6 @@ This function overloads the generic function \link PkgBGLIoFuncsOFF `write_OFF(s template bool write_OFF( std::ostream& out, const CGAL::Polyhedron_3& P); -/*! -\deprecated This function is deprecated since \cgal 5.3, - \ref CGAL::IO::write_OFF(std::ostream&, const Polyhedron_3&) should be used instead. -*/ -template -bool write_off( std::ostream& out, const CGAL::Polyhedron_3& P); } // namespace IO diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO.h b/Surface_mesh/include/CGAL/Surface_mesh/IO.h index 55d6bbd8be8..8e68678dbea 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO.h @@ -22,34 +22,5 @@ #include -#include - -namespace CGAL { - -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_polygon_mesh()` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_mesh(Surface_mesh& sm, const std::string& filename) -{ - return IO::read_polygon_mesh(filename, sm); -} - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_polygon_mesh()` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_mesh(const Surface_mesh& mesh, const std::string& filename) -{ - return IO::write_polygon_mesh(filename, mesh); -} - -#endif // CGAL_NO_DEPRECATED_CODE - -} // namespace CGAL #endif // CGAL_SURFACE_MESH_IO_H diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h index 227d0c9ec06..dd39a118297 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/3MF.h @@ -137,20 +137,6 @@ bool read_3MF(const std::string& filename, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_3MF()` should be used instead. -*/ -template -CGAL_DEPRECATED int read_3mf(const std::string& filename, std::vector >& output) -{ - return IO::read_3MF(filename, output); -} - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // defined(CGAL_LINKED_WITH_3MF) || defined(DOXYGEN_RUNNING) diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h index a186d98115a..d28361f08b3 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/OFF.h @@ -347,30 +347,6 @@ bool read_OFF(const std::string& fname, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF(std::istream&, const Surface_mesh&)` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_off(std::istream& is, Surface_mesh& sm, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::read_OFF(is, sm, np); -} - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_OFF(std::istream&, const Surface_mesh&)` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_off(Surface_mesh& sm, const std::string& filename) -{ - return IO::read_OFF(filename, sm, parameters::default_values()); -} -#endif // CGAL_NO_DEPRECATED_CODE - -//////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -549,30 +525,6 @@ bool write_OFF(std::ostream& os, } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF(std::ostream&, const Surface_mesh&)` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_off(std::ostream& os, const Surface_mesh& sm, const CGAL_NP_CLASS& np = parameters::default_values()) -{ - return IO::write_OFF(os, sm, np); -} - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_OFF(std::ostream&, const Surface_mesh&)` should be used instead. -*/ -template -CGAL_DEPRECATED bool write_off(const Surface_mesh& sm, const std::string& filename) -{ - return IO::write_OFF(filename, sm, parameters::default_values()); -} - -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_SURFACE_MESH_IO_OFF_H diff --git a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h index 4c91236aada..0f0056a486a 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/IO/PLY.h @@ -169,10 +169,7 @@ public: const std::string& name = property->name(); if(name == "vertex1" || name == "vertex2") return true; -#ifndef CGAL_NO_DEPRECATED_CODE - if(name == "v0" || name == "v1") - return true; -#endif + return false; } @@ -888,21 +885,7 @@ bool read_PLY(std::istream& is, Surface_mesh

& sm) } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::read_PLY(std::ostream&, const Surface_mesh&)` should be used instead. -*/ -template -CGAL_DEPRECATED bool read_ply(std::istream& is, Surface_mesh

& sm, std::string& comments) -{ - return IO::read_PLY(is, sm, comments); -} - -#endif // CGAL_NO_DEPRECATED_CODE - -//////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -1155,26 +1138,6 @@ bool write_PLY(std::ostream& os, const Surface_mesh

& sm, const CGAL_NP_CLASS& } // namespace IO -#ifndef CGAL_NO_DEPRECATED_CODE - -/*! - \ingroup PkgSurfaceMeshIOFuncDeprecated - \deprecated This function is deprecated since \cgal 5.3, `CGAL::IO::write_PLY(std::ostream&, const Surface_mesh&)` should be used instead. -*/ - -template -CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh

& sm, const std::string& comments) -{ - return IO::write_PLY(os, sm, comments); -} - -template -CGAL_DEPRECATED bool write_ply(std::ostream& os, const Surface_mesh

& sm) -{ - return write_PLY(os, sm, ""); -} -#endif // CGAL_NO_DEPRECATED_CODE - } // namespace CGAL #endif // CGAL_SURFACE_MESH_IO_PLY_H diff --git a/Surface_mesh/test/Surface_mesh/CMakeLists.txt b/Surface_mesh/test/Surface_mesh/CMakeLists.txt index 3b516fc15d0..eaf09a942f5 100644 --- a/Surface_mesh/test/Surface_mesh/CMakeLists.txt +++ b/Surface_mesh/test/Surface_mesh/CMakeLists.txt @@ -15,15 +15,3 @@ foreach(cppfile ${cppfiles}) create_single_source_cgal_program("${cppfile}") endforeach() -find_path(3MF_INCLUDE_DIR - NAMES Model/COM/NMR_DLLInterfaces.h - DOC "Path to lib3MF headers" - ) -find_library(3MF_LIBRARIES NAMES 3MF DOC "Path to the lib3MF library") -if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/NMR_DLLInterfaces.h") - include_directories(${3MF_INCLUDE_DIR}) - target_link_libraries(test_deprecated_io_sm PRIVATE ${3MF_LIBRARIES}) - target_compile_definitions(test_deprecated_io_sm PRIVATE -DCGAL_LINKED_WITH_3MF) -else() - message(STATUS "NOTICE: read_3mf requires the lib3MF library, and will not be tested.") -endif() diff --git a/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp b/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp deleted file mode 100644 index 32930445895..00000000000 --- a/Surface_mesh/test/Surface_mesh/test_deprecated_io_sm.cpp +++ /dev/null @@ -1,70 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include -#include - - -typedef CGAL::Simple_cartesian Kernel; -typedef Kernel::Point_3 Point_3; -typedef CGAL::Surface_mesh SM; - -int main() -{ - // OFF - SM sm_in, sm_out; - Point_3 p0(0,0,0), p1(1,0,0), p2(0,1,0); - CGAL::make_triangle(p0, p1, p2, sm_out); - bool ok = CGAL::write_off(sm_out, "tmp.off"); - assert(ok); - ok = CGAL::read_off(sm_in, "tmp.off"); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - sm_in.clear(); - - std::ofstream os("tmp.off"); - ok = CGAL::write_off(os, sm_out); - assert(ok); - os.close(); - std::ifstream is("tmp.off"); - ok = CGAL::read_off(is, sm_in); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - is.close(); - sm_in.clear(); - - //PLY - os.open("tmp.ply"); - std::string comments; - ok = CGAL::write_ply(os, sm_out, comments); - assert(ok); - os.close(); - is.open("tmp.ply"); - ok = CGAL::read_ply(is, sm_in, comments); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - is.close(); - sm_in.clear(); - -#ifdef CGAL_LINKED_WITH_3MF - // 3mf - std::vector output_3mf; - ok = CGAL::read_3mf("test.3mf", output_3mf); - assert(ok); - assert(output_3mf.size() == 2); - sm_in.clear(); -#endif - - //others - ok = CGAL::write_mesh(sm_out, "tmp.off"); - assert(ok); - ok = CGAL::read_mesh(sm_in, "tmp.ply"); - assert(ok); - assert(num_vertices(sm_in) == 3 && num_faces(sm_in) == 1); - sm_in.clear(); - return EXIT_SUCCESS; -}