File: UmlBaseExtraClassMember.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 (73 lines) | stat: -rw-r--r-- 2,101 bytes parent folder | download | duplicates (32)
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
#ifndef _UMLBASEEXTRACLASSMEMBER_H
#define _UMLBASEEXTRACLASSMEMBER_H


#include "UmlClassItem.h"
#include "anItemKind.h"
#include <qcstring.h>

class UmlExtraClassMember;
class UmlClass;

// Manage the 'extra' class members to produce any code, for instance a C++ pre-processing form or a Java initialization

class UmlBaseExtraClassMember : public UmlClassItem {
  public:
    // returns a new extra class member named 'name'  (the name may be empty)
    // created under the class 'parent'
    //
    // In case it cannot be created (the name is already used or
    // invalid, 'parent' cannot contain it etc ...) return 0 in C++
    // and produce a RuntimeException in Java
    static UmlExtraClassMember * create(UmlClass * parent, const char * name);

    // returns the kind of the item
    virtual anItemKind kind();

#ifdef WITHCPP
    // returns TRUE if the extra member is managed as an inline operation in C++
    
    bool isCppInline();

    // to set if the extra member is managed as an inline operation in C++
    // 
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_isCppInline(bool y);

    // returns the operation's definition in C++, notes that the declaration
    // is returned by the inherited ClassItemBase::CppDecl() operation
    const QCString & cppDef();

    // sets the operation's definition in C++, notes that the declaration
    // is set through the inherited ClassItemBase::set_CppDecl() operation
    //
    // On error return FALSE in C++, produce a RuntimeException in Java
    bool set_CppDef(const char * s);
#endif

    // to unload the object to free memory, it will be reloaded
    // automatically if needed. args unused
    virtual void unload(bool = FALSE, bool = FALSE);


  private:
#ifdef WITHCPP
    bool _cpp_inline;
    

    QCString _cpp_def;
#endif

  protected:
    // the constructor, do not call it yourself !!!!!!!!!!
    UmlBaseExtraClassMember(void * id, const QCString & n) : UmlClassItem(id, n) {};

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

};

#endif