umbrello: umbrello/codegenerators/vala/valawriter.h Source File

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

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- File List
- File Members

valawriter.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2009-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6//
7// C++ Interface: valawriter
8//
9
10#ifndef VALAWRITER_H
11#define VALAWRITER_H
12
13#include "classifierlistitem.h"
14#include "simplecodegenerator.h"
15#include "umlassociationlist.h"
16#include "umlattributelist.h"
17#include "umloperationlist.h"
18
23 class ValaWriter : public SimpleCodeGenerator
24{
25 Q_OBJECT
26public:
27 ValaWriter();
28 virtual ~ValaWriter();
29
30 virtual void writeClass(UMLClassifier *c);
31
32 virtual Uml::ProgrammingLanguage::Enum language() const;
33
34 virtual QStringList reservedKeywords() const;
35
36 QStringList defaultDatatypes() const;
37
38private:
39
41 QString m_container_indent;
42
44 UMLPackageList m_seenIncludes;
45
47 int m_unnamedRoles;
48
49 void writeRealizationsRecursive(UMLClassifier *currentClass,
50 UMLAssociationList *realizations,
51 QTextStream &cs);
52
53 void writeOperations(UMLClassifier *c, QTextStream &cs);
54 void writeOperations(UMLOperationList opList,
55 QTextStream &cs,
56 bool interface = false,
57 bool isOverride = false,
58 bool generateErrorStub = false);
59
60 void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs);
61
62 void writeAttributes(UMLClassifier *c, QTextStream &cs);
63 void writeAttributes(UMLAttributeList &atList, QTextStream &cs);
64
65 void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs);
66
67 void writeAttribute(const QString& doc,
68 Uml::Visibility::Enum visibility,
69 bool isStatic,
70 const QString& typeName,
71 const QString& name,
72 const QString& initialValue,
73 bool asProperty,
74 QTextStream &cs);
75
76 QString makeLocalTypeName(UMLClassifierListItem *cl);
77
78};
79
80#endif
SimpleCodeGenerator
Definition simplecodegenerator.h:30
UMLAttributeList
Definition umlattributelist.h:21
UMLClassifierListItem
A base class for classifier list items (e.g. attributes)
Definition classifierlistitem.h:25
UMLClassifier
Information for a non-graphical Concept/Class.
Definition classifier.h:35
ValaWriter
Definition valawriter.h:24
ValaWriter::writeAttributes
void writeAttributes(UMLClassifier *c, QTextStream &cs)
Definition valawriter.cpp:635
ValaWriter::m_unnamedRoles
int m_unnamedRoles
Counts associations without a role name for giving a default name.
Definition valawriter.h:47
ValaWriter::defaultDatatypes
QStringList defaultDatatypes() const
Definition valawriter.cpp:123
ValaWriter::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 valawriter.cpp:755
ValaWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition valawriter.cpp:836
ValaWriter::writeRealizationsRecursive
void writeRealizationsRecursive(UMLClassifier *currentClass, UMLAssociationList *realizations, QTextStream &cs)
Definition valawriter.cpp:470
ValaWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition valawriter.cpp:179
ValaWriter::writeAssociatedAttributes
void writeAssociatedAttributes(UMLAssociationList &associated, UMLClassifier *c, QTextStream &cs)
Definition valawriter.cpp:711
ValaWriter::m_seenIncludes
UMLPackageList m_seenIncludes
Collection of included namespaces, to skip them from variable types.
Definition valawriter.h:44
ValaWriter::writeOverridesRecursive
void writeOverridesRecursive(UMLClassifierList *superclasses, QTextStream &cs)
Definition valawriter.cpp:433
ValaWriter::makeLocalTypeName
QString makeLocalTypeName(UMLClassifierListItem *cl)
Definition valawriter.cpp:820
ValaWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition valawriter.cpp:845
ValaWriter::ValaWriter
ValaWriter()
Definition valawriter.cpp:106
ValaWriter::~ValaWriter
virtual ~ValaWriter()
Definition valawriter.cpp:115
ValaWriter::m_container_indent
QString m_container_indent
Adds extra indenting if the class is in a container (namespace).
Definition valawriter.h:41
ValaWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &cs)
Definition valawriter.cpp:365
classifierlistitem.h
Uml::ProgrammingLanguage::Enum
Enum
Definition basictypes.h:291
Uml::Visibility::Enum
Enum
Definition basictypes.h:45
visibility
Definition visibility.py:1
simplecodegenerator.h
umlassociationlist.h
UMLAssociationList
QList< UMLAssociation * > UMLAssociationList
Definition umlassociationlist.h:14
umlattributelist.h
UMLClassifierList
QList< UMLClassifier * > UMLClassifierList
Definition umlclassifierlist.h:14
umloperationlist.h
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition umloperationlist.h:14
UMLPackageList
QList< UMLPackage * > UMLPackageList
Definition umlpackagelist.h:13