umbrello: umbrello/codegenerators/python/pythonwriter.h Source File

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

pythonwriter.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) 2002 Vincent Decorges <vincent.decorges@eivd.ch> *
8 * copyright (C) 2003-2020 *
9 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
10 ***************************************************************************/
11
12 #ifndef PYTHONWRITER_H
13 #define PYTHONWRITER_H
14
15 #include "simplecodegenerator.h"
16 #include "umlattributelist.h"
17 #include "umloperationlist.h"
18
26 class PythonWriter : public SimpleCodeGenerator
27 {
28 Q_OBJECT
29 public:
30
31 PythonWriter();
32 virtual ~PythonWriter();
33
34 virtual void writeClass(UMLClassifier *c);
35
36 virtual Uml::ProgrammingLanguage::Enum language() const;
37
38 virtual QStringList reservedKeywords() const;
39
40 QStringList defaultDatatypes();
41
42 private:
43
44 void writeAttributes(UMLAttributeList atList, QTextStream &py);
45
46 void writeOperations(UMLClassifier *c, QTextStream &h);
47 void writeOperations(const QString& classname, UMLOperationList &opList,
48 QTextStream &h, Uml::Visibility::Enum access);
49
50 static bool hasContainer(const QString &string);
51
52 bool m_bNeedPass;
53 };
54
55 #endif //PYTHONWRITER
PythonWriter
Definition: pythonwriter.h:27
PythonWriter::language
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: pythonwriter.cpp:463
PythonWriter::writeAttributes
void writeAttributes(UMLAttributeList atList, QTextStream &py)
Definition: pythonwriter.cpp:312
PythonWriter::m_bNeedPass
bool m_bNeedPass
True as long as no "pass" has been written.
Definition: pythonwriter.h:52
PythonWriter::writeOperations
void writeOperations(UMLClassifier *c, QTextStream &h)
Definition: pythonwriter.cpp:334
PythonWriter::writeClass
virtual void writeClass(UMLClassifier *c)
Definition: pythonwriter.cpp:180
PythonWriter::defaultDatatypes
QStringList defaultDatatypes()
Definition: pythonwriter.cpp:471
PythonWriter::reservedKeywords
virtual QStringList reservedKeywords() const
Definition: pythonwriter.cpp:492
PythonWriter::PythonWriter
PythonWriter()
Definition: pythonwriter.cpp:168
PythonWriter::~PythonWriter
virtual ~PythonWriter()
Definition: pythonwriter.cpp:172
PythonWriter::hasContainer
static bool hasContainer(const QString &string)
Definition: pythonwriter.cpp:454
SimpleCodeGenerator
Definition: simplecodegenerator.h:34
UMLAttributeList
Definition: umlattributelist.h:27
UMLClassifier
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
Uml::ProgrammingLanguage::Enum
Enum
Definition: basictypes.h:305
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
simplecodegenerator.h
umlattributelist.h
umloperationlist.h
UMLOperationList
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18