File: UmlActivity.cpp

package info (click to toggle)
bouml 4.4.2-1
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 64,396 kB
  • ctags: 49,113
  • sloc: cpp: 244,497; makefile: 219
file content (123 lines) | stat: -rw-r--r-- 2,226 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

#include "UmlActivityDiagram.h"
#include "UmlActivity.h"

QCString UmlActivity::sKind() {
  return "activity";
}

void UmlActivity::html(QCString pfix, unsigned int rank, unsigned int level) {
  define();

  chapter("Activity", pfix, rank, "activity", level);
  
  QCString s = description();
  
  if (!s.isEmpty()) {
    fw.write("<p>");
    writeq(description());
    fw.write("<br /></p>");
  }

  if (isReadOnly()) {
    if (isSingleExecution())
      fw.write("<p>Read only, single execution</p>");
    else
      fw.write("<p>Read only</p>");
  }
  else if (isSingleExecution())
    fw.write("<p>Single execution</p>");

  fw.write("<p>Pre Condition :</p><ul>");
  
  s = preCondition();

  if (!s.isEmpty()) {
    fw.write("<li>OCL : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  s = cppPreCondition();

  if (!s.isEmpty()) {
    fw.write("<li>C++ : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  s = javaPreCondition();

  if (!s.isEmpty()) {
    fw.write("<li>Java : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  fw.write("</ul>");

  fw.write("<p>Post Condition :</p><ul>");
  
  s = postCondition();

  if (!s.isEmpty()) {
    fw.write("<li>OCL : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  s = cppPostCondition();

  if (!s.isEmpty()) {
    fw.write("<li>C++ : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  s = javaPostCondition();

  if (!s.isEmpty()) {
    fw.write("<li>Java : <pre>\n");
    writeq(s);
    fw.write("</pre></li>");
  }

  fw.write("</ul>");
 
  UmlActivityDiagram * d = associatedDiagram();
  
  if (d != 0) {
    fw.write("<p>Diagram : ");
    d->write();
    fw.write("</p>");
  }
  
  write_properties();

  write_children(pfix, rank, level);

  unload(FALSE, FALSE);
}

void UmlActivity::memo_ref() {
  activities.addElement(this);
  UmlItem::memo_ref();
}

void UmlActivity::ref_index()
{
  if (!activities.isEmpty())
    fw.write("<a href=\"activities.html\" target = \"projectFrame\"><b> -Activities- </b></a>");
}

void UmlActivity::generate_index()
{
  UmlItem::generate_index(activities, "Activities", "activities");
}

bool UmlActivity::chapterp() {
  return TRUE;
}

Vector UmlActivity::activities;