1 /* 2 SPDX-License-Identifier: GPL-2.0-or-later 3 SPDX-FileCopyrightText: 2006-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org> 4 */ 5 6 #ifndef PASCALWRITER_H 7 #define PASCALWRITER_H 8 9 #include "simplecodegenerator.h" 10 11 class UMLAssociation; 12 class UMLOperation; 13 class QTextStream; 14 15 /** 16 * Pascal class writer. 17 * @author Oliver Kellogg 18 * Bugs and comments to umbrello-devel@kde.org or https://bugs.kde.org. 19 */ 20 class PascalWriter : public SimpleCodeGenerator 21 { 22 Q_OBJECT 23 public: 24 25 PascalWriter(); 26 virtual ~PascalWriter (); 27 28 virtual void writeClass (UMLClassifier *c); 29 30 virtual Uml::ProgrammingLanguage::Enum language() const; 31 32 QStringList defaultDatatypes() const; 33 34 virtual bool isReservedKeyword(const QString & rPossiblyReservedKeyword); 35 36 virtual QStringList reservedKeywords() const; 37 38 private: 39 40 void writeOperation (UMLOperation *op, QTextStream &ada, bool is_comment = false); 41 42 void computeAssocTypeAndRole (UMLAssociation *a, QString& typeName, QString& roleName); 43 44 bool isOOClass (UMLClassifier *c); 45 46 QString qualifiedName (UMLPackage *p, bool withType = false, bool byValue = false); 47 48 static const QString defaultPackageSuffix; 49 50 }; 51 52 #endif // PASCALWRITER_H 53 54