#include <pythonimport.h>
◆ PythonImport()
◆ ~PythonImport()
PythonImport::~PythonImport |
( |
| ) |
|
|
virtual |
◆ fillSource()
void PythonImport::fillSource |
( |
const QString & |
word | ) |
|
|
protectedvirtual |
◆ indentation()
QString PythonImport::indentation |
( |
int |
level | ) |
|
|
protected |
Return an amount of spaces that corresponds to
- Parameters
-
- Returns
- spaces of indentation
◆ initVars()
void PythonImport::initVars |
( |
| ) |
|
|
protectedvirtual |
◆ parseAssignmentStmt()
bool PythonImport::parseAssignmentStmt |
( |
const QString & |
keyword | ) |
|
|
protected |
Parse assignments in the form <identifier> '=' <value> Instance variables are identified by a prefixed 'self.'.
- Parameters
-
keyword | current string from parser |
- Returns
- success status of parsing
◆ parseInitializer()
bool PythonImport::parseInitializer |
( |
const QString & |
_keyword, |
|
|
QString & |
type, |
|
|
QString & |
value |
|
) |
| |
|
protected |
Parses a python initializer
- Parameters
-
_keyword | current string from parser |
type | returns type of assignment |
value | returns assignment value |
- Returns
- success status of parsing
◆ parseMethodParameters()
bool PythonImport::parseMethodParameters |
( |
UMLOperation * |
op | ) |
|
|
protected |
Parses method parameter list
- Parameters
-
- Returns
- success status of parsing
◆ parseStmt()
bool PythonImport::parseStmt |
( |
| ) |
|
|
protectedvirtual |
◆ preprocess()
bool PythonImport::preprocess |
( |
QString & |
line | ) |
|
|
protectedvirtual |
Reimplement operation from NativeImportBase. In addition to handling multiline comments, this method transforms changes in leading indentation into braces (opening brace for increase in indentation, closing brace for decrease in indentation) in m_source. Removal of Python's indentation sensitivity simplifies subsequent processing using Umbrello's native import framework.
- Parameters
-
line | the line to preprocess |
- Returns
- success status of operation
Reimplemented from NativeImportBase.
◆ skipBody()
Skip ahead to outermost closing brace.
- Parameters
-
foundReturn | Optional pointer to Uml::PrimitiveTypes::Enum. If given then the variable pointed to will be set if a 'return' statement is encountered while skipping:
- If after 'return' there is a value True or False then *foundReturn is set to Boolean;
- elsif after 'return' there is a number without decimal point then *foundReturn is set to Integer;
- elsif after 'return' there is a number with decimal point then *foundReturn is set to Real;
- else *foundReturn is set to String. If no 'return' statement was encountered then *foundReturn is set to Reserved.
|
- Returns
- body contents skipped
◆ m_braceWasOpened
bool PythonImport::m_braceWasOpened |
|
protected |
Flag denoting the opening of a block.
◆ m_isStatic
bool PythonImport::m_isStatic |
|
protected |
Flag denoting staticness of defined method.
◆ m_srcIndent
int PythonImport::m_srcIndent[100] |
|
protected |
Buffer for number of indentation characters (whitespace, i.e. tabs or spaces) at beginning of input line.
◆ m_srcIndentIndex
int PythonImport::m_srcIndentIndex |
|
protected |
Index for m_srcIndent[]. Index 0 is reserved and contains 0.
The documentation for this class was generated from the following files: