umbrello: umbrello/codegenerators/csharp/csharpwriter.h Source File

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

csharpwriter.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) 2007-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef CSHARPWRITER_H
12 #define CSHARPWRITER_H
13
14 #include "classifierlistitem.h"
15 #include "simplecodegenerator.h"
16 #include "umlassociationlist.h"
17 #include "umlattributelist.h"
18 #include "umloperationlist.h"
19
25 class CSharpWriter : public SimpleCodeGenerator
26 {
27 Q_OBJECT
28 public:
29 CSharpWriter();
30 virtual ~CSharpWriter();
31
32 virtual void writeClass(UMLClassifier *c);
33
34 virtual Uml::ProgrammingLanguage::Enum language() const;
35
36 virtual QStringList reservedKeywords() const;
37
38 QStringList defaultDatatypes();
39
40 private:
41
45 QString m_container_indent;
46
50 UMLPackageList m_seenIncludes;
51
55 int m_unnamedRoles;
56
57 void writeRealizationsRecursive(UMLClassifier *currentClass,
58 UMLAssociationList *realizations,
59 QTextStream &cs);
60
61 void writeOperations(UMLClassifier *c, QTextStream &cs);
62 void writeOperations(UMLOperationList opList,
63 QTextStream &cs,
64 bool interface = false,
65 bool isOverride = false,
66 bool generateErrorStub = false);
67
68 void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs);
69
70 void writeAttributes(UMLClassifier *c, QTextStream &cs);
71 void writeAttributes(UMLAttributeList &atList, QTextStream &cs);
72
73 void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs);
74
75 void writeAttribute(const QString& doc,
76 Uml::Visibility::Enum visibility,
77 bool isStatic,
78 const QString& typeName,
79 const QString& name,
80 const QString& initialValue,
81 bool asProperty,
82 QTextStream &cs);
83
84 QString makeLocalTypeName(UMLClassifierListItem *cl);
85
86 };
87
88 #endif
CSharpWriter
Definition: csharpwriter.h:26
CSharpWriter::writeAssociatedAttributes
void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs)
Definition: csharpwriter.cpp:658
CSharpWriter::m_container_indent
QString m_container_indent
Definition: csharpwriter.h:45
CSharpWriter::CSharpWriter
CSharpWriter()
Definition: csharpwriter.cpp:104
CSharpWriter::writeAttribute
void writeAttribute(const QString &doc, Uml::Visibility::Enum visibility, bool isStatic, const QString &typeName, const QString &name, const QString &initialValue, bool asProperty, QTextStream &cs)
Definition: csharpwriter.cpp:700
CSharpWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: csharpwriter.cpp:772
CSharpWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: csharpwriter.cpp:118
CSharpWriter::writeRealizationsRecursive
void writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs)
Definition: csharpwriter.cpp:431
CSharpWriter::writeOverridesRecursive
void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs)
Definition: csharpwriter.cpp:394
CSharpWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: csharpwriter.cpp:780
CSharpWriter::makeLocalTypeName
QString makeLocalTypeName(UMLClassifierListItem *cl)
Definition: csharpwriter.cpp:757
CSharpWriter::~CSharpWriter
virtual ~CSharpWriter()
Definition: csharpwriter.cpp:111
CSharpWriter::writeAttributes
void writeAttributes(UMLClassifier *c, QTextStream &cs)
Definition: csharpwriter.cpp:583
CSharpWriter::m_seenIncludes
UMLPackageList m_seenIncludes
Definition: csharpwriter.h:50
CSharpWriter::m_unnamedRoles
int m_unnamedRoles
Definition: csharpwriter.h:55
CSharpWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: csharpwriter.cpp:146
CSharpWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &cs)
Definition: csharpwriter.cpp:325
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
UMLAttributeList
Definition: umlattributelist.h:27
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition: classifierlistitem.h:30
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
classifierlistitem.h
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:305
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
visibility
Definition: visibility.py:1
simplecodegenerator.h
umlassociationlist.h
UMLAssociationList
QList< UMLAssociation * > UMLAssociationList
Definition: umlassociationlist.h:18
umlattributelist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition: umlclassifierlist.h:17
umloperationlist.h
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition: umlpackagelist.h:17