umbrello: umbrello/codegenerators/ada/adawriter.h Source File

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

adawriter.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) 2002 Oliver Kellogg <okellogg@users.sourceforge.net> *
8 * copyright (C) 2003-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef ADAWRITER_H
13 #define ADAWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umlclassifierlist.h"
17
18 #include <QMap>
19
20 class UMLAssociation;
21 class UMLOperation;
22 class QTextStream;
23 class QFile;
24
32 class AdaWriter : public SimpleCodeGenerator
33 {
34 Q_OBJECT
35 public:
36
37 AdaWriter();
38 virtual ~AdaWriter();
39
40 virtual void writeClass(UMLClassifier *c);
41
42 virtual Uml::ProgrammingLanguage::Enum language() const;
43
44 QStringList defaultDatatypes();
45
46 virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
47
48 virtual QStringList reservedKeywords() const;
49
50 private:
51
52 void declareClass(UMLClassifier *c, QTextStream &ada);
53
54 void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment = false);
55
56 void computeAssocTypeAndRole(UMLClassifier *c,
57 UMLAssociation *a,
58 QString& typeName, QString& roleName);
59
60 static bool isOOClass(UMLClassifier *c);
61
62 QString className(UMLClassifier *c, bool inOwnScope = true);
63
64 static QString packageName(UMLPackage *p);
65
66 void finalizeRun();
67
68 static const QString defaultPackageSuffix;
69
70 typedef QMap<QString, QFile*> PackageFileMap;
71
76 PackageFileMap m_pkgsGenerated;
77
83 UMLClassifierList m_classesGenerated;
84 };
85
86 #endif // ADAWRITER_H
AdaWriter
Definition: adawriter.h:33
AdaWriter::defaultPackageSuffix
static const QString defaultPackageSuffix
Definition: adawriter.h:68
AdaWriter::PackageFileMap
QMap< QString, QFile * > PackageFileMap
Definition: adawriter.h:70
AdaWriter::isReservedKeyword
virtual bool isReservedKeyword(const QString &rPossiblyReservedKeyword)
Definition: adawriter.cpp:525
AdaWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: adawriter.cpp:502
AdaWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: adawriter.cpp:57
AdaWriter::isOOClass
static bool isOOClass(UMLClassifier *c)
Definition: adawriter.cpp:65
AdaWriter::finalizeRun
void finalizeRun()
Definition: adawriter.cpp:668
AdaWriter::m_pkgsGenerated
PackageFileMap m_pkgsGenerated
Definition: adawriter.h:76
AdaWriter::m_classesGenerated
UMLClassifierList m_classesGenerated
Definition: adawriter.h:83
AdaWriter::declareClass
void declareClass(UMLClassifier *c, QTextStream &ada)
Definition: adawriter.cpp:177
AdaWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: adawriter.cpp:542
AdaWriter::~AdaWriter
virtual ~AdaWriter()
Definition: adawriter.cpp:49
AdaWriter::computeAssocTypeAndRole
void computeAssocTypeAndRole(UMLClassifier *c, UMLAssociation *a, QString &typeName, QString &roleName)
Definition: adawriter.cpp:144
AdaWriter::writeOperation
void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment=false)
Definition: adawriter.cpp:445
AdaWriter::AdaWriter
AdaWriter()
Definition: adawriter.cpp:40
AdaWriter::className
QString className(UMLClassifier *c, bool inOwnScope=true)
Definition: adawriter.cpp:88
AdaWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: adawriter.cpp:211
AdaWriter::packageName
static QString packageName(UMLPackage *p)
Definition: adawriter.cpp:112
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
UMLAssociation
Sets up association information.
Definition: association.h:34
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLOperation
Definition: operation.h:25
UMLPackage
Non-graphical information for a Package.
Definition: package.h:33
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:305
a
QString a
Definition: petalnode.cpp:18
simplecodegenerator.h
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17