File: UmlSettings.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 (152 lines) | stat: -rw-r--r-- 4,136 bytes parent folder | download
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
#ifndef _UMLSETTINGS_H
#define _UMLSETTINGS_H


#include <qcstring.h>
#include "aLanguage.h"
#include <qdict.h>

struct UmlBuiltin;
struct UmlStereotype;

// This class manages settings not linked with a language, configured through
// the 'Generation settings' dialog.
//
// This class may be defined as a 'singleton', but I prefer to use static
// members allowing to just write 'UmlSettings::member' rather than
// 'UmlSettings::instance()->member' or other long sentence like this.

class UmlSettings {
  public:
    // return the default description
    static QCString artifactDescription();

    // set the default description
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_ArtifactDescription(QCString v);

    // return the default description
    static QCString classDescription();

    // set the default description
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_ClassDescription(QCString v);

    // return the default description
    static QCString operationDescription();

    // set the default description
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_OperationDescription(QCString v);

    // return the default description
    static QCString attributeDescription();

    // set the default description
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_AttributeDescription(QCString v);

    // return the default description
    static QCString relationDescription();

    // set the default description
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_RelationDescription(QCString v);

    // return the language from which the getter's name rule must be followed at Uml level
    static aLanguage umlGetName();

    // set the language from which the getter's name rule must be followed at Uml level
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_UmlGetName(aLanguage v);

    // return the language from which the setter's name rule must be followed at Uml level
    static aLanguage umlSetName();

    // set the language from which the setter's name rule must be followed at Uml level
    //
    // On error : return FALSE in C++, produce a RuntimeException in Java
    static bool set_UmlSetName(aLanguage v);


  protected:
    // never called !
    UmlSettings() {};

    static bool _defined;


  private:
    static aLanguage _uml_get_name;

    static aLanguage _uml_set_name;


  protected:
    static QCString _artifact_default_description;

    static QCString _class_default_description;

    static QCString _operation_default_description;

    static QCString _attribute_default_description;

    static QCString _relation_default_description;

    static QDict<UmlBuiltin> _map_builtins;

    static UmlBuiltin * _builtins;

    static QDict<UmlStereotype> _map_relation_attribute_stereotypes;

    static UmlStereotype * _relation_attribute_stereotypes;

    static QDict<UmlStereotype> _map_class_stereotypes;

    static UmlStereotype * _class_stereotypes;

    //internal, do NOT use it
    
    static void read_();

    //internal, do NOT use it
    
    static void read_if_needed_();

    //internal, do NOT use it
    
    static unsigned multiplicity_column(const QCString & mult);

    //internal, do NOT use it
    
    static QCString uml_type(const QCString & t, QCString UmlBuiltin::* f);

    //internal, do NOT use it
    
    static QCString uml_rel_attr_stereotype(const QCString & t, QCString UmlStereotype::* f);

    //internal, do NOT use it
    
    static QCString uml_class_stereotype(const QCString & t, QCString UmlStereotype::* f);

    //internal, do NOT use it
    
    static UmlBuiltin * add_type(const QCString & s);

    //internal, do NOT use it
    
    static UmlStereotype * add_rel_attr_stereotype(const QCString & s);

    //internal, do NOT use it
    
    static UmlStereotype * add_class_stereotype(const QCString & s);

};

#endif