1
////////////////////////////////////////////////////////////////////////////////
3
// This file is part of Toolkit for Conceptual Modeling (TCM).
4
// (c) copyright 1995, Vrije Universiteit Amsterdam.
5
// Author: Frank Dehne (frank@cs.vu.nl).
7
// TCM is free software; you can redistribute it and/or modify
8
// it under the terms of the GNU General Public License as published by
9
// the Free Software Foundation; either version 2 of the License, or
10
// (at your option) any later version.
12
// TCM is distributed in the hope that it will be useful,
13
// but WITHOUT ANY WARRANTY; without even the implied warranty of
14
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
// GNU General Public License for more details.
17
// You should have received a copy of the GNU General Public License
18
// along with TCM; if not, write to the Free Software
19
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
21
////////////////////////////////////////////////////////////////////////////////
25
DCFGraph::DCFGraph(): DFGraph() {
28
nodeTypes[i++] = Code::COMMENT;
29
nodeTypes[i++] = Code::DATA_PROCESS;
30
nodeTypes[i++] = Code::CONTROL_PROCESS;
31
nodeTypes[i++] = Code::DATA_STORE;
32
nodeTypes[i++] = Code::EVENT_STORE;
33
nodeTypes[i++] = Code::EXTERNAL_ENTITY;
34
nodeTypes[i++] = Code::SPLIT_MERGE_NODE;
37
edgeTypes[j++] = Code::DATA_FLOW;
38
edgeTypes[j++] = Code::BIDIRECTIONAL_DATA_FLOW;
39
edgeTypes[j++] = Code::CONTINUOUS_DATA_FLOW;
40
edgeTypes[j++] = Code::EVENT_FLOW;
41
edgeTypes[j++] = Code::CONTINUOUS_EVENT_FLOW;
45
void DCFGraph::InitConnections() {
46
int DP=Code::GetIndex(Code::DATA_PROCESS, nodeTypes);
47
int DS=Code::GetIndex(Code::DATA_STORE, nodeTypes);
48
int EE=Code::GetIndex(Code::EXTERNAL_ENTITY, nodeTypes);
49
int SN=Code::GetIndex(Code::SPLIT_MERGE_NODE, nodeTypes);
50
int CP=Code::GetIndex(Code::CONTROL_PROCESS, nodeTypes);
51
int ES=Code::GetIndex(Code::EVENT_STORE, nodeTypes);
53
int DD=Code::GetIndex(Code::DATA_FLOW, edgeTypes);
54
int BD=Code::GetIndex(Code::BIDIRECTIONAL_DATA_FLOW, edgeTypes);
55
int CD=Code::GetIndex(Code::CONTINUOUS_DATA_FLOW, edgeTypes);
56
int DE=Code::GetIndex(Code::EVENT_FLOW, edgeTypes);
57
int CE=Code::GetIndex(Code::CONTINUOUS_EVENT_FLOW, edgeTypes);
59
connections[EE][EE][DD] = True;
60
connections[EE][EE][BD] = True;
61
connections[EE][EE][CD] = True;
63
connections[EE][DP][DD] = True;
64
connections[EE][DP][DE] = True;
65
connections[EE][DP][CD] = True;
66
connections[EE][DP][CE] = True;
68
connections[EE][CP][DE] = True;
69
connections[EE][CP][CE] = True;
71
connections[DP][EE][DD] = True;
72
connections[DP][EE][DE] = True;
73
connections[DP][EE][CD] = True;
74
connections[DP][EE][CE] = True;
76
connections[DP][DP][DD] = True;
77
connections[DP][DP][DE] = True;
78
connections[DP][DP][CD] = True;
79
connections[DP][DP][CE] = True;
81
connections[DP][CP][DE] = True;
82
connections[DP][CP][CE] = True;
84
connections[DP][DS][DD] = True;
85
connections[DP][DS][BD] = True;
86
connections[DP][DS][CD] = True;
88
connections[DP][SN][DD] = True;
89
connections[DP][SN][CD] = True;
91
connections[CP][EE][DE] = True;
92
connections[CP][EE][CE] = True;
94
connections[CP][DP][DE] = True;
96
connections[CP][CP][DE] = True;
97
connections[CP][CP][CE] = True;
99
connections[CP][ES][DE] = True;
100
connections[CP][ES][CE] = True;
102
connections[DS][DP][DD] = True;
103
connections[DS][DP][CD] = True;
104
connections[DS][DP][BD] = True;
106
connections[ES][CP][DE] = True;
107
connections[ES][CP][CE] = True;
109
connections[SN][DP][DD] = True;
110
connections[SN][DP][CD] = True;