cantera/include/cantera/Edge.h
Ray Speth 217d780233 Fix calls to CanteraError with blank or incorrect first argument
The first argument should be the function name from which the exception was
thrown. Leaving this blank makes it difficult to track down the location of the
exception.
2015-06-09 12:03:57 -04:00

51 lines
897 B
C++

//! @file Edge.h
#ifndef CXX_EDGE
#define CXX_EDGE
#include "thermo.h"
#include "kinetics/EdgeKinetics.h"
#include "kinetics/importKinetics.h"
namespace Cantera
{
class Edge :
public EdgePhase, public EdgeKinetics
{
public:
Edge(const std::string& infile, std::string id, std::vector<ThermoPhase*> phases)
: m_ok(false), m_r(0) {
m_r = get_XML_File(infile);
if (id == "-") {
id = "";
}
XML_Node* x = get_XML_Node("#"+id, m_r);
if (!x) {
throw CanteraError("Edge::Edge","error in get_XML_Node");
}
importPhase(*x, this);
phases.push_back(this);
importKinetics(*x, phases, this);
m_ok = true;
}
bool operator!() {
return !m_ok;
}
bool ready() const {
return m_ok;
}
protected:
bool m_ok;
XML_Node* m_r;
private:
};
}
#endif