From eda3b2fbfbe7ca4e194e2dffe56a8c3f74e8d089 Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Fri, 25 Oct 2019 23:11:20 -0500 Subject: [PATCH] Deprecate (previously) unused convenience wrapper classes - Edge.h, IncompressibleSolid.h and Metal.h --- include/cantera/Edge.h | 9 +++++++++ include/cantera/IncompressibleSolid.h | 11 ++++++++++- include/cantera/Metal.h | 11 ++++++++++- 3 files changed, 29 insertions(+), 2 deletions(-) diff --git a/include/cantera/Edge.h b/include/cantera/Edge.h index ad342bbde..126d3127f 100644 --- a/include/cantera/Edge.h +++ b/include/cantera/Edge.h @@ -6,6 +6,8 @@ #ifndef CXX_EDGE #define CXX_EDGE +#pragma message("warning: Edge.h is deprecated and will be removed after Cantera 2.5.0.") + #include "thermo/ThermoFactory.h" #include "kinetics/importKinetics.h" #include "kinetics/EdgeKinetics.h" @@ -15,6 +17,10 @@ namespace Cantera { //! Convenience class which inherits from both EdgePhase and EdgeKinetics +/*! + * @deprecated To be removed after Cantera 2.5.0. + * Replaceable with Solution and/or EdgePhase/EdgeKinetics. + */ class Edge : public EdgePhase, public EdgeKinetics { @@ -22,6 +28,9 @@ public: Edge(const std::string& infile, std::string id, std::vector phases) : m_ok(false), m_r(0) { + warn_deprecated("class Metal", + "To be removed after Cantera 2.5.0. " + "Replaceable with Solution and/or EdgePhase/EdgeKinetics."); m_r = get_XML_File(infile); if (id == "-") { id = ""; diff --git a/include/cantera/IncompressibleSolid.h b/include/cantera/IncompressibleSolid.h index 87f40534d..41d1c7c30 100644 --- a/include/cantera/IncompressibleSolid.h +++ b/include/cantera/IncompressibleSolid.h @@ -6,6 +6,8 @@ #ifndef CXX_INCOMPRESSIBLE #define CXX_INCOMPRESSIBLE +#pragma message("warning: IncompressibleSolid.h is deprecated and will be removed after Cantera 2.5.0.") + #include "thermo/ConstDensityThermo.h" #include "kinetics/importKinetics.h" @@ -13,19 +15,26 @@ namespace Cantera { //! Wrapper for ConstDensityThermo with constructor from file +/*! + * @deprecated To be removed after Cantera 2.5.0. + * Replaceable with Solution and/or LatticePhase/IdealSolidSolnPhase. + */ class IncompressibleSolid : public ConstDensityThermo { public: IncompressibleSolid(const std::string& infile, std::string id="") : m_ok(false), m_r(0) { + warn_deprecated("class IncompressibleSolid", + "To be removed after Cantera 2.5.0. " + "Replaceable with Solution and/or LatticePhase/IdealSolidSolnPhase."); m_r = get_XML_File(infile); if (id == "-") { id = ""; } m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0); if (!m_ok) throw CanteraError("IncompressibleSolid", - "buildSolutionFromXML returned false"); + "buildSolutionFromXML returned false"); } bool operator!() { diff --git a/include/cantera/Metal.h b/include/cantera/Metal.h index 48ddd9a18..1ec674014 100644 --- a/include/cantera/Metal.h +++ b/include/cantera/Metal.h @@ -6,6 +6,8 @@ #ifndef CXX_METAL #define CXX_METAL +#pragma message("warning: Metal.h is deprecated and will be removed after Cantera 2.5.0.") + #include "thermo/MetalPhase.h" #include "kinetics/importKinetics.h" @@ -13,18 +15,25 @@ namespace Cantera { //! Wrapper for MetalPhase with constructor from file +/*! + * @deprecated To be removed after Cantera 2.5.0. + * Replaceable with Solution and/or MetalPhase. + */ class Metal : public MetalPhase { public: Metal(const std::string& infile, std::string id="") : m_ok(false), m_r(0) { + warn_deprecated("class Metal", + "To be removed after Cantera 2.5.0. " + "Replaceable with Solution and/or MetalPhase."); m_r = get_XML_File(infile); if (id == "-") { id = ""; } m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0); if (!m_ok) throw CanteraError("Metal::Metal", - "buildSolutionFromXML returned false"); + "buildSolutionFromXML returned false"); } bool operator!() {