umbrello  2.35.1
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  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 
21 {
22  Q_OBJECT
23 public:
24 
25  PascalWriter();
26  virtual ~PascalWriter ();
27 
28  virtual void writeClass (UMLClassifier *c);
29 
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 (const 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 
PascalWriter::writeOperation
void writeOperation(UMLOperation *op, QTextStream &ada, bool is_comment=false)
Definition: pascalwriter.cpp:349
document
GNU GENERAL PUBLIC LICENSE June Free Software Inc Franklin Fifth USA Everyone is permitted to copy and distribute verbatim copies of this license document
Definition: GPL-2.0-only.txt:8
PascalWriter::isReservedKeyword
virtual bool isReservedKeyword(const QString &rPossiblyReservedKeyword)
Definition: pascalwriter.cpp:445
template.h
UMLObject::ObjectType
ObjectType
Definition: umlobject.h:75
PascalWriter::defaultDatatypes
QStringList defaultDatatypes() const
Definition: pascalwriter.cpp:411
pascalwriter.h
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:291
UMLAttributeList
Definition: umlattributelist.h:20
UMLObject::name
QString name() const
Definition: umlobject.cpp:207
Uml::ProgrammingLanguage::Pascal
@ Pascal
Definition: basictypes.h:301
CodeGenerator::getHeadingFile
virtual QString getHeadingFile(const QString &file)
Definition: codegenerator.cpp:406
Uml::ParameterDirection::In
@ In
Definition: basictypes.h:255
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:177
CodeGenerator::cleanName
static QString cleanName(const QString &name)
Definition: codegenerator.cpp:548
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:999
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:85
operation.h
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:100
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:108
Uml::RoleType::A
@ A
Definition: basictypes.h:237
PascalWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: pascalwriter.cpp:137
Uml::ModelType::Logical
@ Logical
Definition: basictypes.h:28
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:621
UMLObject::ot_Interface
@ ot_Interface
Definition: umlobject.h:82
association.h
SimpleCodeGenerator::overwritableName
QString overwritableName(UMLPackage *concept, const QString &name, const QString &ext)
Definition: simplecodegenerator.cpp:163
UMLObject::umlPackage
UMLPackage * umlPackage() const
Definition: umlobject.cpp:651
UMLObject::isStatic
bool isStatic() const
Definition: umlobject.cpp:362
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:254
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:12
PascalWriter::PascalWriter
PascalWriter()
Definition: pascalwriter.cpp:34
PascalWriter::computeAssocTypeAndRole
void computeAssocTypeAndRole(UMLAssociation *a, QString &typeName, QString &roleName)
Definition: pascalwriter.cpp:113
PascalWriter
Definition: pascalwriter.h:20
SimpleCodeGenerator::indent
QString indent()
Definition: simplecodegenerator.cpp:72
SimpleCodeGenerator::m_indentLevel
int m_indentLevel
Definition: simplecodegenerator.h:73
PascalWriter::isOOClass
bool isOOClass(const UMLClassifier *c)
Definition: pascalwriter.cpp:58
PascalWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: pascalwriter.cpp:50
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:764
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:90
CodeGenerator::formatSourceCode
static QString formatSourceCode(const QString &code, const QString &indentation)
Definition: codegenerator.cpp:742
umlclassifierlistitemlist.h
Uml::Visibility::Public
@ Public
Definition: basictypes.h:46
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:123
PascalWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: pascalwriter.cpp:461
classifierlistitem.h
CodeGenerator::showGeneratedFile
void showGeneratedFile(const QString &filename)
Definition: moc_codegenerator.cpp:181
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:462
it
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two distribute and or modify the software for each author s protection and we want to make certain that everyone understands that there is no warranty for this free software If the software is modified by someone else and passed we want its recipients to know that what they have is not the so that any problems introduced by others will not reflect on the original authors reputations any free program is threatened constantly by software patents We wish to avoid the danger that redistributors of a free program will individually obtain patent in effect making the program proprietary To prevent we have made it clear that any patent must be licensed for everyone s free use or not licensed at all The precise terms and conditions for distribution and modification follow TERMS AND CONDITIONS FOR DISTRIBUTION AND MODIFICATION This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License The refers to any such program or and a work based on the Program means either the Program or any derivative work under copyright a work containing the Program or a portion of it
Definition: GPL-2.0-only.txt:64
attribute.h
a
QString a
Definition: petalnode.cpp:13
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.h:74
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:223
folder.h
UMLObject::ot_Datatype
@ ot_Datatype
Definition: umlobject.h:83
CodeGenerator::formatDoc
static QString formatDoc(const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80)
Definition: codegenerator.cpp:711
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1422
SimpleCodeGenerator
Definition: simplecodegenerator.h:29
UMLObject::toString
static QString toString(ObjectType ot)
Definition: umlobject.cpp:1214
logWarn1
#define logWarn1(s, a)
Definition: uml.h:544
c
type show c for details The hypothetical commands show w and show c should show the appropriate parts of the General Public License Of the commands you use may be called something other than show w and show c
Definition: GPL-2.0-only.txt:301
UMLApp::app
static UMLApp * app()
Definition: uml.cpp:349
UMLAttribute
Sets up attribute information.
Definition: attribute.h:22
UMLObject::isUMLDatatype
bool isUMLDatatype() const
Definition: umlobject.h:204
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:11
logWarn0
#define logWarn0(s)
Definition: uml.h:538
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:21
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
Definition: moc_codegenerator.cpp:167
PascalWriter::qualifiedName
QString qualifiedName(UMLPackage *p, bool withType=false, bool byValue=false)
Definition: pascalwriter.cpp:78
classifier.h
UMLOperation
Definition: operation.h:19
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:84
uml.h
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:34
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:28
simplecodegenerator.h
Uml::Visibility::Private
@ Private
Definition: basictypes.h:47
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:774
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:48
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:12
umltemplatelist.h
PascalWriter::~PascalWriter
virtual ~PascalWriter()
Definition: pascalwriter.cpp:42
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:24
UMLEnum
Non-graphical Information for an Enum.
Definition: enum.h:23
PascalWriter::defaultPackageSuffix
static const QString defaultPackageSuffix
Definition: pascalwriter.h:48
umldoc.h
CodeGenerator::openFile
bool openFile(QFile &file, const QString &name)
Definition: codegenerator.cpp:522
UMLOperation::getSourceCode
QString getSourceCode() const
Definition: operation.cpp:523
UMLPackage
Non-graphical information for a Package.
Definition: package.h:27
enum.h