File: UmlBaseClassMember.h

package info (click to toggle)
bouml 2.19.2-1
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 42,364 kB
  • ctags: 33,402
  • sloc: cpp: 169,092; makefile: 135
file content (107 lines) | stat: -rw-r--r-- 2,777 bytes parent folder | download | duplicates (6)
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
#ifndef _UMLBASECLASSMEMBER_H
#define _UMLBASECLASSMEMBER_H


#include "UmlClassItem.h"
#include "aVisibility.h"
#include <qcstring.h>
#include "UmlBaseClassItem.h"

// This class manages 'true' class's items : attributes, relation,
// operation and sub-classes
class UmlBaseClassMember : public UmlClassItem {
  public:
    // Indicate if the member is a 'class member' (static)
    // Always false in case of a class
    bool isClassMember();

    // Set if the member is a 'class member' (static), not significant for a class
    //
    // On error return FALSE in C++, produce a RuntimeException in Java,
    // does not check that the class is (already) a typedef
    bool set_isClassMember(bool y);

    // Indicate if the member is 'volatile'
    // Always false in case of a class
    bool isVolatile();

    // Set if the member is 'volatile', not significant for a class
    //
    // On error return FALSE in C++, produce a RuntimeException in Java,
    // does not check that the class is (already) a typedef
    bool set_isVolatile(bool y);

    // The member's visibility
    aVisibility visibility();

    // Set the member visibility,  DefaultVisibility is not legal
    //
    // On error return FALSE in C++, produce a RuntimeException in Java,
    // does not check that the class is (already) a typedef
    bool set_Visibility(aVisibility v);

#ifdef WITHCPP
    // Special case for C++, thank to the 'friend class X' it may be
    // usefull to have a C++ visibility != other visibility
    // In case the C++ visibility must follow the other, return
    // DefaultVisibility
    aVisibility cppVisibility();

    // Set the visibility for C++, DefaultVisibility is legal
    //
    // On error return FALSE in C++, produce a RuntimeException in Java,
    // does not check that the class is (already) a typedef
    bool set_CppVisibility(aVisibility v);
#endif

#ifdef WITHJAVA
    // returns the Java annotations
    QCString javaAnnotations();

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


  private:
    bool _class_member;

    bool _volatile;

    aVisibility _visibility : 8;

#ifdef WITHCPP
    aVisibility _cpp_visibility : 8;
#endif

#ifdef WITHJAVA
    QCString _java_annotation;
#endif


  protected:
    UmlBaseClassMember(void * id, const QCString & n) : UmlClassItem(id, n) {};

    //internal, do NOT use it
    
    void read_uml_();

#ifdef WITHCPP
    //internal, do NOT use it
    
    virtual void read_cpp_();
#endif

#ifdef WITHJAVA
    virtual void read_java_();
#endif

  friend class UmlBaseOperation;
  friend class UmlBaseAttribute;
  friend class UmlBaseRelation;
  friend class UmlBaseClass;
};

#endif