Deprecate (previously) unused convenience wrapper classes
- Edge.h, IncompressibleSolid.h and Metal.h
This commit is contained in:
parent
9f6cba3c33
commit
eda3b2fbfb
3 changed files with 29 additions and 2 deletions
|
|
@ -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<ThermoPhase*> 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 = "";
|
||||
|
|
|
|||
|
|
@ -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!() {
|
||||
|
|
|
|||
|
|
@ -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!() {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue