Re-introduce and deprecate old BGL IO functions

This commit is contained in:
Mael Rouxel-Labbé 2020-06-23 11:20:07 +02:00
parent 4f2bb738a2
commit c451488876
3 changed files with 82 additions and 0 deletions

View File

@ -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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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

View File

@ -538,6 +538,21 @@ bool write_VTP(const std::string& fname, const Graph& g, const CGAL_BGL_NP_CLASS
template<typename Graph>
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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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)

View File

@ -119,6 +119,21 @@ bool write_WRL(const char* fname, const Graph& g) { return write_WRL(fname, g, p
template <typename Graph>
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 <typename Graph, typename CGAL_BGL_NP_TEMPLATE_PARAMETERS>
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