Cantera  2.0
Metal.h
1 #ifndef CXX_METAL
2 #define CXX_METAL
3 
4 #include <string>
5 
6 #include "thermo/MetalPhase.h"
8 
9 namespace Cantera
10 {
11 
12 class Metal : public MetalPhase
13 {
14 public:
15  Metal(std::string infile, std::string id="") : m_ok(false), m_r(0) {
16 
17  m_r = get_XML_File(infile);
18  if (id == "-") {
19  id = "";
20  }
21  m_ok = buildSolutionFromXML(*m_r, id, "phase", this, 0);
22  if (!m_ok) throw CanteraError("Metal",
23  "buildSolutionFromXML returned false");
24  }
25 
26  virtual ~Metal() {}
27 
28  bool operator!() {
29  return !m_ok;
30  }
31  bool ready() const {
32  return m_ok;
33  }
34 
35 protected:
36  bool m_ok;
37  XML_Node* m_r;
38 
39 private:
40 };
41 }
42 
43 
44 #endif