umbrello: umbrello/codegenerators/perl/perlwriter.h Source File

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

perlwriter.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) 2003 David Hugh-Jones <hughjonesd@yahoo.co.uk> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef PERLWRITER_H
13 #define PERLWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umlattributelist.h"
17 #include "umloperationlist.h"
18
19 class UMLOperation;
20 class UMLAttribute;
21 class UMLClassifier;
22
27 class PerlWriter : public SimpleCodeGenerator
28 {
29 Q_OBJECT
30 public:
31
32 PerlWriter();
33 virtual ~PerlWriter();
34
35 virtual void writeClass(UMLClassifier *c);
36
37 virtual Uml::ProgrammingLanguage::Enum language() const;
38
39 virtual QStringList reservedKeywords() const;
40
41 QStringList defaultDatatypes();
42
43 private:
44 void writeOperations(UMLClassifier *c, QTextStream &perl);
45 void writeOperations(const QString &classname, UMLOperationList &opList,
46 QTextStream &perl);
47
48 void writeAttributes(UMLClassifier *c, QTextStream &perl);
49 void writeAttributes(UMLAttributeList &atList, QTextStream &perl);
50
51 bool GetUseStatements(UMLClassifier *c, QString &Ret,
52 QString &ThisPkgName);
53
54 };
55
56 #endif //PERLWRITER
PerlWriter::GetUseStatements
bool GetUseStatements(UMLClassifier *c, QString &Ret, QString &ThisPkgName)
Definition: perlwriter.cpp:279
UMLObject::package
QString package(const QString &separator=QString(), bool includeRoot=false)
Definition: umlobject.cpp:577
umlattributelist.h
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
Uml::ProgrammingLanguage::Perl
@ Perl
Definition: basictypes.h:299
SimpleCodeGenerator::m_indentation
QString m_indentation
Definition: simplecodegenerator.h:85
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:27
UMLObject::name
QString name() const
Definition: umlobject.cpp:211
umloperationlist.h
CodeGenerator::getHeadingFile
virtual QString getHeadingFile(const QString &file)
Definition: codegenerator.cpp:407
UMLOperation::getParmList
UMLAttributeList getParmList() const
Definition: operation.cpp:178
includes
Definition: includes.h:3
CodeGenerator::cleanName
static QString cleanName(const QString &name)
Definition: codegenerator.cpp:549
operation.h
UMLAttribute::getInitialValue
QString getInitialValue() const
Definition: attribute.cpp:99
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:622
UMLApp::commonPolicy
CodeGenerationPolicy * commonPolicy() const
Definition: uml.cpp:2274
PerlWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: perlwriter.cpp:721
association.h
SimpleCodeGenerator::hasDefaultValueAttr
bool hasDefaultValueAttr(UMLClassifier *c)
Definition: simplecodegenerator.cpp:255
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
PerlWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: perlwriter.cpp:332
PerlWriter::~PerlWriter
virtual ~PerlWriter()
Definition: perlwriter.cpp:275
UMLObject::isAbstract
bool isAbstract() const
Definition: umlobject.cpp:348
PerlWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &perl)
Definition: perlwriter.cpp:515
Uml::ModelType::toString
QString toString(Enum item)
Definition: basictypes.cpp:81
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:765
CodeGenerator::formatSourceCode
static QString formatSourceCode(const QString &code, const QString &indentation)
Definition: codegenerator.cpp:743
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
CodeGenerator::showGeneratedFile
void showGeneratedFile(const QString &filename)
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
attribute.h
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.h:87
PerlWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: perlwriter.cpp:502
CodeGenerationPolicy
Definition: codegenerationpolicy.h:30
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
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:28
UMLClassifier::getAttributeList
UMLAttributeList getAttributeList() const
Definition: classifier.cpp:436
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17
UMLCanvasObject::getAggregations
UMLAssociationList getAggregations()
Definition: umlcanvasobject.cpp:412
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
classifier.h
UMLOperation
Definition: operation.h:25
PerlWriter
Definition: perlwriter.h:28
uml.h
reserved_words
static const char * reserved_words[]
Definition: perlwriter.cpp:27
CodeGenerationPolicy::setOutputDirectory
void setOutputDirectory(QDir new_var)
Definition: codegenerationpolicy.cpp:201
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
PerlWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: perlwriter.cpp:734
perlwriter.h
CodeGenerationPolicy::getOutputDirectory
QDir getOutputDirectory()
Definition: codegenerationpolicy.cpp:211
UMLObject::isUMLDatatype
bool isUMLDatatype()
Definition: umlobject.h:206
UMLCanvasObject::getCompositions
UMLAssociationList getCompositions()
Definition: umlcanvasobject.cpp:422
PerlWriter::writeAttributes
void writeAttributes(UMLClassifier *c, QTextStream &perl)
Definition: perlwriter.cpp:658
simplecodegenerator.h
Uml::Visibility::Private
@ Private
Definition: basictypes.h:78
PerlWriter::PerlWriter
PerlWriter()
Definition: perlwriter.cpp:271
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:775
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:79
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
UMLAssociationList
QList< UMLAssociation * > UMLAssociationList
Definition: umlassociationlist.h:18
SimpleCodeGenerator::findFileName
QString findFileName(UMLPackage *concept, const QString &ext)
Definition: simplecodegenerator.cpp:91
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:33