umbrello: umbrello/codegenerators/php/phpwriter.h Source File

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

phpwriter.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) 2002 Heiko Nardmann <h.nardmann@secunet.de> *
8 * copyright (C) 2003-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef PHPWRITER_H
13 #define PHPWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umlattributelist.h"
17 #include "umloperationlist.h"
18
23 class PhpWriter : public SimpleCodeGenerator
24 {
25 Q_OBJECT
26 public:
27
28 PhpWriter();
29 virtual ~PhpWriter();
30
31 virtual void writeClass(UMLClassifier *c);
32
33 virtual Uml::ProgrammingLanguage::Enum language() const;
34
35 virtual QStringList reservedKeywords() const;
36
37 private:
38 void writeOperations(UMLClassifier *c, QTextStream &php);
39 void writeOperations(const QString& classname,
40 UMLOperationList &opList,
41 QTextStream &php);
42
43 void writeAttributes(UMLClassifier *c, QTextStream &php);
44 void writeAttributes(UMLAttributeList &atList, QTextStream &php);
45 };
46
47 #endif //PHPWRITER
Uml::ProgrammingLanguage::PHP
@ PHP
Definition: basictypes.h:300
umlattributelist.h
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
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:26
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
PhpWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: phpwriter.cpp:2992
Uml::RoleType::A
@ A
Definition: basictypes.h:256
reserved_words
static const char * reserved_words[]
Definition: phpwriter.cpp:24
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:622
association.h
SimpleCodeGenerator::hasDefaultValueAttr
bool hasDefaultValueAttr(UMLClassifier *c)
Definition: simplecodegenerator.cpp:255
PhpWriter::~PhpWriter
virtual ~PhpWriter()
Definition: phpwriter.cpp:2984
UMLObject::isStatic
bool isStatic() const
Definition: umlobject.cpp:366
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
PhpWriter::PhpWriter
PhpWriter()
Definition: phpwriter.cpp:2980
PhpWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: phpwriter.cpp:3344
UMLObject::isAbstract
bool isAbstract() const
Definition: umlobject.cpp:348
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:765
CodeGenerator::formatSourceCode
static QString formatSourceCode(const QString &code, const QString &indentation)
Definition: codegenerator.cpp:743
PhpWriter
Definition: phpwriter.h:23
phpwriter.h
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
a
QString a
Definition: petalnode.cpp:18
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.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
PhpWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &php)
Definition: phpwriter.cpp:3146
UMLObject::doc
QString doc() const
Definition: umlobject.cpp:435
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
UMLCanvasObject::getAggregations
UMLAssociationList getAggregations()
Definition: umlcanvasobject.cpp:412
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
classifier.h
UMLOperation
Definition: operation.h:24
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:32
UMLCanvasObject::getCompositions
UMLAssociationList getCompositions()
Definition: umlcanvasobject.cpp:422
simplecodegenerator.h
Uml::Visibility::Private
@ Private
Definition: basictypes.h:78
PhpWriter::writeAttributes
void writeAttributes(UMLClassifier *c, QTextStream &php)
Definition: phpwriter.cpp:3267
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
PhpWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: phpwriter.cpp:3353
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32