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

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
63 CPPMakefileCodeDocument * newMakefileCodeDocument ();
64
65 CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier (UMLClassifier * classifier);
66
67 private:
68
69 bool m_createMakefile;
70 CodeDocumentList m_headercodedocumentVector; //< a separate list for recording the header documents
71
72 public slots:
73
74 virtual void checkAddUMLObject (UMLObject * obj);
75 virtual void checkRemoveUMLObject (UMLObject * obj);
76
77 virtual void syncCodeToDocument ();
78};
79
80#endif // CPPCODEGENERATOR_H
advancedcodegenerator.h
AdvancedCodeGenerator
Definition advancedcodegenerator.h:18
CPPCodeGenerator
Definition cppcodegenerator.h:23
CPPCodeGenerator::reservedKeywords
virtual QStringList reservedKeywords() const
Definition cppcodegenerator.cpp:396
CPPCodeGenerator::newHeaderClassifierCodeDocument
CPPHeaderCodeDocument * newHeaderClassifierCodeDocument(UMLClassifier *classifier)
Definition cppcodegenerator.cpp:282
CPPCodeGenerator::CPPCodeGenerator
CPPCodeGenerator()
Definition cppcodegenerator.cpp:32
CPPCodeGenerator::language
Uml::ProgrammingLanguage::Enum language() const
Definition cppcodegenerator.cpp:57
CPPCodeGenerator::defaultDatatypes
QStringList defaultDatatypes() const
Definition cppcodegenerator.cpp:387
CPPCodeGenerator::newClassifierCodeDocument
CodeDocument * newClassifierCodeDocument(UMLClassifier *classifier)
Definition cppcodegenerator.cpp:270
CPPCodeGenerator::removeHeaderCodeDocument
bool removeHeaderCodeDocument(CPPHeaderCodeDocument *remove_object)
Definition cppcodegenerator.cpp:111
CPPCodeGenerator::m_headercodedocumentVector
CodeDocumentList m_headercodedocumentVector
Definition cppcodegenerator.h:70
CPPCodeGenerator::setCreateProjectMakefile
void setCreateProjectMakefile(bool buildIt)
Definition cppcodegenerator.cpp:66
CPPCodeGenerator::findHeaderCodeDocumentByClassifier
CPPHeaderCodeDocument * findHeaderCodeDocumentByClassifier(UMLClassifier *classifier)
Definition cppcodegenerator.cpp:259
CPPCodeGenerator::checkRemoveUMLObject
virtual void checkRemoveUMLObject(UMLObject *obj)
Definition cppcodegenerator.cpp:363
CPPCodeGenerator::DEFAULT_BUILD_MAKEFILE
static const bool DEFAULT_BUILD_MAKEFILE
Definition cppcodegenerator.h:27
CPPCodeGenerator::saveToXMI
virtual void saveToXMI(QXmlStreamWriter &writer)
Definition cppcodegenerator.cpp:179
CPPCodeGenerator::getCodeViewerDialog
virtual CodeViewerDialog * getCodeViewerDialog(QWidget *parent, CodeDocument *doc, Settings::CodeViewerState &state)
Definition cppcodegenerator.cpp:132
CPPCodeGenerator::writeCodeToFile
virtual void writeCodeToFile()
Definition cppcodegenerator.cpp:222
CPPCodeGenerator::getCreateProjectMakefile
bool getCreateProjectMakefile()
Definition cppcodegenerator.cpp:79
CPPCodeGenerator::initFromParentDocument
void initFromParentDocument()
Definition cppcodegenerator.cpp:302
CPPCodeGenerator::fixTypeName
QString fixTypeName(const QString &name)
Definition cppcodegenerator.cpp:169
CPPCodeGenerator::~CPPCodeGenerator
virtual ~CPPCodeGenerator()
Definition cppcodegenerator.cpp:46
CPPCodeGenerator::checkAddUMLObject
virtual void checkAddUMLObject(UMLObject *obj)
Definition cppcodegenerator.cpp:336
CPPCodeGenerator::syncCodeToDocument
virtual void syncCodeToDocument()
Definition cppcodegenerator.cpp:204
CPPCodeGenerator::m_createMakefile
bool m_createMakefile
Definition cppcodegenerator.h:69
CPPCodeGenerator::addHeaderCodeDocument
bool addHeaderCodeDocument(CPPHeaderCodeDocument *doc)
Definition cppcodegenerator.cpp:89
CPPCodeGenerator::newMakefileCodeDocument
CPPMakefileCodeDocument * newMakefileCodeDocument()
Definition cppcodegenerator.cpp:293
CPPCodeGenerator::createDefaultStereotypes
virtual void createDefaultStereotypes()
Definition cppcodegenerator.cpp:404
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 classifier.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