blob: e64d88cf577a22cb724e64bb448320a2b31c3d8d (
plain)
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
|
/***************************************************************************
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
* the Free Software Foundation; either version 2 of the License, or *
* (at your option) any later version. *
* *
* copyright (C) 2006 *
* Umbrello UML Modeller Authors <uml-devel@uml.sf.net> *
***************************************************************************/
// own header
#include "petalnode.h"
PetalNode::PetalNode(NodeType nt) {
m_type = nt;
}
PetalNode::~PetalNode() {
}
PetalNode::NodeType PetalNode::type() const {
return m_type;
}
TQStringList PetalNode::initialArgs() const {
return m_initialArgs;
}
TQString PetalNode::name() const {
if (m_initialArgs.count() == 0)
return TQString();
return m_initialArgs.first();
}
PetalNode::NameValueList PetalNode::attributes() const {
return m_attributes;
}
/*
void PetalNode::setType(PetalNode::NodeType t) {
m_type = t;
}
*/
void PetalNode::setInitialArgs(const TQStringList& args) {
m_initialArgs = args;
}
void PetalNode::setAttributes(PetalNode::NameValueList vl) {
m_attributes = vl;
}
PetalNode::StringOrNode PetalNode::findAttribute(const TQString& name) const {
for (uint i = 0; i < m_attributes.count(); i++) {
if (m_attributes[i].first == name)
return m_attributes[i].second;
}
return StringOrNode();
}
|