umbrello: umbrello/codegenerators/tcl/tclwriter.h Source File

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

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

- File List
- File Members

tclwriter.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3
4 SPDX-FileCopyrightText: 2005 Rene Meyer <rene.meyer@sturmit.de>
5 SPDX-FileCopyrightText: 2006-2020 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
6*/
7
8#ifndef TCLWRITER_H
9#define TCLWRITER_H
10
11#include "simplecodegenerator.h"
12#include "umloperationlist.h"
13#include "umlattributelist.h"
14#include "umlassociationlist.h"
15
16#include <QStringList>
17
18class QFile;
19class QTextStream;
20
27 class TclWriter : public SimpleCodeGenerator
28{
29public:
30
31 TclWriter();
32 virtual ~TclWriter();
33
34 virtual void writeClass(UMLClassifier * c);
35
36 virtual Uml::ProgrammingLanguage::Enum language() const;
37
38 virtual QStringList reservedKeywords() const;
39
40private:
41
42 void writeHeaderFile(UMLClassifier * c, QFile & file);
43 void writeSourceFile(UMLClassifier * c, QFile & file);
44
45 void writeCode(const QString &text);
46 void writeComm(const QString &text);
47 void writeDocu(const QString &text);
48
49 void writeConstructorDecl();
50 void writeDestructorDecl();
51
52 void writeAttributeDecl(UMLClassifier * c, Uml::Visibility::Enum visibility, bool writeStatic);
53
54 void writeAssociationIncl(UMLAssociationList list,
55 Uml::ID::Type myId, const QString &type);
56 void writeAssociationDecl(UMLAssociationList associations,
57 Uml::Visibility::Enum permit, Uml::ID::Type id,
58 const QString &type);
59
60 void writeAssociationRoleDecl(const QString &fieldClassName,
61 const QString &roleName, const QString &multi,
62 const QString &doc, const QString &docname);
63
64 void writeInitAttributeHeader(UMLClassifier * c);
65 void writeInitAttributeSource(UMLClassifier* c);
66
67 void writeConstructorHeader();
68 void writeConstructorSource(UMLClassifier * c);
69
70 void writeDestructorHeader();
71 void writeDestructorSource();
72
73 void writeOperationHeader(UMLClassifier * c,
74 Uml::Visibility::Enum permitScope);
75 void writeOperationSource(UMLClassifier * c,
76 Uml::Visibility::Enum permitScope);
77
78 void writeAttributeSource(UMLClassifier * c);
79
80 void writeAssociationSource(UMLAssociationList associations,
81 Uml::ID::Type id);
82 void writeAssociationRoleSource(const QString &fieldClassName,
83 const QString &roleName,
84 const QString &multi);
85
86 void writeUse(UMLClassifier * c);
87
88 QString getUMLObjectName(UMLObject * obj);
89
90 QString fixTypeName(const QString &string);
91
92 QTextStream* mStream;
93 QString mNamespace;
94 QString mClassGlobal;
95 QStringList ObjectFieldVariables;
96 QStringList VectorFieldVariables;
97
98};
99
100#endif // TCLWRITER_H
SimpleCodeGenerator
Definition: simplecodegenerator.h:30
TclWriter
Definition: tclwriter.h:28
TclWriter::~TclWriter
virtual ~TclWriter()
Definition: tclwriter.cpp:85
TclWriter::fixTypeName
QString fixTypeName(const QString &string)
Definition: tclwriter.cpp:914
TclWriter::writeAssociationIncl
void writeAssociationIncl(UMLAssociationList list, Uml::ID::Type myId, const QString &type)
Definition: tclwriter.cpp:403
TclWriter::VectorFieldVariables
QStringList VectorFieldVariables
Definition: tclwriter.h:96
TclWriter::writeAttributeSource
void writeAttributeSource(UMLClassifier *c)
Definition: tclwriter.cpp:816
TclWriter::writeAttributeDecl
void writeAttributeDecl(UMLClassifier *c, Uml::Visibility::Enum visibility, bool writeStatic)
Definition: tclwriter.cpp:496
TclWriter::writeAssociationSource
void writeAssociationSource(UMLAssociationList associations, Uml::ID::Type id)
Definition: tclwriter.cpp:828
TclWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: tclwriter.cpp:102
TclWriter::writeDestructorSource
void writeDestructorSource()
Definition: tclwriter.cpp:484
TclWriter::writeAssociationRoleDecl
void writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName, const QString &multi, const QString &doc, const QString &docname)
Definition: tclwriter.cpp:579
TclWriter::writeDestructorDecl
void writeDestructorDecl()
TclWriter::TclWriter
TclWriter()
Definition: tclwriter.cpp:77
TclWriter::writeInitAttributeSource
void writeInitAttributeSource(UMLClassifier *c)
Definition: tclwriter.cpp:633
TclWriter::writeAssociationDecl
void writeAssociationDecl(UMLAssociationList associations, Uml::Visibility::Enum permit, Uml::ID::Type id, const QString &type)
Definition: tclwriter.cpp:534
TclWriter::writeConstructorSource
void writeConstructorSource(UMLClassifier *c)
Definition: tclwriter.cpp:465
TclWriter::writeInitAttributeHeader
void writeInitAttributeHeader(UMLClassifier *c)
Definition: tclwriter.cpp:621
TclWriter::writeConstructorDecl
void writeConstructorDecl()
TclWriter::writeDocu
void writeDocu(const QString &text)
Definition: tclwriter.cpp:391
TclWriter::writeOperationSource
void writeOperationSource(UMLClassifier *c, Uml::Visibility::Enum permitScope)
Definition: tclwriter.cpp:750
TclWriter::mNamespace
QString mNamespace
namespace information
Definition: tclwriter.h:93
TclWriter::writeDestructorHeader
void writeDestructorHeader()
Definition: tclwriter.cpp:478
TclWriter::writeSourceFile
void writeSourceFile(UMLClassifier *c, QFile &file)
Definition: tclwriter.cpp:331
TclWriter::mStream
QTextStream * mStream
current output stream
Definition: tclwriter.h:92
TclWriter::writeUse
void writeUse(UMLClassifier *c)
Definition: tclwriter.cpp:435
TclWriter::writeAssociationRoleSource
void writeAssociationRoleSource(const QString &fieldClassName, const QString &roleName, const QString &multi)
Definition: tclwriter.cpp:867
TclWriter::writeHeaderFile
void writeHeaderFile(UMLClassifier *c, QFile &file)
Definition: tclwriter.cpp:162
TclWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: tclwriter.cpp:93
TclWriter::writeComm
void writeComm(const QString &text)
Definition: tclwriter.cpp:380
TclWriter::mClassGlobal
QString mClassGlobal
information about current classifier
Definition: tclwriter.h:94
TclWriter::writeConstructorHeader
void writeConstructorHeader()
Definition: tclwriter.cpp:458
TclWriter::writeOperationHeader
void writeOperationHeader(UMLClassifier *c, Uml::Visibility::Enum permitScope)
Definition: tclwriter.cpp:675
TclWriter::ObjectFieldVariables
QStringList ObjectFieldVariables
Definition: tclwriter.h:95
TclWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: tclwriter.cpp:934
TclWriter::writeCode
void writeCode(const QString &text)
Definition: tclwriter.cpp:372
TclWriter::getUMLObjectName
QString getUMLObjectName(UMLObject *obj)
Definition: tclwriter.cpp:925
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:35
UMLObject
The base class for UML objects.
Definition: umlobject.h:70
Uml::ID::Type
std::string Type
Definition: basictypes.h:371
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
umloperationlist.h