From 440c74236c9f50ddbe20559f9f1835c2865fc412 Mon Sep 17 00:00:00 2001 From: Harry Moffat Date: Tue, 12 Jun 2007 17:33:19 +0000 Subject: [PATCH] Made constructPhaseFile() and constructPhaseXML() non-virtual. They are called from the constructor, and it generally is a tricky situation when virtual functions are called from constructors. --- Cantera/src/thermo/DebyeHuckel.h | 4 ++-- Cantera/src/thermo/HMWSoln.cpp | 2 +- Cantera/src/thermo/HMWSoln.h | 8 ++++---- Cantera/src/thermo/IdealMolalSoln.h | 4 ++-- Cantera/src/thermo/IdealSolidSolnPhase.h | 4 ++-- Cantera/src/thermo/WaterSSTP.h | 6 +++--- 6 files changed, 14 insertions(+), 14 deletions(-) diff --git a/Cantera/src/thermo/DebyeHuckel.h b/Cantera/src/thermo/DebyeHuckel.h index fa802f612..e14ad3d7c 100644 --- a/Cantera/src/thermo/DebyeHuckel.h +++ b/Cantera/src/thermo/DebyeHuckel.h @@ -1476,7 +1476,7 @@ namespace Cantera { * phase. If none is given, the first XML * phase element will be used. */ - virtual void constructPhaseFile(std::string infile, std::string id=""); + void constructPhaseFile(std::string infile, std::string id=""); //! Import and initialize a DebyeHuckel phase //! specification in an XML tree into the current object. @@ -1503,7 +1503,7 @@ namespace Cantera { * to see if phaseNode is pointing to the phase * with the correct id. */ - virtual void constructPhaseXML(XML_Node& phaseNode, std::string id=""); + void constructPhaseXML(XML_Node& phaseNode, std::string id=""); //! Process the XML file after species are set up. /*! diff --git a/Cantera/src/thermo/HMWSoln.cpp b/Cantera/src/thermo/HMWSoln.cpp index ccff9c4db..adcdd79af 100644 --- a/Cantera/src/thermo/HMWSoln.cpp +++ b/Cantera/src/thermo/HMWSoln.cpp @@ -1419,7 +1419,7 @@ namespace Cantera { void HMWSoln::setParametersFromXML(const XML_Node& eosdata) { } - /** + /* * Get the saturation pressure for a given temperature. * Note the limitations of this function. Stability considerations * concernting multiphase equilibrium are ignored in this diff --git a/Cantera/src/thermo/HMWSoln.h b/Cantera/src/thermo/HMWSoln.h index e9e262f97..78a0ccf99 100644 --- a/Cantera/src/thermo/HMWSoln.h +++ b/Cantera/src/thermo/HMWSoln.h @@ -1448,7 +1448,7 @@ namespace Cantera { SpeciesThermo& speciesThermo() { return *m_spthermo; } /* - * constructPhaseFile() (virtual from HMWSoln) + * constructPhaseFile() * * Import, construct, and initialize a HMWSoln phase * specification from an XML tree into the current object. @@ -1456,10 +1456,10 @@ namespace Cantera { * This routine is a precursor to constructPhaseXML(XML_Node*) * routine, which does most of the work. */ - virtual void constructPhaseFile(std::string inputFile, std::string id); + void constructPhaseFile(std::string inputFile, std::string id); /* - * constructPhaseXML (virtual from HMWSoln) + * constructPhaseXML * * This is the main routine for constructing the phase. * @@ -1472,7 +1472,7 @@ namespace Cantera { * particular to the specification of the activity * coefficient model for the Pitzer parameterization. */ - virtual void constructPhaseXML(XML_Node& phaseNode, std::string id); + void constructPhaseXML(XML_Node& phaseNode, std::string id); /** * @internal Initialize. This method is provided to allow diff --git a/Cantera/src/thermo/IdealMolalSoln.h b/Cantera/src/thermo/IdealMolalSoln.h index 6b2dff88e..3cb024060 100644 --- a/Cantera/src/thermo/IdealMolalSoln.h +++ b/Cantera/src/thermo/IdealMolalSoln.h @@ -926,7 +926,7 @@ namespace Cantera { * phase. If none is given, the first XML * phase element will be used. */ - virtual void constructPhaseFile(std::string infile, std::string id=""); + void constructPhaseFile(std::string infile, std::string id=""); //! Import and initialize an IdealMolalSoln phase //! specification in an XML tree into the current object. @@ -958,7 +958,7 @@ namespace Cantera { * to see if phaseNode is pointing to the phase * with the correct id. */ - virtual void constructPhaseXML(XML_Node& phaseNode, std::string id); + void constructPhaseXML(XML_Node& phaseNode, std::string id); //! Import and initialize an IdealMolalSoln phase //! specification in an XML tree into the current object. diff --git a/Cantera/src/thermo/IdealSolidSolnPhase.h b/Cantera/src/thermo/IdealSolidSolnPhase.h index 4ff34146f..3b11107f3 100644 --- a/Cantera/src/thermo/IdealSolidSolnPhase.h +++ b/Cantera/src/thermo/IdealSolidSolnPhase.h @@ -918,7 +918,7 @@ namespace Cantera { * phase. If none is given, the first XML * phase element will be used. */ - virtual void constructPhaseFile(std::string infile, std::string id=""); + void constructPhaseFile(std::string infile, std::string id=""); /** * Import and initialize an IdealSolidSolnPhase phase @@ -945,7 +945,7 @@ namespace Cantera { * to see if phaseNode is pointing to the phase * with the correct id. */ - virtual void constructPhaseXML(XML_Node& phaseNode, std::string id=""); + void constructPhaseXML(XML_Node& phaseNode, std::string id=""); /** * Initialization of an IdealSolidSolnPhase phase: diff --git a/Cantera/src/thermo/WaterSSTP.h b/Cantera/src/thermo/WaterSSTP.h index 059263c5a..3566760ce 100644 --- a/Cantera/src/thermo/WaterSSTP.h +++ b/Cantera/src/thermo/WaterSSTP.h @@ -370,7 +370,7 @@ namespace Cantera { virtual void setTemperature(double temp); - virtual void constructPhase(); + void constructPhase(); //! Initialization of a pure water phase using an @@ -385,7 +385,7 @@ namespace Cantera { * phase. If none is given, the first XML * phase element will be used. */ - virtual void constructPhaseFile(std::string inputFile, std::string id); + void constructPhaseFile(std::string inputFile, std::string id); //! Initialization of a pure water phase using an xml file. @@ -399,7 +399,7 @@ namespace Cantera { * phase. If none is given, the first XML * phase element will be used. */ - virtual void constructPhaseXML(XML_Node& phaseNode, std::string id); + void constructPhaseXML(XML_Node& phaseNode, std::string id); //!Import and initialize a ThermoPhase object using an XML tree. /*!