umbrello API Documentation

PythonImport Class Reference

Python code import. More...

#include <pythonimport.h>

Inheritance diagram for PythonImport:

NativeImportBase ClassImport List of all members.

Protected Member Functions

void initVars ()
 Reimplement operation from NativeImportBase.
bool parseStmt ()
 Implement abstract operation from NativeImportBase.
void fillSource (const QString &line)
 Implement abstract operation from NativeImportBase.
bool preprocess (QString &line)
 Reimplement operation from NativeImportBase.
void skipBody ()
 Skip ahead to outermost closing brace.

Protected Attributes

int m_srcIndent [100]
 Buffer for number of indentation characters (whitespace, i.e.
int m_srcIndentIndex
 Index for m_srcIndent[].
bool m_braceWasOpened
 Auxiliary flag denoting the opening of a block.

Detailed Description

Python code import.

Author:
Oliver Kellogg Bugs and comments to uml-devel@lists.sf.net or http://bugs.kde.org

Definition at line 22 of file pythonimport.h.


Member Function Documentation

void PythonImport::initVars  )  [protected, virtual]
 

Reimplement operation from NativeImportBase.

Reimplemented from NativeImportBase.

Definition at line 38 of file pythonimport.cpp.

References m_braceWasOpened, m_srcIndent, and m_srcIndentIndex.

bool PythonImport::parseStmt  )  [protected, virtual]
 

Implement abstract operation from NativeImportBase.

Implements NativeImportBase.

Definition at line 132 of file pythonimport.cpp.

References Import_Utils::addMethodParameter(), NativeImportBase::advance(), Import_Utils::createGeneralization(), Import_Utils::createUMLObject(), Import_Utils::insertMethod(), Import_Utils::makeOperation(), skipBody(), and NativeImportBase::skipStmt().

void PythonImport::fillSource const QString &  line  )  [protected, virtual]
 

Implement abstract operation from NativeImportBase.

Implements NativeImportBase.

Definition at line 93 of file pythonimport.cpp.

bool PythonImport::preprocess QString &  line  )  [protected, virtual]
 

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.

Reimplemented from NativeImportBase.

Definition at line 44 of file pythonimport.cpp.

References m_braceWasOpened, m_srcIndent, and m_srcIndentIndex.

void PythonImport::skipBody  )  [protected]
 

Skip ahead to outermost closing brace.

Definition at line 116 of file pythonimport.cpp.

References NativeImportBase::advance(), and NativeImportBase::skipStmt().

Referenced by parseStmt().


Member Data Documentation

int PythonImport::m_srcIndent[100] [protected]
 

Buffer for number of indentation characters (whitespace, i.e.

tabs or spaces) at beginning of input line.

Definition at line 62 of file pythonimport.h.

Referenced by initVars(), and preprocess().

int PythonImport::m_srcIndentIndex [protected]
 

Index for m_srcIndent[].

Index 0 is reserved and contains 0.

Definition at line 67 of file pythonimport.h.

Referenced by initVars(), and preprocess().

bool PythonImport::m_braceWasOpened [protected]
 

Auxiliary flag denoting the opening of a block.

Definition at line 72 of file pythonimport.h.

Referenced by initVars(), and preprocess().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for umbrello Version 3.1.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Tue Jun 26 08:08:05 2007 by doxygen 1.4.1 written by Dimitri van Heesch, © 1997-2003