umbrello: umbrello/codegenerators/cpp/cppcodegenerationpolicy.h Source File

umbrello 2.32.0 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

cppcodegenerationpolicy.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef CPPCODEGENERATIONPOLICY_H
13 #define CPPCODEGENERATIONPOLICY_H
14
15 #include "codegenpolicyext.h"
16 #include "codegenerationpolicy.h"
17
18 #include <QString>
19
20 class CodeGenerationPolicyPage;
21
22 class CPPCodeGenerationPolicy : public CodeGenPolicyExt
23 {
24 Q_OBJECT
25 public:
26
27 static const char * DEFAULT_VECTOR_METHOD_APPEND;
28 static const char * DEFAULT_VECTOR_METHOD_REMOVE;
29 static const char * DEFAULT_VECTOR_METHOD_INIT;
30 static const char * DEFAULT_OBJECT_METHOD_INIT;
31
32 CPPCodeGenerationPolicy();
33 virtual ~CPPCodeGenerationPolicy();
34
35 void setAccessorsAreInline(bool var);
36 bool getAccessorsAreInline();
37
38 void setOperationsAreInline(bool var);
39 bool getOperationsAreInline();
40
41 void setDestructorsAreVirtual(bool var);
42 bool getDestructorsAreVirtual();
43
44 void setPackageIsNamespace(bool var);
45 bool getPackageIsNamespace();
46
47 void setAutoGenerateAccessors(bool var);
48 bool getAutoGenerateAccessors();
49
50 void setAccessorsArePublic(bool var);
51 bool getAccessorsArePublic();
52
53 void setGetterWithGetPrefix(bool var);
54 bool getGetterWithGetPrefix();
55
56 void setRemovePrefixFromAccessorMethods(bool var);
57 bool getRemovePrefixFromAccessorMethods();
58
59 bool getAccessorMethodsStartWithUpperCase();
60 void setAccessorMethodsStartWithUpperCase(bool var);
61
67 void setStringClassName(const QString &value);
68 QString getStringClassName();
69 void setStringClassNameInclude(const QString &value);
70 QString getStringClassNameInclude();
71 void setVectorClassName(const QString &value);
72 QString getVectorClassName();
73 void setVectorClassNameInclude(const QString &value);
74 QString getVectorClassNameInclude();
75
76 void setClassMemberPrefix(const QString &value);
77 QString getClassMemberPrefix();
78
79 void setDocToolTag(const QString &value);
80 QString getDocToolTag();
81
82 void setStringIncludeIsGlobal (bool value);
83 bool stringIncludeIsGlobal ();
84
85 void setVectorIncludeIsGlobal (bool value);
86 bool vectorIncludeIsGlobal ();
87
91 QString getVectorMethodAppend(const QString & variableName = QString(), const QString & itemClassName = QString());
92 QString getVectorMethodRemove(const QString & variableName = QString(), const QString & itemClassName = QString());
93 QString getVectorMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString());
94
95 QString getObjectMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString());
96
97 virtual void setDefaults (CPPCodeGenerationPolicy * cppclone, bool emitUpdateSignal = true);
98 virtual void setDefaults(bool emitUpdateSignal = true);
99
100 CodeGenerationPolicyPage * createPage (QWidget *parent = 0, const char * name = 0);
101
102 protected:
103 void init();
104
105 private:
106
107 QString m_vectorMethodAppendBase;
108 QString m_vectorMethodRemoveBase;
109 QString m_vectorMethodInitBase;
110 QString m_objectMethodInitBase;
111
112 };
113
114 #endif // CPPCODEGENERATIONPOLICY_H
CPPCodeGenerationPolicy
Definition: cppcodegenerationpolicy.h:23
CPPCodeGenerationPolicy::vectorIncludeIsGlobal
bool vectorIncludeIsGlobal()
Definition: cppcodegenerationpolicy.cpp:274
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_REMOVE
static const char * DEFAULT_VECTOR_METHOD_REMOVE
Definition: cppcodegenerationpolicy.h:28
CPPCodeGenerationPolicy::setClassMemberPrefix
void setClassMemberPrefix(const QString &value)
Definition: cppcodegenerationpolicy.cpp:239
CPPCodeGenerationPolicy::setAutoGenerateAccessors
void setAutoGenerateAccessors(bool var)
Definition: cppcodegenerationpolicy.cpp:180
CPPCodeGenerationPolicy::m_vectorMethodAppendBase
QString m_vectorMethodAppendBase
Definition: cppcodegenerationpolicy.h:107
CPPCodeGenerationPolicy::m_vectorMethodRemoveBase
QString m_vectorMethodRemoveBase
Definition: cppcodegenerationpolicy.h:108
CPPCodeGenerationPolicy::getStringClassNameInclude
QString getStringClassNameInclude()
Definition: cppcodegenerationpolicy.cpp:200
CPPCodeGenerationPolicy::getObjectMethodInit
QString getObjectMethodInit(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition: cppcodegenerationpolicy.cpp:339
CPPCodeGenerationPolicy::setVectorIncludeIsGlobal
void setVectorIncludeIsGlobal(bool value)
Definition: cppcodegenerationpolicy.cpp:293
CPPCodeGenerationPolicy::getPackageIsNamespace
bool getPackageIsNamespace()
Definition: cppcodegenerationpolicy.cpp:171
CPPCodeGenerationPolicy::getClassMemberPrefix
QString getClassMemberPrefix()
Definition: cppcodegenerationpolicy.cpp:245
CPPCodeGenerationPolicy::setDestructorsAreVirtual
void setDestructorsAreVirtual(bool var)
Definition: cppcodegenerationpolicy.cpp:109
CPPCodeGenerationPolicy::getVectorMethodInit
QString getVectorMethodInit(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition: cppcodegenerationpolicy.cpp:321
CPPCodeGenerationPolicy::setStringClassNameInclude
void setStringClassNameInclude(const QString &value)
Definition: cppcodegenerationpolicy.cpp:221
CPPCodeGenerationPolicy::setPackageIsNamespace
void setPackageIsNamespace(bool var)
Definition: cppcodegenerationpolicy.cpp:161
CPPCodeGenerationPolicy::init
void init()
Definition: cppcodegenerationpolicy.cpp:442
CPPCodeGenerationPolicy::setRemovePrefixFromAccessorMethods
void setRemovePrefixFromAccessorMethods(bool var)
Definition: cppcodegenerationpolicy.cpp:135
CPPCodeGenerationPolicy::getVectorMethodRemove
QString getVectorMethodRemove(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition: cppcodegenerationpolicy.cpp:310
CPPCodeGenerationPolicy::setDocToolTag
void setDocToolTag(const QString &value)
Definition: cppcodegenerationpolicy.cpp:250
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_APPEND
static const char * DEFAULT_VECTOR_METHOD_APPEND
Definition: cppcodegenerationpolicy.h:27
CPPCodeGenerationPolicy::getAccessorsArePublic
bool getAccessorsArePublic()
Definition: cppcodegenerationpolicy.cpp:62
CPPCodeGenerationPolicy::getGetterWithGetPrefix
bool getGetterWithGetPrefix()
Definition: cppcodegenerationpolicy.cpp:130
CPPCodeGenerationPolicy::getAccessorsAreInline
bool getAccessorsAreInline()
Definition: cppcodegenerationpolicy.cpp:81
CPPCodeGenerationPolicy::setAccessorMethodsStartWithUpperCase
void setAccessorMethodsStartWithUpperCase(bool var)
Definition: cppcodegenerationpolicy.cpp:146
CPPCodeGenerationPolicy::setGetterWithGetPrefix
void setGetterWithGetPrefix(bool var)
Definition: cppcodegenerationpolicy.cpp:124
CPPCodeGenerationPolicy::getVectorMethodAppend
QString getVectorMethodAppend(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition: cppcodegenerationpolicy.cpp:299
CPPCodeGenerationPolicy::getAutoGenerateAccessors
bool getAutoGenerateAccessors()
Definition: cppcodegenerationpolicy.cpp:190
CPPCodeGenerationPolicy::m_vectorMethodInitBase
QString m_vectorMethodInitBase
Definition: cppcodegenerationpolicy.h:109
CPPCodeGenerationPolicy::setStringIncludeIsGlobal
void setStringIncludeIsGlobal(bool value)
Definition: cppcodegenerationpolicy.cpp:283
CPPCodeGenerationPolicy::createPage
CodeGenerationPolicyPage * createPage(QWidget *parent=0, const char *name=0)
Definition: cppcodegenerationpolicy.cpp:434
CPPCodeGenerationPolicy::getOperationsAreInline
bool getOperationsAreInline()
Definition: cppcodegenerationpolicy.cpp:100
CPPCodeGenerationPolicy::getDocToolTag
QString getDocToolTag()
Definition: cppcodegenerationpolicy.cpp:256
CPPCodeGenerationPolicy::getRemovePrefixFromAccessorMethods
bool getRemovePrefixFromAccessorMethods()
Definition: cppcodegenerationpolicy.cpp:141
CPPCodeGenerationPolicy::getStringClassName
QString getStringClassName()
Definition: cppcodegenerationpolicy.cpp:195
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_INIT
static const char * DEFAULT_VECTOR_METHOD_INIT
Definition: cppcodegenerationpolicy.h:29
CPPCodeGenerationPolicy::DEFAULT_OBJECT_METHOD_INIT
static const char * DEFAULT_OBJECT_METHOD_INIT
Definition: cppcodegenerationpolicy.h:30
CPPCodeGenerationPolicy::setVectorClassNameInclude
void setVectorClassNameInclude(const QString &value)
Definition: cppcodegenerationpolicy.cpp:233
CPPCodeGenerationPolicy::setOperationsAreInline
void setOperationsAreInline(bool var)
Definition: cppcodegenerationpolicy.cpp:90
CPPCodeGenerationPolicy::m_objectMethodInitBase
QString m_objectMethodInitBase
Definition: cppcodegenerationpolicy.h:110
CPPCodeGenerationPolicy::getVectorClassNameInclude
QString getVectorClassNameInclude()
Definition: cppcodegenerationpolicy.cpp:210
CPPCodeGenerationPolicy::~CPPCodeGenerationPolicy
virtual ~CPPCodeGenerationPolicy()
Definition: cppcodegenerationpolicy.cpp:43
CPPCodeGenerationPolicy::getAccessorMethodsStartWithUpperCase
bool getAccessorMethodsStartWithUpperCase()
Definition: cppcodegenerationpolicy.cpp:152
CPPCodeGenerationPolicy::getVectorClassName
QString getVectorClassName()
Definition: cppcodegenerationpolicy.cpp:205
CPPCodeGenerationPolicy::setStringClassName
void setStringClassName(const QString &value)
Definition: cppcodegenerationpolicy.cpp:215
CPPCodeGenerationPolicy::setDefaults
virtual void setDefaults(CPPCodeGenerationPolicy *cppclone, bool emitUpdateSignal=true)
Definition: cppcodegenerationpolicy.cpp:355
CPPCodeGenerationPolicy::setVectorClassName
void setVectorClassName(const QString &value)
Definition: cppcodegenerationpolicy.cpp:227
CPPCodeGenerationPolicy::getDestructorsAreVirtual
bool getDestructorsAreVirtual()
Definition: cppcodegenerationpolicy.cpp:119
CPPCodeGenerationPolicy::CPPCodeGenerationPolicy
CPPCodeGenerationPolicy()
Definition: cppcodegenerationpolicy.cpp:35
CPPCodeGenerationPolicy::stringIncludeIsGlobal
bool stringIncludeIsGlobal()
Definition: cppcodegenerationpolicy.cpp:265
CPPCodeGenerationPolicy::setAccessorsAreInline
void setAccessorsAreInline(bool var)
Definition: cppcodegenerationpolicy.cpp:71
CPPCodeGenerationPolicy::setAccessorsArePublic
void setAccessorsArePublic(bool var)
Definition: cppcodegenerationpolicy.cpp:51
CodeGenPolicyExt
Definition: codegenpolicyext.h:28
CodeGenerationPolicyPage
Definition: codegenerationpolicypage.h:31
codegenerationpolicy.h
codegenpolicyext.h