File: UmlBaseFragmentCompartment.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 (36 lines) | stat: -rw-r--r-- 988 bytes parent folder | download | duplicates (7)
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

#include "UmlCom.h"
#include "UmlBaseFragmentCompartment.h"
#include "UmlBaseFragment.h"

void UmlBaseFragmentCompartment::add_contained_(UmlFragment * x) {
  _contained.resize(_contained.size() + 1);
  _contained.insert(_contained.size() - 1, x);
}

void UmlBaseFragmentCompartment::add_text_(QCString x) {
  _texts.resize(_texts.size() + 1);
  _texts.insert(_texts.size() - 1, strdup(x));
}

void UmlBaseFragmentCompartment::add_cont_(QCString s, int cy) {
  if (cy < _fragment->vcenter_(_rank))
    _start_continuation = s;
  else
    _end_continuation = s;
}

bool UmlBaseFragmentCompartment::smaller(const UmlBaseFragmentCompartment * x) const {
  return ((_fragment->w() < x->_fragment->w()) &&
          (_fragment->h() < x->_fragment->h()));
}

void UmlBaseFragmentCompartment::read_(UmlBaseFragment * fragment, int rank) {
  _fragment = (UmlFragment *) fragment;
  _rank = rank;
  _y = UmlCom::read_unsigned();
}

 UmlBaseFragmentCompartment::~UmlBaseFragmentCompartment() {
}