Deprecate PDSS construction directly from XML files

The constructors from existing XML_Nodes are the ones that are actually used.
This commit is contained in:
Ray Speth 2015-08-03 17:16:38 -04:00
parent 2334410b5b
commit ea1f7c015b
12 changed files with 36 additions and 0 deletions

View file

@ -44,6 +44,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_ConstVol(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id = "");
@ -135,6 +136,7 @@ public:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id);

View file

@ -65,6 +65,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_HKFT(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id = "");
@ -156,6 +157,7 @@ public:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id);

View file

@ -58,6 +58,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_IdealGas(VPStandardStateTP* tp, int spindex,
const std::string& inputFile, const std::string& id = "");
@ -131,6 +132,7 @@ public:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id);

View file

@ -49,6 +49,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_IonsFromNeutral(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id = "");
@ -146,6 +147,7 @@ public:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id);

View file

@ -177,6 +177,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_SSVol(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id = "");
@ -272,6 +273,7 @@ private:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, size_t spindex,
const std::string& inputFile, const std::string& id);

View file

@ -93,6 +93,7 @@ public:
* @param id String name of the phase in the input file. The default
* is the empty string, in which case the first phase in the
* file is used.
* @deprecated To be removed after Cantera 2.3.
*/
PDSS_Water(VPStandardStateTP* tp, int spindex,
const std::string& inputFile, const std::string& id = "");
@ -238,6 +239,7 @@ public:
* @param id Optional parameter identifying the name of the
* phase. If none is given, the first XML
* phase element will be used.
* @deprecated To be removed after Cantera 2.3.
*/
void constructPDSSFile(VPStandardStateTP* vptp_ptr, int spindex,
const std::string& inputFile, const std::string& id);

View file

@ -28,6 +28,8 @@ PDSS_ConstVol::PDSS_ConstVol(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id) :
PDSS(tp, spindex)
{
warn_deprecated("PDSS_ConstVol constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pdssType = cPDSS_CONSTVOL;
constructPDSSFile(tp, spindex, inputFile, id);
}
@ -95,6 +97,8 @@ void PDSS_ConstVol::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile,
const std::string& id)
{
warn_deprecated("PDSS_ConstVol::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_ConstVol::initThermo",
"input file is null");

View file

@ -83,6 +83,8 @@ PDSS_HKFT::PDSS_HKFT(VPStandardStateTP* tp, size_t spindex,
m_domega_jdT_prtr(0.0),
m_charge_j(0.0)
{
warn_deprecated("PDSS_HKFT constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pres = OneAtm;
m_pdssType = cPDSS_MOLAL_HKFT;
m_presR_bar = OneAtm * 1.0E-5;
@ -617,6 +619,8 @@ void PDSS_HKFT::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile,
const std::string& id)
{
warn_deprecated("PDSS_HKFT::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_HKFT::initThermo",
"input file is null");

View file

@ -28,6 +28,8 @@ PDSS_IdealGas::PDSS_IdealGas(VPStandardStateTP* tp, int spindex,
const std::string& inputFile, const std::string& id) :
PDSS(tp, spindex)
{
warn_deprecated("PDSS_IdealGas constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pdssType = cPDSS_IDEALGAS;
constructPDSSFile(tp, spindex, inputFile, id);
}
@ -76,6 +78,8 @@ void PDSS_IdealGas::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile,
const std::string& id)
{
warn_deprecated("PDSS_IdealGas::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_IdealGas::constructPDSSFile",
"input file is null");

View file

@ -38,6 +38,8 @@ PDSS_IonsFromNeutral::PDSS_IonsFromNeutral(VPStandardStateTP* tp, size_t spindex
add2RTln2_(true),
specialSpecies_(0)
{
warn_deprecated("PDSS_IonsFromNeutral constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pdssType = cPDSS_IONSFROMNEUTRAL;
constructPDSSFile(tp, spindex, inputFile, id);
}
@ -164,6 +166,8 @@ void PDSS_IonsFromNeutral::constructPDSSXML(VPStandardStateTP* tp, size_t spinde
void PDSS_IonsFromNeutral::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id)
{
warn_deprecated("PDSS_IonsFromNeutral::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_IonsFromNeutral::constructPDSSFile",
"input file is null");

View file

@ -35,6 +35,8 @@ PDSS_SSVol::PDSS_SSVol(VPStandardStateTP* tp,
volumeModel_(cSSVOLUME_CONSTANT),
m_constMolarVolume(-1.0)
{
warn_deprecated("PDSS_SSVol constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pdssType = cPDSS_SSVOL;
constructPDSSFile(tp, spindex, inputFile, id);
}
@ -123,6 +125,8 @@ void PDSS_SSVol::constructPDSSXML(VPStandardStateTP* tp, size_t spindex,
void PDSS_SSVol::constructPDSSFile(VPStandardStateTP* tp, size_t spindex,
const std::string& inputFile, const std::string& id)
{
warn_deprecated("PDSS_SSVol::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_SSVol::initThermo",
"input file is null");

View file

@ -59,6 +59,8 @@ PDSS_Water::PDSS_Water(VPStandardStateTP* tp, int spindex,
m_verbose(0),
m_allowGasPhase(false)
{
warn_deprecated("PDSS_Water constructor from XML input file",
"To be removed after Cantera 2.3.");
m_pdssType = cPDSS_WATER;
constructPDSSFile(tp, spindex, inputFile, id);
m_spthermo = 0;
@ -140,6 +142,8 @@ void PDSS_Water::constructPDSSXML(VPStandardStateTP* tp, int spindex,
void PDSS_Water::constructPDSSFile(VPStandardStateTP* tp, int spindex,
const std::string& inputFile, const std::string& id)
{
warn_deprecated("PDSS_Water::constructPDSSFile",
"To be removed after Cantera 2.3.");
if (inputFile.size() == 0) {
throw CanteraError("PDSS_Water::constructPDSSFile",
"input file is null");