File: UmlBaseFlow.h

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 (168 lines) | stat: -rw-r--r-- 4,333 bytes parent folder | download | duplicates (19)
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
163
164
165
166
167
168
#ifndef _UMLBASEFLOW_H
#define _UMLBASEFLOW_H


#include "UmlItem.h"
#include "anItemKind.h"
#include <qcstring.h>
#include "FlowBehavior.h"

class UmlFlow;
class UmlActivityNode;

class UmlBaseFlow : public UmlItem {
  public:
    // returns the kind of the item
    virtual anItemKind kind();

    // Returns a new flow from 'start' to 'end'
    //
    // In case it cannot be created ('parent' cannot contain it etc ...) return 0
    //  in C++ and produce a RuntimeException in Java
    
    static UmlFlow * create(UmlActivityNode * start, UmlActivityNode * end);

    // returns the 'end' object (the 'start' object is the parent of the flow) no set !
    virtual UmlActivityNode * target();

    // return the weight in OCL
    const QCString & weight();

    // set the weight in OCL
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_Weight(const char * v);

    // return the guard in OCL
    const QCString & guard();

    // set the guard in OCL
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_Guard(const char * v);

    // return the selection in OCL
    const QCString & selection();

    // set the selection in OCL
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_Selection(const char * v);

    // return the transformation in OCL
    const QCString & transformation();

    // set the transformation in OCL
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_Transformation(const char * v);

#ifdef WITHCPP
    // return the weight in C++
    const QCString & cppWeight();

    // set the weight in C++
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_CppWeight(const char * v);

    // return the guard in C++
    const QCString & cppGuard();

    // set the guard in C++
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_CppGuard(const char * v);

    // return the selection in C++
    const QCString & cppSelection();

    // set the selection in C++
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_CppSelection(const char * v);

    // return the transformation in C++
    const QCString & cppTransformation();

    // set the transformation in C++
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_CppTransformation(const char * v);
#endif

#ifdef WITHJAVA
    // return the weight in Java
    const QCString & javaWeight();

    // set the weight in Java
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_JavaWeight(const char * v);

    // return the guard in Java
    const QCString & javaGuard();

    // set the guard in Java
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_JavaGuard(const char * v);

    // return the selection in Java
    const QCString & javaSelection();

    // set the selection in Java
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_JavaSelection(const char * v);

    // return the transformation in Java
    const QCString & javaTransformation();

    // set the transformation in Java
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_JavaTransformation(const char * v);
#endif

    // to unload the object to free memory, it will be reloaded automatically
    // if needed. Recursively done for the sub items if 'rec' is TRUE. 
    //
    // if 'del' is true the sub items are deleted in C++, and removed from the
    // internal dictionnary in C++ and Java (to allow it to be garbaged),
    // you will have to call Children() to re-access to them
    virtual void unload(bool = FALSE, bool = FALSE);


  private:
    UmlActivityNode * _target;

    FlowBehavior _uml;

#ifdef WITHCPP
    FlowBehavior _cpp;
#endif

#ifdef WITHJAVA
    FlowBehavior _java;
#endif


  protected:
    virtual void read_uml_();

#ifdef WITHCPP
    virtual void read_cpp_();
#endif

#ifdef WITHJAVA
    virtual void read_java_();
#endif

    //  the constructor, do not call it yourself !!!!!!!!!!
     UmlBaseFlow(void * id, const QCString & s) : UmlItem(id, s) {
    }

};

#endif