umbrello: umbrello/codegenerators/pascal/pascalwriter.h Source File

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

pascalwriter.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) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef PASCALWRITER_H
12 #define PASCALWRITER_H
13
14 #include "simplecodegenerator.h"
15
16 class UMLAssociation;
17 class UMLOperation;
18 class QTextStream;
19
25 class PascalWriter : public SimpleCodeGenerator
26 {
27 Q_OBJECT
28 public:
29
30 PascalWriter();
31 virtual ~PascalWriter ();
32
33 virtual void writeClass (UMLClassifier *c);
34
35 virtual Uml::ProgrammingLanguage::Enum language() const;
36
37 QStringList defaultDatatypes();
38
39 virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword);
40
41 virtual QStringList reservedKeywords() const;
42
43 private:
44
45 void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false);
46
47 void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName);
48
49 bool isOOClass (UMLClassifier *c);
50
51 QString qualifiedName (UMLPackage *p, bool withType = false, bool byValue = false);
52
53 static const QString defaultPackageSuffix;
54
55 };
56
57 #endif // PASCALWRITER_H
58
PascalWriter::writeOperation
void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment=false)
Definition: pascalwriter.cpp:353
PascalWriter::isReservedKeyword
virtual bool isReservedKeyword(const QString &rPossiblyReservedKeyword)
Definition: pascalwriter.cpp:449
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1308
template.h
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
PascalWriter::isOOClass
bool isOOClass(UMLClassifier *c)
Definition: pascalwriter.cpp:63
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:79
pascalwriter.h
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:288
UMLClassifier::isInterface
bool isInterface() const
Definition: classifier.cpp:118
UMLCanvasObject::getSuperClasses
UMLClassifierList getSuperClasses(bool withRealizations=true)
Definition: umlcanvasobject.cpp:349
UMLAttributeList
Definition: umlattributelist.h:26
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
Uml::ProgrammingLanguage::Pascal
@ Pascal
Definition: basictypes.h:298
CodeGenerator::getHeadingFile
virtual QString getHeadingFile(const QString &file)
Definition: codegenerator.cpp:407
Uml::ParameterDirection::In
@ In
Definition: basictypes.h:274
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:178
CodeGenerator::cleanName
static QString cleanName(const QString &name)
Definition: codegenerator.cpp:549
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
operation.h
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
Uml::RoleType::A
@ A
Definition: basictypes.h:256
PascalWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: pascalwriter.cpp:142
Uml::ModelType::Logical
@ Logical
Definition: basictypes.h:93
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:622
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:86
association.h
SimpleCodeGenerator::overwritableName
QString overwritableName(UMLPackage *concept, const QString &name, const QString &ext)
Definition: simplecodegenerator.cpp:167
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:645
UMLObject::isStatic
bool isStatic() const
Definition: umlobject.cpp:366
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:273
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
PascalWriter::PascalWriter
PascalWriter()
Definition: pascalwriter.cpp:39
PascalWriter::computeAssocTypeAndRole
void computeAssocTypeAndRole(UMLAssociation *a, QString &typeName, QString &roleName)
Definition: pascalwriter.cpp:118
PascalWriter
Definition: pascalwriter.h:25
SimpleCodeGenerator::indent
QString indent()
Definition: simplecodegenerator.cpp:76
UMLObject::asUMLEnum
UMLEnum * asUMLEnum()
Definition: umlobject.cpp:1315
SimpleCodeGenerator::m_indentLevel
int m_indentLevel
Definition: simplecodegenerator.h:86
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
PascalWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: pascalwriter.cpp:55
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:765
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
CodeGenerator::formatSourceCode
static QString formatSourceCode(const QString &code, const QString &indentation)
Definition: codegenerator.cpp:743
umlclassifierlistitemlist.h
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:122
PascalWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: pascalwriter.cpp:465
classifierlistitem.h
CodeGenerator::showGeneratedFile
void showGeneratedFile(const QString &filename)
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
attribute.h
a
QString a
Definition: petalnode.cpp:18
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.h:87
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
folder.h
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:87
CodeGenerator::formatDoc
static QString formatDoc(const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80)
Definition: codegenerator.cpp:712
uDebug
#define uDebug()
Definition: debug_utils.h:122
SimpleCodeGenerator
Definition: simplecodegenerator.h:33
UMLObject::toString
static QString toString(ObjectType ot)
Definition: umlobject.cpp:1124
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:269
UMLAttribute
Sets up attribute information.
Definition: attribute.h:27
UMLClassifier::getAttributeList
UMLAttributeList getAttributeList() const
Definition: classifier.cpp:436
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:26
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
PascalWriter::qualifiedName
QString qualifiedName(UMLPackage *p, bool withType=false, bool byValue=false)
Definition: pascalwriter.cpp:83
classifier.h
PascalWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: pascalwriter.cpp:415
UMLOperation
Definition: operation.h:24
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
uml.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:32
UMLObject::isUMLDatatype
bool isUMLDatatype()
Definition: umlobject.h:206
simplecodegenerator.h
Uml::Visibility::Private
@ Private
Definition: basictypes.h:78
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:775
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:79
UMLObject::stereotype
QString stereotype(bool includeAdornments=false) const
Definition: umlobject.cpp:558
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
umltemplatelist.h
PascalWriter::~PascalWriter
virtual ~PascalWriter()
Definition: pascalwriter.cpp:47
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:29
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:28
PascalWriter::defaultPackageSuffix
static const QString defaultPackageSuffix
Definition: pascalwriter.h:53
umldoc.h
CodeGenerator::openFile
bool openFile(QFile &file, const QString &name)
Definition: codegenerator.cpp:523
UMLOperation::getSourceCode
QString getSourceCode() const
Definition: operation.cpp:507
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32
enum.h