Cantera
2.0
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
include
cantera
Edge.h
1
#ifndef CXX_EDGE
2
#define CXX_EDGE
3
4
#include <string>
5
6
#include "
thermo/EdgePhase.h
"
7
#include "
kinetics/EdgeKinetics.h
"
8
#include "
kinetics/importKinetics.h
"
9
10
namespace
Cantera
11
{
12
13
class
Edge :
14
public
EdgePhase,
public
EdgeKinetics
15
{
16
public
:
17
Edge(std::string infile, std::string
id
, std::vector<ThermoPhase*> phases)
18
: m_ok(false), m_r(0) {
19
20
m_r =
get_XML_File
(infile);
21
if
(
id
==
"-"
) {
22
id
=
""
;
23
}
24
25
XML_Node* x =
get_XML_Node
(
"#"
+
id
, m_r);
26
if
(!x) {
27
throw
CanteraError(
"Edge"
,
"error in get_XML_Node"
);
28
}
29
30
importPhase
(*x,
this
);
31
phases.push_back(
this
);
32
importKinetics
(*x, phases,
this
);
33
m_ok =
true
;
34
}
35
36
37
virtual
~Edge() {}
38
39
bool
operator!() {
40
return
!m_ok;
41
}
42
bool
ready()
const
{
43
return
m_ok;
44
}
45
46
protected
:
47
bool
m_ok;
48
XML_Node* m_r;
49
50
private
:
51
};
52
}
53
54
55
#endif
Generated by
1.8.2