umbrello: umbrello/codegenerators/idl/idlwriter.h Source File

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

idlwriter.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-2020 *
8 * Oliver Kellogg <okellogg@users.sourceforge.net> *
9 * copyright (C) 2003-2020 *
10 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
11 ***************************************************************************/
12
13 #ifndef IDLWRITER_H
14 #define IDLWRITER_H
15
16 #include "simplecodegenerator.h"
17 #include "umlobject.h"
18
19 class UMLAssociation;
20 class UMLOperation;
21 class QTextStream;
22
29 class IDLWriter : public SimpleCodeGenerator
30 {
31 public:
32
33 IDLWriter();
34 virtual ~IDLWriter();
35
36 virtual void writeClass(UMLClassifier *c);
37
38 virtual Uml::ProgrammingLanguage::Enum language() const;
39
40 QStringList defaultDatatypes();
41
42 virtual QStringList reservedKeywords() const;
43
44 private:
45
46 void writeOperation(UMLOperation* op, QTextStream& idl, bool is_comment = false);
47
48 void computeAssocTypeAndRole(UMLAssociation* a, UMLClassifier *c,
49 QString& typeName, QString& roleName);
50
51 static bool isOOClass(UMLClassifier* c);
52
53 static bool assocTypeIsMappableToAttribute(Uml::AssociationType::Enum at);
54
55 };
56
57 #endif // IDLWRITER_H
IDLWriter
Definition: idlwriter.h:29
IDLWriter::~IDLWriter
virtual ~IDLWriter()
Definition: idlwriter.cpp:34
UMLClassifier::getOpList
UMLOperationList getOpList(bool includeInherited=false, UMLClassifierSet *alreadyTraversed=0)
Definition: classifier.cpp:939
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
CodeGenerator::getHeadingFile
virtual QString getHeadingFile(const QString &file)
Definition: codegenerator.cpp:407
UMLCanvasObject::getAssociations
UMLAssociationList getAssociations()
Definition: umlcanvasobject.cpp:329
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
UMLClassifier::getFilteredList
virtual UMLClassifierListItemList getFilteredList(UMLObject::ObjectType ot) const
Definition: classifier.cpp:998
operation.h
UMLClassifierListItem::getTypeName
virtual QString getTypeName() const
Definition: classifierlistitem.cpp:112
Uml::RoleType::A
@ A
Definition: basictypes.h:256
CodeGenerator::findObjectsRelated
static void findObjectsRelated(UMLClassifier *c, UMLPackageList &cList)
Definition: codegenerator.cpp:622
association.h
Uml::ParameterDirection::Enum
Enum
Definition: basictypes.h:273
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
Uml::AssociationType::toString
QString toString(Enum item)
Definition: basictypes.cpp:300
Uml::AssociationType::UniAssociation
@ UniAssociation
Definition: basictypes.h:136
Uml::ProgrammingLanguage::IDL
@ IDL
Definition: basictypes.h:294
UMLObject
The base class for UML objects.
Definition: umlobject.h:73
SimpleCodeGenerator::indent
QString indent()
Definition: simplecodegenerator.cpp:76
UMLObject::isAbstract
bool isAbstract() const
Definition: umlobject.cpp:348
IDLWriter::assocTypeIsMappableToAttribute
static bool assocTypeIsMappableToAttribute(Uml::AssociationType::Enum at)
Definition: idlwriter.cpp:52
IDLWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: idlwriter.cpp:112
SimpleCodeGenerator::m_indentLevel
int m_indentLevel
Definition: simplecodegenerator.h:86
UMLObject::baseType
ObjectType baseType() const
Definition: umlobject.cpp:397
Uml::ParameterDirection::InOut
@ InOut
Definition: basictypes.h:275
CodeGenerator::forceDoc
bool forceDoc() const
Definition: codegenerator.cpp:765
UMLObject::ot_EnumLiteral
@ ot_EnumLiteral
Definition: umlobject.h:94
umlclassifierlistitemlist.h
Uml::AssociationType::Aggregation
@ Aggregation
Definition: basictypes.h:125
Uml::Visibility::Public
@ Public
Definition: basictypes.h:77
IDLWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: idlwriter.cpp:61
UMLAttribute::getParmKind
Uml::ParameterDirection::Enum getParmKind() const
Definition: attribute.cpp:122
IDLWriter::IDLWriter
IDLWriter()
Definition: idlwriter.cpp:30
classifierlistitem.h
CodeGenerator::showGeneratedFile
void showGeneratedFile(const QString &filename)
UMLObject::visibility
Uml::Visibility::Enum visibility() const
Definition: umlobject.cpp:466
attribute.h
IDLWriter::computeAssocTypeAndRole
void computeAssocTypeAndRole(UMLAssociation *a, UMLClassifier *c, QString &typeName, QString &roleName)
Definition: idlwriter.cpp:66
a
QString a
Definition: petalnode.cpp:18
SimpleCodeGenerator::m_endl
QString m_endl
Definition: simplecodegenerator.h:87
Uml::Visibility::toString
QString toString(Enum item, bool mnemonic)
Definition: basictypes.cpp:124
UMLObject::fullyQualifiedName
virtual QString fullyQualifiedName(const QString &separator=QString(), bool includeRoot=false) const
Definition: umlobject.cpp:227
IDLWriter::isOOClass
static bool isOOClass(UMLClassifier *c)
Definition: idlwriter.cpp:38
Uml::AssociationType::Association
@ Association
Definition: basictypes.h:127
CodeGenerator::formatDoc
static QString formatDoc(const QString &text, const QString &linePrefix=QLatin1String(" *"), int lineWidth=80)
Definition: codegenerator.cpp:712
UMLObject::packages
UMLPackageList packages(bool includeRoot=false) const
Definition: umlobject.cpp:597
uDebug
#define uDebug()
Definition: debug_utils.h:122
SimpleCodeGenerator
Definition: simplecodegenerator.h:33
Uml::RoleType::B
@ B
Definition: basictypes.h:257
Uml::ParameterDirection::Out
@ Out
Definition: basictypes.h:276
IDLWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: idlwriter.cpp:457
Uml::AssociationType::Enum
Enum
Definition: basictypes.h:123
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
Uml::Visibility::Enum
Enum
Definition: basictypes.h:76
UMLClassifierListItemList
Definition: umlclassifierlistitemlist.h:26
CodeGenerator::codeGenerated
void codeGenerated(UMLClassifier *concept, bool generated)
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:24
UMLObject::ot_Enum
@ ot_Enum
Definition: umlobject.h:88
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:39
debug_utils.h
UMLAssociation
Sets up association information.
Definition: association.h:32
UMLObject::isUMLDatatype
bool isUMLDatatype()
Definition: umlobject.h:206
UMLCanvasObject::getCompositions
UMLAssociationList getCompositions()
Definition: umlcanvasobject.cpp:422
umlobject.h
Uml::AssociationType::Composition
@ Composition
Definition: basictypes.h:134
IDLWriter::writeOperation
void writeOperation(UMLOperation *op, QTextStream &idl, bool is_comment=false)
Definition: idlwriter.cpp:402
simplecodegenerator.h
idlwriter.h
package.h
CodeGenerator::forceSections
bool forceSections() const
Definition: codegenerator.cpp:775
UMLObject::stereotype
QString stereotype(bool includeAdornments=false) const
Definition: umlobject.cpp:558
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:29
UMLAssociationList
QList< UMLAssociation * > UMLAssociationList
Definition: umlassociationlist.h:18
SimpleCodeGenerator::findFileName
QString findFileName(UMLPackage *concept, const QString &ext)
Definition: simplecodegenerator.cpp:91
umldoc.h
IDLWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: idlwriter.cpp:437
CodeGenerator::openFile
bool openFile(QFile &file, const QString &name)
Definition: codegenerator.cpp:523
UMLPackage
Non-graphical information for a Package.
Definition: package.h:32
enum.h