File: UmlBaseFragment.h

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 (76 lines) | stat: -rw-r--r-- 1,398 bytes parent folder | download | duplicates (3)
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
#ifndef _UMLBASEFRAGMENT_H
#define _UMLBASEFRAGMENT_H


#include <qcstring.h>
#include <qvector.h>

class UmlFragmentCompartment;
class UmlFragment;

// this class manages fragments
class UmlBaseFragment {
  public:
    // return the name
    const QCString & name() const {
        return _name;
    }

    // return the compartments, at least one compartment exists
    const QVector<UmlFragmentCompartment> & compartments() const {
        return _compartments;
    }

    // return the fragment compartment containing the fragment,
    // or 0/null
    UmlFragmentCompartment * container() const {
        return _container;
    }


  private:
    UmlFragmentCompartment * _container;

    QVector<UmlFragmentCompartment> _compartments;

    QCString _name;

    int _x;

    int _y;

    int _w;

    int _h;

    // internal, don't call it
    void read_();


  public:
    // internal
    static UmlFragmentCompartment * get_container_(int x, int y, int w, int h, const QVector<UmlFragment> & fragments);


  private:
    // internal
    static void compute_container_(QVector<UmlFragment> & fragments);


  public:
    int w() const {
        return _w;
    }

    int h() const {
        return _h;
    }

    //  to avoid compiler warning, don't call it
     ~UmlBaseFragment();

  friend class UmlBaseUseCaseDiagramDefinition;
  friend class UmlBaseSequenceDiagramDefinition;
};

#endif