umbrello: umbrello/codeimport/pythonimport.h Source File

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

pythonimport.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) 2006-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef PYTHONIMPORT_H
12 #define PYTHONIMPORT_H
13
14 #include "nativeimportbase.h"
15
16 class UMLOperation;
17
23 class PythonImport : public NativeImportBase
24 {
25 public:
26 explicit PythonImport(CodeImpThread* thread = 0);
27 virtual ~PythonImport();
28
29 protected:
30 void initVars();
31
32 bool parseInitializer(const QString &keyword, QString &type, QString &value);
33 bool parseAssignmentStmt(const QString &keyword);
34
35 bool parseMethodParameters(UMLOperation *op);
36 bool parseStmt();
37
38 void fillSource(const QString& line);
39
40 bool preprocess(QString& line);
41
42 QString indentation(int level);
43
44 QString skipBody();
45
50 int m_srcIndent[100];
51
55 int m_srcIndentIndex;
56
57 bool m_braceWasOpened;
58 bool m_isStatic;
59 };
60
61 #endif
62
NativeImportBase::scopeIndex
int scopeIndex()
Definition: nativeimportbase.cpp:176
pythonimport.h
UMLObject::asUMLClassifier
UMLClassifier * asUMLClassifier()
Definition: umlobject.cpp:1308
PythonImport::skipBody
QString skipBody()
Definition: pythonimport.cpp:169
Import_Utils::insertAttribute
UMLAttribute * insertAttribute(UMLClassifier *owner, Uml::Visibility::Enum scope, const QString &name, UMLClassifier *attrType, const QString &comment, bool isStatic)
Definition: import_utils.cpp:426
umlpackagelist.h
ClassImport::log
void log(const QString &file, const QString &text)
Definition: classimport.cpp:133
PythonImport::PythonImport
PythonImport(CodeImpThread *thread=0)
Definition: pythonimport.cpp:33
UMLObject::asUMLAttribute
UMLAttribute * asUMLAttribute()
Definition: umlobject.cpp:1304
NativeImportBase::preprocess
virtual bool preprocess(QString &line)
Definition: nativeimportbase.cpp:226
UMLObject::ot_Class
@ ot_Class
Definition: umlobject.h:89
operation.h
Import_Utils::createGeneralization
UMLAssociation * createGeneralization(UMLClassifier *child, UMLClassifier *parent)
Definition: import_utils.cpp:603
PythonImport::m_isStatic
bool m_isStatic
Flag denoting staticness of defined method.
Definition: pythonimport.h:58
Import_Utils::createUMLObject
UMLObject * createUMLObject(UMLObject::ObjectType type, const QString &inName, UMLPackage *parentPkg, const QString &comment, const QString &stereotype, bool searchInParentPackageOnly, bool remapParent)
Definition: import_utils.cpp:178
PythonImport::~PythonImport
virtual ~PythonImport()
Definition: pythonimport.cpp:43
NativeImportBase::m_klass
UMLClassifier * m_klass
class currently being processed
Definition: nativeimportbase.h:98
Import_Utils::insertMethod
void insertMethod(UMLClassifier *klass, UMLOperation *&op, Uml::Visibility::Enum scope, const QString &type, bool isStatic, bool isAbstract, bool isFriend, bool isConstructor, bool isDestructor, const QString &comment)
Definition: import_utils.cpp:498
PythonImport::preprocess
bool preprocess(QString &line)
Definition: pythonimport.cpp:68
PythonImport::m_braceWasOpened
bool m_braceWasOpened
Flag denoting the opening of a block.
Definition: pythonimport.h:57
PythonImport::m_srcIndent
int m_srcIndent[100]
Definition: pythonimport.h:50
UMLObject
The base class for UML objects.
Definition: umlobject.h:74
NativeImportBase::setMultiLineComment
void setMultiLineComment(const QString &intro, const QString &end)
Definition: nativeimportbase.cpp:59
import_utils.h
NativeImportBase::currentScope
UMLPackage * currentScope()
Definition: nativeimportbase.cpp:165
UMLClassifierListItem::setTypeName
void setTypeName(const QString &type)
Definition: classifierlistitem.cpp:141
NativeImportBase::skipStmt
void skipStmt(const QString &until=QLatin1String(";"))
Definition: nativeimportbase.cpp:82
UMLObject::hasDoc
bool hasDoc() const
Definition: umlobject.cpp:445
Uml::Visibility::Public
@ Public
Definition: basictypes.h:60
UMLAttribute::setInitialValue
void setInitialValue(const QString &iv)
Definition: attribute.cpp:109
NativeImportBase::skipToClosing
bool skipToClosing(QChar opener)
Definition: nativeimportbase.cpp:97
PythonImport::initVars
void initVars()
Definition: pythonimport.cpp:50
UMLOperation::setSourceCode
void setSourceCode(const QString &code)
Definition: operation.cpp:499
attribute.h
NativeImportBase::popScope
UMLPackage * popScope()
Definition: nativeimportbase.cpp:153
PythonImport::m_srcIndentIndex
int m_srcIndentIndex
Definition: pythonimport.h:55
a
QString a
Definition: petalnode.cpp:18
NativeImportBase::m_source
QStringList m_source
the scanned lexemes
Definition: nativeimportbase.h:95
PythonImport::parseStmt
bool parseStmt()
Definition: pythonimport.cpp:348
Import_Utils::addMethodParameter
UMLAttribute * addMethodParameter(UMLOperation *method, const QString &type, const QString &name)
Definition: import_utils.cpp:572
uDebug
#define uDebug()
Definition: debug_utils.h:122
PythonImport::indentation
QString indentation(int level)
Definition: pythonimport.cpp:156
NativeImportBase::advance
virtual QString advance()
Definition: nativeimportbase.cpp:198
PythonImport::parseAssignmentStmt
bool parseAssignmentStmt(const QString &keyword)
Definition: pythonimport.cpp:277
NativeImportBase::m_comment
QString m_comment
intermediate accumulator for comment text
Definition: nativeimportbase.h:100
CodeImpThread
Definition: codeimpthread.h:36
visibility
Definition: visibility.py:1
Import_Utils::makeOperation
UMLOperation * makeOperation(UMLClassifier *parent, const QString &name)
Definition: import_utils.cpp:416
UMLAttribute
Sets up attribute information.
Definition: attribute.h:28
NativeImportBase
Base class for native implementations of language import.
Definition: nativeimportbase.h:45
nativeimportbase.h
PythonImport
Definition: pythonimport.h:24
Uml::Visibility::Enum
Enum
Definition: basictypes.h:59
UMLObject::setDoc
void setDoc(const QString &d)
Definition: umlobject.cpp:455
classifier.h
uError
#define uError()
Definition: debug_utils.h:123
UMLOperation
Definition: operation.h:25
uml.h
PythonImport::parseMethodParameters
bool parseMethodParameters(UMLOperation *op)
Definition: pythonimport.cpp:316
debug_utils.h
NativeImportBase::pushScope
void pushScope(UMLPackage *p)
Definition: nativeimportbase.cpp:143
NativeImportBase::lookAhead
QString lookAhead()
Definition: nativeimportbase.cpp:185
NativeImportBase::m_singleLineCommentIntro
QString m_singleLineCommentIntro
start token of a single line comment
Definition: nativeimportbase.h:94
Uml::Visibility::Private
@ Private
Definition: basictypes.h:61
NativeImportBase::m_srcIndex
int m_srcIndex
used for indexing m_source
Definition: nativeimportbase.h:96
package.h
Uml::Visibility::Protected
@ Protected
Definition: basictypes.h:62
PythonImport::fillSource
void fillSource(const QString &line)
Definition: pythonimport.cpp:128
codeimpthread.h
umldoc.h
PythonImport::parseInitializer
bool parseInitializer(const QString &keyword, QString &type, QString &value)
Definition: pythonimport.cpp:217
enum.h