umbrello 2.34.70-5524f40e1
Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology
Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | Private Member Functions | Static Private Member Functions | List of all members
CsValaImportBase Class Reference

#include <csvalaimportbase.h>

Inheritance diagram for CsValaImportBase:
Collaboration diagram for CsValaImportBase:

Public Member Functions

 CsValaImportBase (CodeImpThread *thread=0)
 
virtual ~CsValaImportBase ()
 
virtual QString fileExtension ()
 
- Public Member Functions inherited from NativeImportBase
 NativeImportBase (const QString &singleLineCommentIntro, CodeImpThread *thread=0)
 
virtual ~NativeImportBase ()
 
- Public Member Functions inherited from ClassImport
 ClassImport (CodeImpThread *thread=0)
 
virtual ~ClassImport ()
 
bool importFiles (const QStringList &fileNames)
 
bool importFile (const QString &fileName)
 
void setRootPath (const QString &path)
 
bool enabled () const
 

Protected Member Functions

void initVars ()
 
bool parseStmt ()
 
void fillSource (const QString &word)
 
bool preprocess (QString &line)
 
bool parseFile (const QString &filename)
 
UMLObjectresolveClass (const QString &className)
 
void spawnImport (const QString &file)
 
QString joinTypename (const QString &typeName)
 
- Protected Member Functions inherited from NativeImportBase
void initialize ()
 
void setMultiLineComment (const QString &intro, const QString &end)
 
void setMultiLineAltComment (const QString &intro, const QString &end)
 
void scan (const QString &line)
 
virtual QStringList split (const QString &line)
 
void skipStmt (const QString &until=QLatin1String(";"))
 
bool skipToClosing (QChar opener)
 
QString current ()
 
QString lookAhead ()
 
virtual QString advance ()
 
void pushScope (UMLPackage *p)
 
UMLPackagepopScope ()
 
UMLPackagecurrentScope ()
 
int scopeIndex ()
 
- Protected Member Functions inherited from ClassImport
virtual void initPerFile ()
 
void log (const QString &file, const QString &text)
 
void log (const QString &text)
 

Protected Attributes

bool m_isStatic
 static flag for the member var or method More...
 
QString m_currentFileName
 current filename being parsed More...
 
QString m_currentPackage
 current package of the file being parsed More...
 
QStringList m_imports
 imports included in the current file More...
 
Uml::Visibility::Enum m_defaultCurrentAccess
 current visibility for when the visibility is absent More...
 
Uml::ProgrammingLanguage::Enum m_language
 
- Protected Attributes inherited from NativeImportBase
QString m_singleLineCommentIntro
 start token of a single line comment More...
 
QStringList m_source
 the scanned lexemes More...
 
int m_srcIndex
 used for indexing m_source More...
 
QList< UMLPackage * > m_scope
 stack of scopes for use by the specific importer More...
 
UMLClassifierm_klass
 class currently being processed More...
 
Uml::Visibility::Enum m_currentAccess
 current access (public/protected/private) More...
 
QString m_comment
 intermediate accumulator for comment text More...
 
bool m_inComment
 
bool m_isAbstract
 accumulator for abstractness More...
 
QString m_multiLineCommentIntro
 multi line comment delimiter intro More...
 
QString m_multiLineCommentEnd
 multi line comment delimiter end More...
 
QString m_multiLineAltCommentIntro
 
QString m_multiLineAltCommentEnd
 
- Protected Attributes inherited from ClassImport
CodeImpThreadm_thread
 thread in which the work of importing is done More...
 
bool m_enabled
 state of importer More...
 
QString m_rootPath
 root path of import More...
 

Static Protected Attributes

static QStringList s_filesAlreadyParsed
 
static int s_parseDepth = 0
 
- Static Protected Attributes inherited from NativeImportBase
static QStringList m_parsedFiles
 

Private Member Functions

bool parseUsingDirectives ()
 
bool parseGlobalAttributes ()
 
bool parseNamespaceMemberDeclarations ()
 
bool parseAttributes ()
 
bool parseClassDeclaration (const QString &keyword)
 
bool parseStructDeclaration ()
 
bool parseEnumDeclaration ()
 
bool parseDelegateDeclaration ()
 
bool isTypeDeclaration (const QString &keyword)
 
bool isClassModifier (const QString &keyword)
 
bool isCommonModifier (const QString &keyword)
 

Static Private Member Functions

static UMLObjectfindObject (const QString &name, UMLPackage *parentPkg)
 

Additional Inherited Members

- Static Public Member Functions inherited from ClassImport
static ClassImportcreateImporterByFileExt (const QString &fileName, CodeImpThread *thread=0)
 

Detailed Description

Base class for C# and Vala code import.

Author
Andi Fischer (copied from JavaImport) Bugs and comments to umbre.nosp@m.llo-.nosp@m.devel.nosp@m.@kde.nosp@m..org or https://bugs.kde.org

Constructor & Destructor Documentation

◆ CsValaImportBase()

CsValaImportBase::CsValaImportBase ( CodeImpThread thread = 0)
explicit

Constructor.

Here is the call graph for this function:

◆ ~CsValaImportBase()

CsValaImportBase::~CsValaImportBase ( )
virtual

Destructor.

Member Function Documentation

◆ fileExtension()

