umbrello  2.31.90
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 
27 {
28  Q_OBJECT
29 public:
30 
31  PythonWriter();
32  virtual ~PythonWriter();
33 
34  virtual void writeClass(UMLClassifier *c);
35 
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
Definition: pythonwriter.h:27
virtual Uml::ProgrammingLanguage::Enum language() const
Definition: pythonwriter.cpp:463
void writeAttributes(UMLAttributeList atList, QTextStream &py)
Definition: pythonwriter.cpp:312
bool m_bNeedPass
True as long as no "pass" has been written.
Definition: pythonwriter.h:52
void writeOperations(UMLClassifier *c, QTextStream &h)
Definition: pythonwriter.cpp:334
virtual void writeClass(UMLClassifier *c)
Definition: pythonwriter.cpp:180
QStringList defaultDatatypes()
Definition: pythonwriter.cpp:471
virtual QStringList reservedKeywords() const
Definition: pythonwriter.cpp:492
PythonWriter()
Definition: pythonwriter.cpp:168
virtual ~PythonWriter()
Definition: pythonwriter.cpp:172
static bool hasContainer(const QString &string)
Definition: pythonwriter.cpp:454
Definition: simplecodegenerator.h:34
Definition: umlattributelist.h:27
Information for a non-graphical Concept/Class.
Definition: classifier.h:40
Enum
Definition: basictypes.h:305
Enum
Definition: basictypes.h:59
QList< UMLOperation * > UMLOperationList
Definition: umloperationlist.h:18