File: UmlClassInstance.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 (77 lines) | stat: -rw-r--r-- 1,505 bytes parent folder | download | duplicates (2)
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

#include "UmlCom.h"
#include "UmlClass.h"
#include "UmlAttribute.h"
#include "UmlRelation.h"
#include "UmlClassInstance.h"

QCString UmlClassInstance::sKind() {
  return "class instance";
}

void UmlClassInstance::html(QCString, unsigned int, unsigned int) {
  define();

  fw.write("<table><tr><td><div class=\"element\">Class instance  <b>");
  writeq(name());
  fw.write("</div></td></tr></table>");
  
  QCString s = description();

  if (!s.isEmpty()) {
    fw.write("<p>");
    writeq(s);
    fw.write("<br /></p>");
  }

  fw.write("<p>type :");
  type()->write();
  fw.write("</p>");
  
  QValueList<SlotAttribute> va;
  
  attributesValue(va);
  
  if (!va.isEmpty()) {
    fw.write("<p>attributes :<ul>\n");
    
    QValueList<SlotAttribute>::Iterator it;
    
    for (it = va.begin(); it != va.end(); ++it) {
      SlotAttribute & slot = *it;

      fw.write("<li>");
      slot.attribute->write();
      fw.write(" = ");
      writeq(slot.value);
      fw.write("</li>\n");
    }
    fw.write("</ul></p>");
  }
  
  QValueList<SlotRelation> vr;
  
  relationsValue(vr);
  
  if (!vr.isEmpty()) {
    fw.write("<p>relations :<ul>\n");
    
    QValueList<SlotRelation>::Iterator it;
    
    for (it = vr.begin(); it != vr.end(); ++it) {
      SlotRelation & slot = *it;

      fw.write("<li>");
      slot.relation->write();
      fw.write(" = ");
      slot.value->write();
      fw.write("</li>\n");
    }
    fw.write("</ul></p>");
  }

  write_properties();

  unload(FALSE, FALSE);
}