umbrello: umbrello/codegenerators/js/jswriter.h Source File

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

jswriter.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 Alexander Blum <blum@kewbee.de> *
8 * copyright (C) 2004-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef JSWRITER_H
13 #define JSWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umloperationlist.h"
17 #include "umlassociationlist.h"
18
19 class QTextStream;
20
25 class JSWriter : public SimpleCodeGenerator
26 {
27 Q_OBJECT
28 public:
29
30 JSWriter();
31 virtual ~JSWriter();
32
33 virtual void writeClass(UMLClassifier *c);
34
35 virtual Uml::ProgrammingLanguage::Enum language() const;
36
37 virtual QStringList reservedKeywords() const;
38
39 private:
40 void writeOperations(QString classname, UMLOperationList *opList, QTextStream &js);
41
42 void writeAssociation(QString& classname, UMLAssociationList& assoclist, QTextStream &js);
43 };
44
45 #endif //JSWRITER
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
jswriter.h
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
Uml::RoleType::A
@ A
Definition: basictypes.h:256
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:622
association.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
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
SimpleCodeGenerator::hasAbstractOps
bool hasAbstractOps(UMLClassifier *c)
Definition: simplecodegenerator.cpp:270
JSWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: jswriter.cpp:289
CodeGenerator::showGeneratedFile
void showGeneratedFile(const QString &filename)
attribute.h
JSWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: jswriter.cpp:298
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
Uml::RoleType::B
@ B
Definition: basictypes.h:257
JSWriter
Definition: jswriter.h:25
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
JSWriter::writeAssociation
void writeAssociation(QString &classname, UMLAssociationList &assoclist, QTextStream &js)
Definition: jswriter.cpp:189
UMLCanvasObject::getAggregations
UMLAssociationList getAggregations()
Definition: umlcanvasobject.cpp:412
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
JSWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: jswriter.cpp:36
classifier.h
JSWriter::~JSWriter
virtual ~JSWriter()
Definition: jswriter.cpp:28
UMLOperation
Definition: operation.h:24
JSWriter::JSWriter
JSWriter()
Definition: jswriter.cpp:24
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
umlassociationlist.h
UMLAssociation
Sets up association information.
Definition: association.h:32
UMLCanvasObject::getCompositions
UMLAssociationList getCompositions()
Definition: umlcanvasobject.cpp:422
simplecodegenerator.h
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:775
Uml::ProgrammingLanguage::JavaScript
@ JavaScript
Definition: basictypes.h:296
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
JSWriter::writeOperations
void writeOperations(QString classname, UMLOperationList *opList, QTextStream &js)
Definition: jswriter.cpp:237
Uml::RoleType::Enum
Enum
Definition: basictypes.h:255
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32