File: UmlBaseState.cpp

package info (click to toggle)
bouml 4.21-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 73,336 kB
  • ctags: 55,459
  • sloc: cpp: 290,644; makefile: 228; sh: 13
file content (162 lines) | stat: -rw-r--r-- 3,567 bytes parent folder | download
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162

#include "UmlCom.h"
#include "UmlBaseState.h"
#include "UmlState.h"
#include "UmlOperation.h"
#include "UmlStateDiagram.h"

UmlState * UmlBaseState::create(UmlItem * parent, const char * s)
{
  return (UmlState *) parent->create_(aState, s);
}

anItemKind UmlBaseState::kind() {
  return aState;
}

const QCString & UmlBaseState::entryBehavior() {
  read_if_needed_();
  return _uml.on_entry;
}

bool UmlBaseState::set_EntryBehavior(const char * s) {
  return set_it_(_uml.on_entry, s, setUmlEntryBehaviorCmd);
}

const QCString & UmlBaseState::exitBehavior() {
  read_if_needed_();
  return _uml.on_exit;
}

bool UmlBaseState::set_ExitBehavior(const char * s) {
  return set_it_(_uml.on_exit, s, setUmlExitBehaviorCmd);
}

const QCString & UmlBaseState::doActivity() {
  read_if_needed_();
  return _uml.do_activity;
}

bool UmlBaseState::set_DoActivity(const char * s) {
  return set_it_(_uml.do_activity, s, setUmlActivityCmd);
}

#ifdef WITHCPP
const QCString & UmlBaseState::cppEntryBehavior() {
  read_if_needed_();
  return _cpp.on_entry;
}

bool UmlBaseState::set_CppEntryBehavior(const char * s) {
  return set_it_(_cpp.on_entry, s, setCppEntryBehaviorCmd);
}

const QCString & UmlBaseState::cppExitBehavior() {
  read_if_needed_();
  return _cpp.on_exit;
}

bool UmlBaseState::set_CppExitBehavior(const char * s) {
  return set_it_(_cpp.on_exit, s, setCppExitBehaviorCmd);
}

const QCString & UmlBaseState::cppDoActivity() {
  read_if_needed_();
  return _cpp.do_activity;
}

bool UmlBaseState::set_CppDoActivity(const char * s) {
  return set_it_(_cpp.do_activity, s, setCppActivityCmd);
}
#endif

#ifdef WITHJAVA
const QCString & UmlBaseState::javaEntryBehavior() {
  read_if_needed_();
  return _java.on_entry;
}

bool UmlBaseState::set_JavaEntryBehavior(const char * s) {
  return set_it_(_java.on_entry, s, setJavaEntryBehaviorCmd);
}

const QCString & UmlBaseState::javaExitBehavior() {
  read_if_needed_();
  return _java.on_exit;
}

bool UmlBaseState::set_JavaExitBehavior(const char * s) {
  return set_it_(_java.on_exit, s, setJavaExitBehaviorCmd);
}

const QCString & UmlBaseState::javaDoActivity() {
  read_if_needed_();
  return _java.do_activity;
}

bool UmlBaseState::set_JavaDoActivity(const char * s) {
  return set_it_(_java.do_activity, s, setJavaActivityCmd);
}
#endif

UmlOperation * UmlBaseState::specification() {
  read_if_needed_();
  return _specification;
}

bool UmlBaseState::set_Specification(UmlOperation * v) {
  UmlCom::send_cmd(_identifier, setDefCmd, (v == 0) ? (void *) v : ((UmlBaseItem *) v)->_identifier);
  if (UmlCom::read_bool()) {
    _specification = v;
    return TRUE;
  }
  else
    return FALSE;
}

UmlStateDiagram * UmlBaseState::associatedDiagram() {
  read_if_needed_();

  return _assoc_diagram;
}

bool UmlBaseState::set_AssociatedDiagram(UmlStateDiagram * d) {
  UmlCom::send_cmd(_identifier, setAssocDiagramCmd, (d == 0) ? (void *) 0 : ((UmlBaseItem *) d)->_identifier);
  if (UmlCom::read_bool()) {
    _assoc_diagram = d;
    return TRUE;
  }
  else
    return FALSE;
}

void UmlBaseState::unload(bool rec, bool del) {
  _uml.unload();
#ifdef WITHCPP
  _cpp.unload();
#endif
#ifdef WITHJAVA
  _java.unload();
#endif
  UmlBaseItem::unload(rec, del);
}

void UmlBaseState::read_uml_() {
  _assoc_diagram = (UmlStateDiagram *) UmlBaseItem::read_();
  UmlBaseItem::read_uml_();
  _uml.read();
  _specification = (UmlOperation *) UmlBaseItem::read_();
}

#ifdef WITHCPP
void UmlBaseState::read_cpp_() {
  _cpp.read();
}
#endif

#ifdef WITHJAVA
void UmlBaseState::read_java_() {
  _java.read();
}
#endif