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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

cppcodegenerationpolicy.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2003 Brian Thomas <thomas@mail630.gsfc.nasa.gov>
5 SPDX-FileCopyrightText: 2004-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef CPPCODEGENERATIONPOLICY_H
9#define CPPCODEGENERATIONPOLICY_H
10
11#include "codegenpolicyext.h"
12#include "codegenerationpolicy.h"
13
14#include <QString>
15
16 class CodeGenerationPolicyPage;
17
18 class CPPCodeGenerationPolicy : public CodeGenPolicyExt
19{
20 Q_OBJECT
21 public:
22
23 static const char * DEFAULT_VECTOR_METHOD_APPEND;
24 static const char * DEFAULT_VECTOR_METHOD_REMOVE;
25 static const char * DEFAULT_VECTOR_METHOD_INIT;
26 static const char * DEFAULT_OBJECT_METHOD_INIT;
27
28 CPPCodeGenerationPolicy();
29 virtual ~CPPCodeGenerationPolicy();
30
31 void setAccessorsAreInline(bool var);
32 bool getAccessorsAreInline();
33
34 void setOperationsAreInline(bool var);
35 bool getOperationsAreInline();
36
37 void setDestructorsAreVirtual(bool var);
38 bool getDestructorsAreVirtual();
39
40 void setPackageIsNamespace(bool var);
41 bool getPackageIsNamespace();
42
43 void setAutoGenerateAccessors(bool var);
44 bool getAutoGenerateAccessors();
45
46 void setAccessorsArePublic(bool var);
47 bool getAccessorsArePublic();
48
49 void setGetterWithGetPrefix(bool var);
50 bool getGetterWithGetPrefix();
51
52 void setRemovePrefixFromAccessorMethods(bool var);
53 bool getRemovePrefixFromAccessorMethods();
54
55 bool getAccessorMethodsStartWithUpperCase();
56 void setAccessorMethodsStartWithUpperCase(bool var);
57
63 void setStringClassName(const QString &value);
64 QString getStringClassName();
65 void setStringClassNameInclude(const QString &value);
66 QString getStringClassNameInclude();
67 void setVectorClassName(const QString &value);
68 QString getVectorClassName();
69 void setVectorClassNameInclude(const QString &value);
70 QString getVectorClassNameInclude();
71
72 void setClassMemberPrefix(const QString &value);
73 QString getClassMemberPrefix();
74
75 void setDocToolTag(const QString &value);
76 QString getDocToolTag();
77
78 void setStringIncludeIsGlobal (bool value);
79 bool stringIncludeIsGlobal ();
80
81 void setVectorIncludeIsGlobal (bool value);
82 bool vectorIncludeIsGlobal ();
83
87 QString getVectorMethodAppend(const QString & variableName = QString(), const QString & itemClassName = QString());
88 QString getVectorMethodRemove(const QString & variableName = QString(), const QString & itemClassName = QString());
89 QString getVectorMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString());
90
91 QString getObjectMethodInit(const QString & variableName = QString(), const QString & itemClassName = QString());
92
93 virtual void setDefaults (CPPCodeGenerationPolicy * cppclone, bool emitUpdateSignal = true);
94 virtual void setDefaults(bool emitUpdateSignal = true);
95
96 CodeGenerationPolicyPage * createPage (QWidget *parent = 0, const char * name = 0);
97
98 protected:
99 void init();
100
101 private:
102
103 QString m_vectorMethodAppendBase;
104 QString m_vectorMethodRemoveBase;
105 QString m_vectorMethodInitBase;
106 QString m_objectMethodInitBase;
107
108};
109
110#endif // CPPCODEGENERATIONPOLICY_H
CPPCodeGenerationPolicy
Definition cppcodegenerationpolicy.h:19
CPPCodeGenerationPolicy::vectorIncludeIsGlobal
bool vectorIncludeIsGlobal()
Definition cppcodegenerationpolicy.cpp:270
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_REMOVE
static const char * DEFAULT_VECTOR_METHOD_REMOVE
Definition cppcodegenerationpolicy.h:24
CPPCodeGenerationPolicy::setClassMemberPrefix
void setClassMemberPrefix(const QString &value)
Definition cppcodegenerationpolicy.cpp:235
CPPCodeGenerationPolicy::setAutoGenerateAccessors
void setAutoGenerateAccessors(bool var)
Definition cppcodegenerationpolicy.cpp:176
CPPCodeGenerationPolicy::m_vectorMethodAppendBase
QString m_vectorMethodAppendBase
Definition cppcodegenerationpolicy.h:103
CPPCodeGenerationPolicy::m_vectorMethodRemoveBase
QString m_vectorMethodRemoveBase
Definition cppcodegenerationpolicy.h:104
CPPCodeGenerationPolicy::getStringClassNameInclude
QString getStringClassNameInclude()
Definition cppcodegenerationpolicy.cpp:196
CPPCodeGenerationPolicy::getObjectMethodInit
QString getObjectMethodInit(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition cppcodegenerationpolicy.cpp:335
CPPCodeGenerationPolicy::setVectorIncludeIsGlobal
void setVectorIncludeIsGlobal(bool value)
Definition cppcodegenerationpolicy.cpp:289
CPPCodeGenerationPolicy::getPackageIsNamespace
bool getPackageIsNamespace()
Definition cppcodegenerationpolicy.cpp:167
CPPCodeGenerationPolicy::getClassMemberPrefix
QString getClassMemberPrefix()
Definition cppcodegenerationpolicy.cpp:241
CPPCodeGenerationPolicy::setDestructorsAreVirtual
void setDestructorsAreVirtual(bool var)
Definition cppcodegenerationpolicy.cpp:105
CPPCodeGenerationPolicy::getVectorMethodInit
QString getVectorMethodInit(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition cppcodegenerationpolicy.cpp:317
CPPCodeGenerationPolicy::setStringClassNameInclude
void setStringClassNameInclude(const QString &value)
Definition cppcodegenerationpolicy.cpp:217
CPPCodeGenerationPolicy::setPackageIsNamespace
void setPackageIsNamespace(bool var)
Definition cppcodegenerationpolicy.cpp:157
CPPCodeGenerationPolicy::init
void init()
Definition cppcodegenerationpolicy.cpp:438
CPPCodeGenerationPolicy::setRemovePrefixFromAccessorMethods
void setRemovePrefixFromAccessorMethods(bool var)
Definition cppcodegenerationpolicy.cpp:131
CPPCodeGenerationPolicy::getVectorMethodRemove
QString getVectorMethodRemove(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition cppcodegenerationpolicy.cpp:306
CPPCodeGenerationPolicy::setDocToolTag
void setDocToolTag(const QString &value)
Definition cppcodegenerationpolicy.cpp:246
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_APPEND
static const char * DEFAULT_VECTOR_METHOD_APPEND
Definition cppcodegenerationpolicy.h:23
CPPCodeGenerationPolicy::getAccessorsArePublic
bool getAccessorsArePublic()
Definition cppcodegenerationpolicy.cpp:58
CPPCodeGenerationPolicy::getGetterWithGetPrefix
bool getGetterWithGetPrefix()
Definition cppcodegenerationpolicy.cpp:126
CPPCodeGenerationPolicy::getAccessorsAreInline
bool getAccessorsAreInline()
Definition cppcodegenerationpolicy.cpp:77
CPPCodeGenerationPolicy::setAccessorMethodsStartWithUpperCase
void setAccessorMethodsStartWithUpperCase(bool var)
Definition cppcodegenerationpolicy.cpp:142
CPPCodeGenerationPolicy::setGetterWithGetPrefix
void setGetterWithGetPrefix(bool var)
Definition cppcodegenerationpolicy.cpp:120
CPPCodeGenerationPolicy::getVectorMethodAppend
QString getVectorMethodAppend(const QString &variableName=QString(), const QString &itemClassName=QString())
Definition cppcodegenerationpolicy.cpp:295
CPPCodeGenerationPolicy::getAutoGenerateAccessors
bool getAutoGenerateAccessors()
Definition cppcodegenerationpolicy.cpp:186
CPPCodeGenerationPolicy::m_vectorMethodInitBase
QString m_vectorMethodInitBase
Definition cppcodegenerationpolicy.h:105
CPPCodeGenerationPolicy::setStringIncludeIsGlobal
void setStringIncludeIsGlobal(bool value)
Definition cppcodegenerationpolicy.cpp:279
CPPCodeGenerationPolicy::createPage
CodeGenerationPolicyPage * createPage(QWidget *parent=0, const char *name=0)
Definition cppcodegenerationpolicy.cpp:430
CPPCodeGenerationPolicy::getOperationsAreInline
bool getOperationsAreInline()
Definition cppcodegenerationpolicy.cpp:96
CPPCodeGenerationPolicy::getDocToolTag
QString getDocToolTag()
Definition cppcodegenerationpolicy.cpp:252
CPPCodeGenerationPolicy::getRemovePrefixFromAccessorMethods
bool getRemovePrefixFromAccessorMethods()
Definition cppcodegenerationpolicy.cpp:137
CPPCodeGenerationPolicy::getStringClassName
QString getStringClassName()
Definition cppcodegenerationpolicy.cpp:191
CPPCodeGenerationPolicy::DEFAULT_VECTOR_METHOD_INIT
static const char * DEFAULT_VECTOR_METHOD_INIT
Definition cppcodegenerationpolicy.h:25
CPPCodeGenerationPolicy::DEFAULT_OBJECT_METHOD_INIT
static const char * DEFAULT_OBJECT_METHOD_INIT
Definition cppcodegenerationpolicy.h:26
CPPCodeGenerationPolicy::setVectorClassNameInclude
void setVectorClassNameInclude(const QString &value)
Definition cppcodegenerationpolicy.cpp:229
CPPCodeGenerationPolicy::setOperationsAreInline
void setOperationsAreInline(bool var)
Definition cppcodegenerationpolicy.cpp:86
CPPCodeGenerationPolicy::m_objectMethodInitBase
QString m_objectMethodInitBase
Definition cppcodegenerationpolicy.h:106
CPPCodeGenerationPolicy::getVectorClassNameInclude
QString getVectorClassNameInclude()
Definition cppcodegenerationpolicy.cpp:206
CPPCodeGenerationPolicy::~CPPCodeGenerationPolicy
virtual ~CPPCodeGenerationPolicy()
Definition cppcodegenerationpolicy.cpp:39
CPPCodeGenerationPolicy::getAccessorMethodsStartWithUpperCase
bool getAccessorMethodsStartWithUpperCase()
Definition cppcodegenerationpolicy.cpp:148
CPPCodeGenerationPolicy::getVectorClassName
QString getVectorClassName()
Definition cppcodegenerationpolicy.cpp:201
CPPCodeGenerationPolicy::setStringClassName
void setStringClassName(const QString &value)
Definition cppcodegenerationpolicy.cpp:211
CPPCodeGenerationPolicy::setDefaults
virtual void setDefaults(CPPCodeGenerationPolicy *cppclone, bool emitUpdateSignal=true)
Definition cppcodegenerationpolicy.cpp:351
CPPCodeGenerationPolicy::setVectorClassName
void setVectorClassName(const QString &value)
Definition cppcodegenerationpolicy.cpp:223
CPPCodeGenerationPolicy::getDestructorsAreVirtual
bool getDestructorsAreVirtual()
Definition cppcodegenerationpolicy.cpp:115
CPPCodeGenerationPolicy::CPPCodeGenerationPolicy
CPPCodeGenerationPolicy()
Definition cppcodegenerationpolicy.cpp:31
CPPCodeGenerationPolicy::stringIncludeIsGlobal
bool stringIncludeIsGlobal()
Definition cppcodegenerationpolicy.cpp:261
CPPCodeGenerationPolicy::setAccessorsAreInline
void setAccessorsAreInline(bool var)
Definition cppcodegenerationpolicy.cpp:67
CPPCodeGenerationPolicy::setAccessorsArePublic
void setAccessorsArePublic(bool var)
Definition cppcodegenerationpolicy.cpp:47
CodeGenPolicyExt
Definition codegenpolicyext.h:23
CodeGenerationPolicyPage
Definition codegenerationpolicypage.h:17
codegenerationpolicy.h
codegenpolicyext.h