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

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

tclwriter.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) 2005 Rene Meyer <rene.meyer@sturmit.de> *
8 * copyright (C) 2006-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef TCLWRITER_H
13 #define TCLWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umloperationlist.h"
17 #include "umlattributelist.h"
18 #include "umlassociationlist.h"
19
20 #include <QStringList>
21
22 class QFile;
23 class QTextStream;
24
31 class TclWriter : public SimpleCodeGenerator
32 {
33 public:
34
35 TclWriter();
36 virtual ~TclWriter();
37
38 virtual void writeClass(UMLClassifier * c);
39
40 virtual Uml::ProgrammingLanguage::Enum language() const;
41
42 virtual QStringList reservedKeywords() const;
43
44 private:
45
46 void writeHeaderFile(UMLClassifier * c, QFile & file);
47 void writeSourceFile(UMLClassifier * c, QFile & file);
48
49 void writeCode(const QString &text);
50 void writeComm(const QString &text);
51 void writeDocu(const QString &text);
52
53 void writeConstructorDecl();
54 void writeDestructorDecl();
55
56 void writeAttributeDecl(UMLClassifier * c, Uml::Visibility::Enum visibility, bool writeStatic);
57
58 void writeAssociationIncl(UMLAssociationList list,
59 Uml::ID::Type myId, const QString &type);
60 void writeAssociationDecl(UMLAssociationList associations,
61 Uml::Visibility::Enum permit, Uml::ID::Type id,
62 const QString &type);
63
64 void writeAssociationRoleDecl(const QString &fieldClassName,
65 const QString &roleName, const QString &multi,
66 const QString &doc, const QString &docname);
67
68 void writeInitAttributeHeader(UMLClassifier * c);
69 void writeInitAttributeSource(UMLClassifier* c);
70
71 void writeConstructorHeader();
72 void writeConstructorSource(UMLClassifier * c);
73
74 void writeDestructorHeader();
75 void writeDestructorSource();
76
77 void writeOperationHeader(UMLClassifier * c,
78 Uml::Visibility::Enum permitScope);
79 void writeOperationSource(UMLClassifier * c,
80 Uml::Visibility::Enum permitScope);
81
82 void writeAttributeSource(UMLClassifier * c);
83
84 void writeAssociationSource(UMLAssociationList associations,
85 Uml::ID::Type id);
86 void writeAssociationRoleSource(const QString &fieldClassName,
87 const QString &roleName,
88 const QString &multi);
89
90 void writeUse(UMLClassifier * c);
91
92 QString getUMLObjectName(UMLObject * obj);
93
94 QString fixTypeName(const QString &string);
95
96 QTextStream* mStream;
97 QString mNamespace;
98 QString mClassGlobal;
99 QStringList ObjectFieldVariables;
100 QStringList VectorFieldVariables;
101
102 };
103
104 #endif // TCLWRITER_H
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
TclWriter
Definition: tclwriter.h:32
TclWriter::~TclWriter
virtual ~TclWriter()
Definition: tclwriter.cpp:88
TclWriter::fixTypeName
QString fixTypeName(const QString &string)
Definition: tclwriter.cpp:917
TclWriter::writeAssociationIncl
void writeAssociationIncl(UMLAssociationList list, Uml::ID::Type myId, const QString &type)
Definition: tclwriter.cpp:406
TclWriter::VectorFieldVariables
QStringList VectorFieldVariables
Definition: tclwriter.h:100
TclWriter::writeAttributeSource
void writeAttributeSource(UMLClassifier *c)
Definition: tclwriter.cpp:819
TclWriter::writeAttributeDecl
void writeAttributeDecl(UMLClassifier *c, Uml::Visibility::Enum visibility, bool writeStatic)
Definition: tclwriter.cpp:499
TclWriter::writeAssociationSource
void writeAssociationSource(UMLAssociationList associations, Uml::ID::Type id)
Definition: tclwriter.cpp:831
TclWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: tclwriter.cpp:105
TclWriter::writeDestructorSource
void writeDestructorSource()
Definition: tclwriter.cpp:487
TclWriter::writeAssociationRoleDecl
void writeAssociationRoleDecl(const QString &fieldClassName, const QString &roleName, const QString &multi, const QString &doc, const QString &docname)
Definition: tclwriter.cpp:582
TclWriter::writeDestructorDecl
void writeDestructorDecl()
TclWriter::TclWriter
TclWriter()
Definition: tclwriter.cpp:80
TclWriter::writeInitAttributeSource
void writeInitAttributeSource(UMLClassifier *c)
Definition: tclwriter.cpp:636
TclWriter::writeAssociationDecl
void writeAssociationDecl(UMLAssociationList associations, Uml::Visibility::Enum permit, Uml::ID::Type id, const QString &type)
Definition: tclwriter.cpp:537
TclWriter::writeConstructorSource
void writeConstructorSource(UMLClassifier *c)
Definition: tclwriter.cpp:468
TclWriter::writeInitAttributeHeader
void writeInitAttributeHeader(UMLClassifier *c)
Definition: tclwriter.cpp:624
TclWriter::writeConstructorDecl
void writeConstructorDecl()
TclWriter::writeDocu
void writeDocu(const QString &text)
Definition: tclwriter.cpp:394
TclWriter::writeOperationSource
void writeOperationSource(UMLClassifier *c, Uml::Visibility::Enum permitScope)
Definition: tclwriter.cpp:753
TclWriter::mNamespace
QString mNamespace
namespace information
Definition: tclwriter.h:97
TclWriter::writeDestructorHeader
void writeDestructorHeader()
Definition: tclwriter.cpp:481
TclWriter::writeSourceFile
void writeSourceFile(UMLClassifier *c, QFile &file)
Definition: tclwriter.cpp:334
TclWriter::mStream
QTextStream * mStream
current output stream
Definition: tclwriter.h:96
TclWriter::writeUse
void writeUse(UMLClassifier *c)
Definition: tclwriter.cpp:438
TclWriter::writeAssociationRoleSource
void writeAssociationRoleSource(const QString &fieldClassName, const QString &roleName, const QString &multi)
Definition: tclwriter.cpp:870
TclWriter::writeHeaderFile
void writeHeaderFile(UMLClassifier *c, QFile &file)
Definition: tclwriter.cpp:165
TclWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: tclwriter.cpp:96
TclWriter::writeComm
void writeComm(const QString &text)
Definition: tclwriter.cpp:383
TclWriter::mClassGlobal
QString mClassGlobal
information about current classifier
Definition: tclwriter.h:98
TclWriter::writeConstructorHeader
void writeConstructorHeader()
Definition: tclwriter.cpp:461
TclWriter::writeOperationHeader
void writeOperationHeader(UMLClassifier *c, Uml::Visibility::Enum permitScope)
Definition: tclwriter.cpp:678
TclWriter::ObjectFieldVariables
QStringList ObjectFieldVariables
Definition: tclwriter.h:99
TclWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: tclwriter.cpp:937
TclWriter::writeCode
void writeCode(const QString &text)
Definition: tclwriter.cpp:375
TclWriter::getUMLObjectName
QString getUMLObjectName(UMLObject *obj)
Definition: tclwriter.cpp:928
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
UMLObject
The base class for UML objects.
Definition: umlobject.h:75
Uml::ID::Type
std::string Type
Definition: basictypes.h:385
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
umloperationlist.h