cantera/Cantera/cxx/include/Edge.h
Harry Moffat 85d0d72fc9 Fixed compilation errors on solaris.
Solaris picks up const and non-const differences between parent and
child member functions.
2007-07-13 17:15:19 +00:00

47 lines
972 B
C++

#ifndef CXX_EDGE
#define CXX_EDGE
#include <string>
#include "kernel/EdgePhase.h"
#include "kernel/EdgeKinetics.h"
#include "kernel/importKinetics.h"
namespace Cantera {
class Edge :
public EdgePhase, public EdgeKinetics
{
public:
Edge(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","error in get_XML_Node");
importPhase(*x, this);
phases.push_back(this);
importKinetics(*x, phases, this);
m_ok = true;
}
virtual ~Edge() {}
bool operator!() { return !m_ok;}
bool ready() const { return m_ok; }
protected:
bool m_ok;
XML_Node* m_r;
private:
};
}
#endif