-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathclasses.cc
74 lines (62 loc) · 943 Bytes
/
classes.cc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#include "classes.hh"
Element::Element()
{
name = "";
type = simple;
attrs = new Attribute();
params = new Parameter();
indicator = all;
}
Element::~Element()
{
}
Element* Element::find_child(string name) {
for (auto i = elements.begin(); i != elements.end(); ++i)
{
if ((*i)->name == name)
{
return (*i);
}
}
return NULL;
}
Attribute::Attribute()
{
name = "";
type = xsstring;
def = "";
fixed = "";
use = "optional";
}
Attribute::~Attribute()
{
}
Parameter::Parameter()
{
type = xsstring;
maxOccurs = 1;
minOccurs = 1;
}
Parameter::~Parameter()
{
}
DataAttr::DataAttr()
{
attr_name = "";
attr_val = "";
attr_val_type = t_string;
}
DataAttr::~DataAttr()
{
}
DataUnit::DataUnit()
{
name = "";
data = "";
data_type = t_string;
attr = new DataAttr();
unit_type = simple;
}
DataUnit::~DataUnit()
{
}