From 39c234ac4bb95e2501550b5bd9b7101a06c9b22d Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Tue, 5 Jul 2016 22:49:56 -0400 Subject: [PATCH] [Thermo] Deprecate numerical constants for VPSSMgr types --- include/cantera/thermo/VPSSMgr.h | 1 + include/cantera/thermo/mix_defs.h | 1 + src/thermo/VPSSMgrFactory.cpp | 6 ++++++ src/thermo/VPSSMgrFactory.h | 2 ++ src/thermo/VPSSMgr_ConstVol.cpp | 2 ++ src/thermo/VPSSMgr_General.cpp | 2 ++ src/thermo/VPSSMgr_IdealGas.cpp | 2 ++ src/thermo/VPSSMgr_Water_ConstVol.cpp | 2 ++ src/thermo/VPSSMgr_Water_HKFT.cpp | 2 ++ 9 files changed, 20 insertions(+) diff --git a/include/cantera/thermo/VPSSMgr.h b/include/cantera/thermo/VPSSMgr.h index 314a6bcda..6c52c7f3b 100644 --- a/include/cantera/thermo/VPSSMgr.h +++ b/include/cantera/thermo/VPSSMgr.h @@ -572,6 +572,7 @@ public: /*! * @returns an enum type called VPSSMgr_enumType, which is a list of the * known VPSSMgr objects + * @deprecated Unused. To be removed after Cantera 2.3. */ virtual VPSSMgr_enumType reportVPSSMgrType() const; diff --git a/include/cantera/thermo/mix_defs.h b/include/cantera/thermo/mix_defs.h index b77b9d4e5..afeac7d94 100644 --- a/include/cantera/thermo/mix_defs.h +++ b/include/cantera/thermo/mix_defs.h @@ -129,6 +129,7 @@ enum PDSS_enumType { //! enum for VPSSMgr types that are responsible for calculating the species //! standard state and reference-state thermodynamic properties. +//! @deprecated Unused. To be removed after Cantera 2.3. enum VPSSMgr_enumType { cVPSSMGR_UNDEF = 1000, //! Variable pressures SS calculator for ideal gas phases diff --git a/src/thermo/VPSSMgrFactory.cpp b/src/thermo/VPSSMgrFactory.cpp index bd1761ca5..c516bb2a9 100644 --- a/src/thermo/VPSSMgrFactory.cpp +++ b/src/thermo/VPSSMgrFactory.cpp @@ -212,6 +212,8 @@ void VPSSMgrFactory::deleteFactory() VPSSMgr_enumType VPSSMgrFactory::VPSSMgr_StringConversion(const std::string& ssModel) const { + warn_deprecated("VPSSMgrFactory::VPSSMgr_StringConversion", + "To be removed after Cantera 2.3."); std::string lssModel = lowercase(ssModel); VPSSMgr_enumType type; if (lssModel == "idealgas") { @@ -310,6 +312,8 @@ VPSSMgr* VPSSMgrFactory::newVPSSMgr(VPStandardStateTP* vp_ptr, VPSSMgr* VPSSMgrFactory::newVPSSMgr(VPSSMgr_enumType type, VPStandardStateTP* vp_ptr) { + warn_deprecated("VPSSMgrFactory::newVPSSMgr(VPSSMgr_enumType, VPStandardStateTP*)", + "To be removed after Cantera 2.3."); static unordered_map types { {cVPSSMGR_IDEALGAS, "idealgas"}, {cVPSSMGR_CONSTVOL, "constvol"}, @@ -325,6 +329,8 @@ VPSSMgr* VPSSMgrFactory::newVPSSMgr(VPSSMgr_enumType type, VPSSMgr* newVPSSMgr(VPSSMgr_enumType type, VPStandardStateTP* vp_ptr, Cantera::VPSSMgrFactory* f) { + warn_deprecated("newVPSSMgr(VPSSMgr_enumType, VPStandardStateTP*, VPSSMgrFactory*)", + "To be removed after Cantera 2.3."); if (f == 0) { f = VPSSMgrFactory::factory(); } diff --git a/src/thermo/VPSSMgrFactory.h b/src/thermo/VPSSMgrFactory.h index 85dc22ba0..722fc51a3 100644 --- a/src/thermo/VPSSMgrFactory.h +++ b/src/thermo/VPSSMgrFactory.h @@ -91,6 +91,7 @@ public: * standardState model attribute and converted to a VPSSMgr_enumType type. * * @param ssModel String representing the VPSSMGr object + * @deprecated Unused. To be removed after Cantera 2.3. */ virtual VPSSMgr_enumType VPSSMgr_StringConversion(const std::string& ssModel) const; @@ -154,6 +155,7 @@ private: * that will be the owner. * @param f Pointer to a VPSSMgrFactory. optional parameter. * Defaults to NULL. + * @deprecated Unused. To be removed after Cantera 2.3. */ VPSSMgr* newVPSSMgr(VPSSMgr_enumType type, VPStandardStateTP* vp_ptr, VPSSMgrFactory* f=0); diff --git a/src/thermo/VPSSMgr_ConstVol.cpp b/src/thermo/VPSSMgr_ConstVol.cpp index 7f304b93e..24b8e186f 100644 --- a/src/thermo/VPSSMgr_ConstVol.cpp +++ b/src/thermo/VPSSMgr_ConstVol.cpp @@ -146,6 +146,8 @@ PDSS_enumType VPSSMgr_ConstVol::reportPDSSType(int k) const VPSSMgr_enumType VPSSMgr_ConstVol::reportVPSSMgrType() const { + warn_deprecated("VPSSMgr_ConstVol::reportVPSSMgrType", + "To be removed after Cantera 2.3."); return cVPSSMGR_CONSTVOL; } } diff --git a/src/thermo/VPSSMgr_General.cpp b/src/thermo/VPSSMgr_General.cpp index 6e99c377a..8e7185137 100644 --- a/src/thermo/VPSSMgr_General.cpp +++ b/src/thermo/VPSSMgr_General.cpp @@ -206,6 +206,8 @@ PDSS_enumType VPSSMgr_General::reportPDSSType(int k) const VPSSMgr_enumType VPSSMgr_General::reportVPSSMgrType() const { + warn_deprecated("VPSSMgr_General::reportVPSSMgrType", + "To be removed after Cantera 2.3."); return cVPSSMGR_GENERAL; } } diff --git a/src/thermo/VPSSMgr_IdealGas.cpp b/src/thermo/VPSSMgr_IdealGas.cpp index ad07d691b..3dce262a9 100644 --- a/src/thermo/VPSSMgr_IdealGas.cpp +++ b/src/thermo/VPSSMgr_IdealGas.cpp @@ -111,6 +111,8 @@ PDSS_enumType VPSSMgr_IdealGas::reportPDSSType(int k) const VPSSMgr_enumType VPSSMgr_IdealGas::reportVPSSMgrType() const { + warn_deprecated("VPSSMgr_IdealGas::reportVPSSMgrType", + "To be removed after Cantera 2.3."); return cVPSSMGR_IDEALGAS; } diff --git a/src/thermo/VPSSMgr_Water_ConstVol.cpp b/src/thermo/VPSSMgr_Water_ConstVol.cpp index 64e6cd834..054de82c7 100644 --- a/src/thermo/VPSSMgr_Water_ConstVol.cpp +++ b/src/thermo/VPSSMgr_Water_ConstVol.cpp @@ -273,6 +273,8 @@ PDSS_enumType VPSSMgr_Water_ConstVol::reportPDSSType(int k) const VPSSMgr_enumType VPSSMgr_Water_ConstVol::reportVPSSMgrType() const { + warn_deprecated("VPSSMgr_Water_ConstVol::reportVPSSMgrType", + "To be removed after Cantera 2.3."); return cVPSSMGR_WATER_CONSTVOL; } } diff --git a/src/thermo/VPSSMgr_Water_HKFT.cpp b/src/thermo/VPSSMgr_Water_HKFT.cpp index b6d632b71..f74242ad9 100644 --- a/src/thermo/VPSSMgr_Water_HKFT.cpp +++ b/src/thermo/VPSSMgr_Water_HKFT.cpp @@ -274,6 +274,8 @@ PDSS_enumType VPSSMgr_Water_HKFT::reportPDSSType(int k) const VPSSMgr_enumType VPSSMgr_Water_HKFT::reportVPSSMgrType() const { + warn_deprecated("VPSSMgr_Water_HKFT::reportVPSSMgrType", + "To be removed after Cantera 2.3."); return cVPSSMGR_WATER_HKFT; } }