QString CsValaImportBase::fileExtension ( )
virtual

Reimplemented in CSharpImport, and ValaImport.

◆ fillSource()

void CsValaImportBase::fillSource ( const QString &  word)
protectedvirtual

Implement abstract operation from NativeImportBase.

Parameters
wordwhitespace delimited item

Implements NativeImportBase.

◆ findObject()

UMLObject * CsValaImportBase::findObject ( const QString &  name,
UMLPackage parentPkg 
)
staticprivate

Returns the UML Object if found, or null otherwise.

Parameters
namename of the uml object
parentPkgparent package
Returns
null or the uml objecct
Here is the call graph for this function:

◆ initVars()

void CsValaImportBase::initVars ( )
protectedvirtual

Reimplement operation from NativeImportBase.

Reimplemented from NativeImportBase.

◆ isClassModifier()

bool CsValaImportBase::isClassModifier ( const QString &  keyword)
private

Check if keyword is a class-modifier.

Returns
result of check
Here is the call graph for this function:

◆ isCommonModifier()

bool CsValaImportBase::isCommonModifier ( const QString &  keyword)
private

Check if keyword is an interface, struct, enum or delegate modifier.

Returns
result of check

◆ isTypeDeclaration()

bool CsValaImportBase::isTypeDeclaration ( const QString &  keyword)
private

Check if keyword is belonging to a type-declaration.

Returns
result of check

◆ joinTypename()

QString CsValaImportBase::joinTypename ( const QString &  typeName)
protected

Figure out if the type is really an array or template of the given typeName. Catenate possible template arguments/array dimensions to the end of the type name.

Parameters
typeNamethe type name
Returns
the type name with the additional information
Here is the call graph for this function:

◆ parseAttributes()

bool CsValaImportBase::parseAttributes ( )
private

Parsing attributes.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseClassDeclaration()

bool CsValaImportBase::parseClassDeclaration ( const QString &  keyword)
private

Parsing the statement 'class' or 'interface'.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseDelegateDeclaration()

bool CsValaImportBase::parseDelegateDeclaration ( )
private

Parsing a delegate-declaration.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseEnumDeclaration()

bool CsValaImportBase::parseEnumDeclaration ( )
private

Parsing the statement 'enum'.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseFile()

bool CsValaImportBase::parseFile ( const QString &  filename)
protectedvirtual

Keep track of the current file being parsed and reset the list of imports.

Parameters
filenamethe name of the file being parsed

Reimplemented from NativeImportBase.

Here is the call graph for this function:

◆ parseGlobalAttributes()

bool CsValaImportBase::parseGlobalAttributes ( )
private

Parsing global attributes.

Returns
success status of parsing

◆ parseNamespaceMemberDeclarations()

bool CsValaImportBase::parseNamespaceMemberDeclarations ( )
private

Parsing the statement 'namespace'.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseStmt()

bool CsValaImportBase::parseStmt ( )
protectedvirtual

Implement abstract operation from NativeImportBase. compilation-unit: using-directives? global-attributes? namespace-member-declarations?

Returns
success status of operation

Implements NativeImportBase.

Here is the call graph for this function:

◆ parseStructDeclaration()

bool CsValaImportBase::parseStructDeclaration ( )
private

Parsing a struct-declaration.

Returns
success status of parsing
Here is the call graph for this function:

◆ parseUsingDirectives()

bool CsValaImportBase::parseUsingDirectives ( )
private

Parsing the statement 'using'. Keep track of imports so we can resolve classes we are dependent on.

Returns
success status of parsing
Here is the call graph for this function:

◆ preprocess()

bool CsValaImportBase::preprocess ( QString &  line)
protectedvirtual

Override operation from NativeImportBase.

Reimplemented from NativeImportBase.

Here is the call graph for this function:

◆ resolveClass()

UMLObject * CsValaImportBase::resolveClass ( const QString &  className)
protected

Try to resolve the specified class the current class depends on.

Parameters
classNamethe name of the class
Here is the call graph for this function:

◆ spawnImport()

void CsValaImportBase::spawnImport ( const QString &  file)
protected

Spawn off an import of the specified file.

Parameters
filethe specified file
Here is the call graph for this function:

Member Data Documentation

◆ m_currentFileName

QString CsValaImportBase::m_currentFileName
protected

current filename being parsed

◆ m_currentPackage

QString CsValaImportBase::m_currentPackage
protected

current package of the file being parsed

◆ m_defaultCurrentAccess

Uml::Visibility::Enum CsValaImportBase::m_defaultCurrentAccess
protected

current visibility for when the visibility is absent

◆ m_imports

QStringList CsValaImportBase::m_imports
protected

imports included in the current file

◆ m_isStatic

bool CsValaImportBase::m_isStatic
protected

static flag for the member var or method

◆ m_language

Uml::ProgrammingLanguage::Enum CsValaImportBase::m_language
protected

required for language specific suport

◆ s_filesAlreadyParsed

QStringList CsValaImportBase::s_filesAlreadyParsed
staticprotected

Keep track of the files we have already parsed so we don't reparse the same ones over and over again.

◆ s_parseDepth

int CsValaImportBase::s_parseDepth = 0
staticprotected

Keep track of the parses so that the filesAlreadyParsed can be reset when we're done.


The documentation for this class was generated from the following files: