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

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

- File List
- File Members

cppcodegenerator.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-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef CPPCODEGENERATOR_H
9#define CPPCODEGENERATOR_H
10
11#include "codedocumentlist.h"
12#include "codeviewerstate.h"
13#include "advancedcodegenerator.h"
14#include "cppmakecodedocument.h"
15#include "umldoc.h"
16
17#include <QString>
18
19 class CodeViewerDialog;
20 class CPPHeaderCodeDocument;
21
22 class CPPCodeGenerator : public AdvancedCodeGenerator
23{
24 Q_OBJECT
25 public:
26
27 static const bool DEFAULT_BUILD_MAKEFILE;
28
29 CPPCodeGenerator();
30 virtual ~CPPCodeGenerator();
31
32 void setCreateProjectMakefile(bool buildIt);
33 bool getCreateProjectMakefile();
34
35 QString fixTypeName(const QString &name);
36
37 bool addHeaderCodeDocument (CPPHeaderCodeDocument * doc);
38 bool removeHeaderCodeDocument (CPPHeaderCodeDocument * remove_object);
39
40 Uml::ProgrammingLanguage::Enum language() const;
41
42 CodeDocument * newClassifierCodeDocument (UMLClassifier * classifier);
43 CPPHeaderCodeDocument * newHeaderClassifierCodeDocument (UMLClassifier * classifier);
44
45 virtual CodeViewerDialog * getCodeViewerDialog(QWidget* parent, CodeDocument * doc,
46 Settings::CodeViewerState & state);
47
48 virtual void writeCodeToFile();
49 virtual void writeCodeToFile(UMLClassifierList &list);
50
51 QStringList defaultDatatypes() const;
52
53 virtual void saveToXMI(QXmlStreamWriter& writer);
54
55 virtual QStringList reservedKeywords() const;
56
57 virtual void createDefaultStereotypes ();
58
59 void initFromParentDocument();
60
61 protected:
62 CPPMakefileCodeDocument * newMakefileCodeDocument ();
63 CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier (UMLClassifier * classifier);
64
65 private:
66 bool m_createMakefile;
67 CodeDocumentList m_headercodedocumentVector; //< a separate list for recording the header documents
68
69 public Q_SLOTS:
70 virtual void checkAddUMLObject (UMLObject * obj);
71 virtual void checkRemoveUMLObject (UMLObject * obj);
72
73 virtual void syncCodeToDocument ();
74};
75
76#endif // CPPCODEGENERATOR_H
advancedcodegenerator.h
AdvancedCodeGenerator
Definition: advancedcodegenerator.h:18
CPPCodeGenerator
Definition: cppcodegenerator.h:23
CPPCodeGenerator::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: cppcodegenerator.cpp:395
CPPCodeGenerator::newHeaderClassifierCodeDocument
CPPHeaderCodeDocument * newHeaderClassifierCodeDocument(UMLClassifier *classifier)
Definition: cppcodegenerator.cpp:281
CPPCodeGenerator::CPPCodeGenerator
CPPCodeGenerator()
Definition: cppcodegenerator.cpp:31
CPPCodeGenerator::language
Uml::ProgrammingLanguage::Enum language() const
Definition: cppcodegenerator.cpp:56
CPPCodeGenerator::defaultDatatypes
QStringList defaultDatatypes() const
Definition: cppcodegenerator.cpp:386
CPPCodeGenerator::newClassifierCodeDocument
CodeDocument * newClassifierCodeDocument(UMLClassifier *classifier)
Definition: cppcodegenerator.cpp:269
CPPCodeGenerator::removeHeaderCodeDocument
bool removeHeaderCodeDocument(CPPHeaderCodeDocument *remove_object)
Definition: cppcodegenerator.cpp:110
CPPCodeGenerator::m_headercodedocumentVector
CodeDocumentList m_headercodedocumentVector
Definition: cppcodegenerator.h:67
CPPCodeGenerator::setCreateProjectMakefile
void setCreateProjectMakefile(bool buildIt)
Definition: cppcodegenerator.cpp:65
CPPCodeGenerator::findHeaderCodeDocumentByClassifier
CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier(UMLClassifier *classifier)
Definition: cppcodegenerator.cpp:258
CPPCodeGenerator::checkRemoveUMLObject
virtual void checkRemoveUMLObject(UMLObject *obj)
Definition: cppcodegenerator.cpp:362
CPPCodeGenerator::DEFAULT_BUILD_MAKEFILE
static const bool DEFAULT_BUILD_MAKEFILE
Definition: cppcodegenerator.h:27
CPPCodeGenerator::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition: cppcodegenerator.cpp:178
CPPCodeGenerator::getCodeViewerDialog
virtual CodeViewerDialog * getCodeViewerDialog(QWidget *parent, CodeDocument *doc, Settings::CodeViewerState &state)
Definition: cppcodegenerator.cpp:131
CPPCodeGenerator::writeCodeToFile
virtual void writeCodeToFile()
Definition: cppcodegenerator.cpp:221
CPPCodeGenerator::getCreateProjectMakefile
bool getCreateProjectMakefile()
Definition: cppcodegenerator.cpp:78
CPPCodeGenerator::initFromParentDocument
void initFromParentDocument()
Definition: cppcodegenerator.cpp:301
CPPCodeGenerator::fixTypeName
QString fixTypeName(const QString &name)
Definition: cppcodegenerator.cpp:168
CPPCodeGenerator::~CPPCodeGenerator
virtual ~CPPCodeGenerator()
Definition: cppcodegenerator.cpp:45
CPPCodeGenerator::checkAddUMLObject
virtual void checkAddUMLObject(UMLObject *obj)
Definition: cppcodegenerator.cpp:335
CPPCodeGenerator::syncCodeToDocument
virtual void syncCodeToDocument()
Definition: cppcodegenerator.cpp:203
CPPCodeGenerator::m_createMakefile
bool m_createMakefile
Definition: cppcodegenerator.h:66
CPPCodeGenerator::addHeaderCodeDocument
bool addHeaderCodeDocument(CPPHeaderCodeDocument *doc)
Definition: cppcodegenerator.cpp:88
CPPCodeGenerator::newMakefileCodeDocument
CPPMakefileCodeDocument * newMakefileCodeDocument()
Definition: cppcodegenerator.cpp:292
CPPCodeGenerator::createDefaultStereotypes
virtual void createDefaultStereotypes()
Definition: cppcodegenerator.cpp:403
CPPHeaderCodeDocument
Definition: cppheadercodedocument.h:32
CPPMakefileCodeDocument
Definition: cppmakecodedocument.h:20
CodeDocument
Definition: codedocument.h:30
CodeViewerDialog
Definition: codeviewerdialog.h:23
Settings::CodeViewerState
configurable params for the code viewer tool
Definition: codeviewerstate.h:15
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: umlclassifier.h:35
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
codedocumentlist.h
CodeDocumentList
QList< CodeDocument * > CodeDocumentList
Definition: codedocumentlist.h:14
codeviewerstate.h
cppmakecodedocument.h
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:291
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:14
umldoc.h