umbrello 2.39.0
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
|
#include <pythonwriter.h>
Private Member Functions | |
void | writeAttributes (UMLAttributeList atList, QTextStream &py) |
void | writeOperations (UMLClassifier *c, QTextStream &h) |
void | writeOperations (const QString &classname, UMLOperationList &opList, QTextStream &h, Uml::Visibility::Enum access) |
QString | findIncludeFromType (const QString &string) |
Static Private Member Functions | |
static bool | hasContainer (const QString &string) |
static QString | fixTypeName (const QString &string) |
Private Attributes | |
bool | m_bNeedPass |
True as long as no "pass" has been written. | |
Class PythonWriter is a python code generator for UMLClassifier objects Just call writeClass and feed it a UMLClassifier.
NOTE: There is a unit test available for this class. Please, use and adapt it when necessary.
PythonWriter::PythonWriter | ( | ) |
|
virtual |
|
virtual |
Reimplementation of method from class CodeGenerator
Reimplemented from CodeGenerator.
Fix types to be compatible with Python
string | type as defined in model |
Check if type is a container
string | type that will be used |
|
virtual |
Return the programming language identifier.
Implements CodeGenerator.
|
virtual |
Get list of reserved keywords.
Reimplemented from CodeGenerator.
|
private |
Write all attributes for a given class.
atList | the attribute list we are generating code for |
py | output stream for the header file |
|
virtual |
Call this method to generate C++ code for a UMLClassifier.
c | the class you want to generate code for |
Implements SimpleCodeGenerator.
|
private |
Write a list of class operations.
classname | the name of the class |
opList | the list of operations |
h | output stream for the header file |
access | visibility identifier |
|
private |
Write all operations for a given class.
c | the classifier we are generating code for |
h | output stream for the header file |
|
private |
True as long as no "pass" has been written.