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

umbrello 2.34.0 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 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2002 Oliver Kellogg <okellogg@users.sourceforge.net>
5 SPDX-FileCopyrightText: 2003-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef ADAWRITER_H
9#define ADAWRITER_H
10
11#include "simplecodegenerator.h"
12#include "umlclassifierlist.h"
13
14#include <QMap>
15
16class UMLAssociation;
17class UMLOperation;
18class QTextStream;
19class QFile;
20
28 class AdaWriter : public SimpleCodeGenerator
29{
30 Q_OBJECT
31public:
32
33 AdaWriter();
34 virtual ~AdaWriter();
35
36 virtual void writeClass(UMLClassifier *c);
37
38 virtual Uml::ProgrammingLanguage::Enum language() const;
39
40 QStringList defaultDatatypes() const;
41
42 virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
43
44 virtual QStringList reservedKeywords() const;
45
46private:
47
48 void declareClass(UMLClassifier *c, QTextStream &ada);
49
50 void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment = false);
51
52 void computeAssocTypeAndRole(UMLClassifier *c,
53 UMLAssociation *a,
54 QString& typeName, QString& roleName);
55
56 static bool isOOClass(const UMLClassifier *c);
57
58 QString className(UMLClassifier *c, bool inOwnScope = true);
59
60 static QString packageName(UMLPackage *p);
61
62 void finalizeRun();
63
64 static const QString defaultPackageSuffix;
65
66 typedef QMap<QString, QFile*> PackageFileMap;
67
72 PackageFileMap m_pkgsGenerated;
73
79 UMLClassifierList m_classesGenerated;
80};
81
82#endif // ADAWRITER_H
AdaWriter
Definition: adawriter.h:29
AdaWriter::defaultPackageSuffix
static const QString defaultPackageSuffix
Definition: adawriter.h:64
AdaWriter::PackageFileMap
QMap< QString, QFile * > PackageFileMap
Definition: adawriter.h:66
AdaWriter::isReservedKeyword
virtual bool isReservedKeyword(const QString &rPossiblyReservedKeyword)
Definition: adawriter.cpp:521
AdaWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: adawriter.cpp:53
AdaWriter::finalizeRun
void finalizeRun()
Definition: adawriter.cpp:664
AdaWriter::m_pkgsGenerated
PackageFileMap m_pkgsGenerated
Definition: adawriter.h:72
AdaWriter::m_classesGenerated
UMLClassifierList m_classesGenerated
Definition: adawriter.h:79
AdaWriter::defaultDatatypes
QStringList defaultDatatypes() const
Definition: adawriter.cpp:498
AdaWriter::declareClass
void declareClass(UMLClassifier *c, QTextStream &ada)
Definition: adawriter.cpp:173
AdaWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: adawriter.cpp:538
AdaWriter::~AdaWriter
virtual ~AdaWriter()
Definition: adawriter.cpp:45
AdaWriter::isOOClass
static bool isOOClass(const UMLClassifier *c)
Definition: adawriter.cpp:61
AdaWriter::computeAssocTypeAndRole
void computeAssocTypeAndRole(UMLClassifier *c, UMLAssociation *a, QString &typeName, QString &roleName)
Definition: adawriter.cpp:140
AdaWriter::writeOperation
void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment=false)
Definition: adawriter.cpp:441
AdaWriter::AdaWriter
AdaWriter()
Definition: adawriter.cpp:36
AdaWriter::className
QString className(UMLClassifier *c, bool inOwnScope=true)
Definition: adawriter.cpp:84
AdaWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: adawriter.cpp:207
AdaWriter::packageName
static QString packageName(UMLPackage *p)
Definition: adawriter.cpp:108
SimpleCodeGenerator
Definition: simplecodegenerator.h:30
UMLAssociation
Sets up association information.
Definition: association.h:29
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
UMLOperation
Definition: operation.h:20
UMLPackage
Non-graphical information for a Package.
Definition: package.h:28
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:291
a
QString a
Definition: petalnode.cpp:13
simplecodegenerator.h
umlclassifierlist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:12