From c451488876e73c07e1151134e5ca6a453e8d3c93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mael=20Rouxel-Labb=C3=A9?= Date: Tue, 23 Jun 2020 11:20:07 +0200 Subject: [PATCH] Re-introduce and deprecate old BGL IO functions --- BGL/include/CGAL/boost/graph/IO/OFF.h | 52 +++++++++++++++++++++++++++ BGL/include/CGAL/boost/graph/IO/VTK.h | 15 ++++++++ BGL/include/CGAL/boost/graph/IO/WRL.h | 15 ++++++++ 3 files changed, 82 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/IO/OFF.h b/BGL/include/CGAL/boost/graph/IO/OFF.h index c4e530b3e29..0a7483ccb4b 100644 --- a/BGL/include/CGAL/boost/graph/IO/OFF.h +++ b/BGL/include/CGAL/boost/graph/IO/OFF.h @@ -266,6 +266,32 @@ bool read_OFF(const std::string& fname, Graph& g, return read_OFF(fname, g, parameters::all_default()); } +#ifndef CGAL_NO_DEPRECATED_CODE + +/*! + \ingroup PkgBGLIOFctDeprecated + + \deprecated This function is deprecated since \cgal 5.2, `CGAL::read_OFF()` should be used instead. +*/ +template +CGAL_DEPRECATED bool read_off(std::ostream& os, Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return read_OFF(os, g, np); +} + +/*! +\ingroup PkgBGLIOFctDeprecated + +\deprecated This function is deprecated since \cgal 5.2, `CGAL::read_OFF()` should be used instead. +*/ +template +CGAL_DEPRECATED bool read_off(const char* fname, Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return read_OFF(fname, g, np); +} + +#endif // CGAL_NO_DEPRECATED_CODE + //////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////////////// // Write @@ -467,6 +493,32 @@ bool write_OFF(const std::string& fname, const Graph& g, return write_OFF(fname.c_str(), g, parameters::all_default()); } +#ifndef CGAL_NO_DEPRECATED_CODE + +/*! + \ingroup PkgBGLIOFctDeprecated + + \deprecated This function is deprecated since \cgal 5.2, `CGAL::write_OFF()` should be used instead. +*/ +template +CGAL_DEPRECATED bool write_off(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return write_OFF(os, g, np); +} + +/*! +\ingroup PkgBGLIOFctDeprecated + +\deprecated This function is deprecated since \cgal 5.2, `CGAL::write_OFF()` should be used instead. +*/ +template +CGAL_DEPRECATED bool write_off(const char* fname, const Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return write_OFF(fname, g, np); +} + +#endif // CGAL_NO_DEPRECATED_CODE + } // namespace CGAL #endif // CGAL_BGL_IO_OFF_H diff --git a/BGL/include/CGAL/boost/graph/IO/VTK.h b/BGL/include/CGAL/boost/graph/IO/VTK.h index d01b61125c9..329c2afb952 100644 --- a/BGL/include/CGAL/boost/graph/IO/VTK.h +++ b/BGL/include/CGAL/boost/graph/IO/VTK.h @@ -538,6 +538,21 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS template bool write_VTP(const std::string& fname, const Graph& g) { return write_VTP(fname, g, parameters::all_default()); } +#ifndef CGAL_NO_DEPRECATED_CODE + +/*! + \ingroup PkgBGLIOFctDeprecated + + \deprecated This function is deprecated since \cgal 5.2, `CGAL::write_VTP()` should be used instead. +*/ +template +CGAL_DEPRECATED bool CGAL::write_vtp(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return write_VTP(os, g, np); +} + +#endif // CGAL_NO_DEPRECATED_CODE + } // namespace CGAL #endif // defined(CGAL_USE_VTK) || defined(DOXYGEN_RUNNING) diff --git a/BGL/include/CGAL/boost/graph/IO/WRL.h b/BGL/include/CGAL/boost/graph/IO/WRL.h index b0567d8779c..8c4d3a418ce 100644 --- a/BGL/include/CGAL/boost/graph/IO/WRL.h +++ b/BGL/include/CGAL/boost/graph/IO/WRL.h @@ -119,6 +119,21 @@ bool write_WRL(const char* fname, const Graph& g) { return write_WRL(fname, g, p template bool write_WRL(const std::string& fname, const Graph& g) { return write_WRL(fname, g, parameters::all_default()); } +#ifndef CGAL_NO_DEPRECATED_CODE + +/*! + \ingroup PkgBGLIOFctDeprecated + + \deprecated This function is deprecated since \cgal 5.2, `CGAL::write_WRL()` should be used instead. +*/ +template +CGAL_DEPRECATED bool write_wrl(std::ostream& os, const Graph& g, const CGAL_BGL_NP_CLASS& np) +{ + return write_WRL(os, g, np); +} + +#endif // CGAL_NO_DEPRECATED_CODE + } // namespace CGAL #endif // CGAL_BGL_IO_WRL_H