From d730b4c5e8d04488834aff253124e6c02f7fe84c Mon Sep 17 00:00:00 2001 From: Ingmar Schoegl Date: Sat, 26 Oct 2019 20:01:02 -0500 Subject: [PATCH] Deprecate (previously) used convenience wrapper classes - IdealGasMix.h and Interface.h --- include/cantera/IdealGasMix.h | 15 +++++++++++++++ include/cantera/Interface.h | 13 +++++++++++++ 2 files changed, 28 insertions(+) diff --git a/include/cantera/IdealGasMix.h b/include/cantera/IdealGasMix.h index 2e4054d28..7314d7386 100644 --- a/include/cantera/IdealGasMix.h +++ b/include/cantera/IdealGasMix.h @@ -6,6 +6,8 @@ #ifndef CXX_IDEALGASMIX #define CXX_IDEALGASMIX +#pragma message("warning: IdealGasMix.h is deprecated and will be removed after Cantera 2.5.") + #include "thermo/IdealGasPhase.h" #include "kinetics/GasKinetics.h" #include "kinetics/importKinetics.h" @@ -15,6 +17,10 @@ namespace Cantera { //! Convenience class which inherits from both IdealGasPhase and GasKinetics +/*! + * @deprecated To be removed after Cantera 2.5. + * Replaceable with Solution and/or IdealGasPhase/GasKinetics. + */ class IdealGasMix : public IdealGasPhase, public GasKinetics @@ -25,6 +31,9 @@ public: IdealGasMix(const std::string& infile, std::string id_="") : m_ok(false), m_r(0) { + warn_deprecated("class IdealGasMix", + "To be removed after Cantera 2.5. " + "Replaceable with Solution and/or IdealGasPhase/GasKinetics."); m_r = get_XML_File(infile); m_id = id_; if (id_ == "-") { @@ -38,12 +47,18 @@ public: IdealGasMix(XML_Node& root, std::string id_) : m_ok(false), m_r(&root), m_id(id_) { + warn_deprecated("class IdealGasMix", + "To be removed after Cantera 2.5. " + "Replaceable with Solution and/or IdealGasPhase/GasKinetics."); m_ok = buildSolutionFromXML(root, id_, "phase", this, this); } IdealGasMix(const IdealGasMix& other) : m_ok(false), m_r(other.m_r), m_id(other.m_id) { + warn_deprecated("class IdealGasMix", + "To be removed after Cantera 2.5. " + "Replaceable with Solution and/or IdealGasPhase/GasKinetics."); m_ok = buildSolutionFromXML(*m_r, m_id, "phase", this, this); } diff --git a/include/cantera/Interface.h b/include/cantera/Interface.h index 5677beb14..cf267ba75 100644 --- a/include/cantera/Interface.h +++ b/include/cantera/Interface.h @@ -9,6 +9,8 @@ #ifndef CXX_INTERFACE #define CXX_INTERFACE +#pragma message("warning: Interface.h is deprecated and will be removed after Cantera 2.5.") + #include "thermo.h" #include "kinetics.h" #include "cantera/thermo/SurfPhase.h" @@ -22,6 +24,9 @@ namespace Cantera * and InterfaceKinetics. It therefore represents a surface phase, and also acts * as the kinetics manager to manage reactions occurring on the surface, * possibly involving species from other phases. + * + * @deprecated To be removed after Cantera 2.5. + * Replaceable with Solution and/or SurfPhase/InterfaceKinetics. */ class Interface : public SurfPhase, @@ -42,6 +47,10 @@ public: std::vector otherPhases) : m_ok(false), m_r(0) { + warn_deprecated("class Interface", + "To be removed after Cantera 2.5. " + "Replaceable with Solution and/or SurfPhase/InterfaceKinetics."); + m_r = get_XML_File(infile); if (id == "-") { id = ""; @@ -79,11 +88,15 @@ protected: //! Import an instance of class Interface from a specification in an input file. /*! * This is the preferred method to create an Interface instance. + * + * @deprecated To be removed after Cantera 2.5. Replaceable with Solution. */ inline Interface* importInterface(const std::string& infile, const std::string& id, std::vector phases) { + warn_deprecated("importInterface", "To be removed after Cantera 2.5. " + "Replaceable with Solution."); return new Interface(infile, id, phases); }