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

#include <classimport.h>

Inheritance diagram for ClassImport:
Collaboration diagram for ClassImport:

Public Member Functions

 ClassImport (CodeImpThread *thread=0)
 
virtual ~ClassImport ()
 
bool importFiles (const QStringList &fileNames)
 
bool importFile (const QString &fileName)
 
void setRootPath (const QString &path)
 
bool enabled () const
 

Static Public Member Functions

static ClassImportcreateImporterByFileExt (const QString &fileName, CodeImpThread *thread=0)
 

Protected Member Functions

virtual void initialize ()=0
 
virtual void initPerFile ()
 
virtual bool parseFile (const QString &fileName)=0
 
void log (const QString &file, const QString &text)
 
void log (const QString &text)
 

Protected Attributes

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...
 

Detailed Description

Interfaces classparser library to uml models Abstract base for programming language specific import classes

Author
Mikko Pasanen
Oliver Kellogg 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

◆ ClassImport()

ClassImport::ClassImport ( CodeImpThread thread = 0)

◆ ~ClassImport()

ClassImport::~ClassImport ( )
virtual

Member Function Documentation

◆ createImporterByFileExt()

ClassImport * ClassImport::createImporterByFileExt ( const QString &  fileName,
CodeImpThread thread = 0 
)
static

Factory method for creating a ClassImport concretization by file extension

Parameters
fileNamename of imported file
threadpointer to CodeImpThread within which the importer runs
Returns
the class import object

◆ enabled()

bool ClassImport::enabled ( ) const
inline

Return state of the importer. It may be disabled because of missing dependencies for example.

Returns
false - disabled, true - enabled

◆ importFile()

bool ClassImport::importFile ( const QString &  fileName)

Import a single file.

Parameters
fileNameThe file to import.
Here is the call graph for this function:

◆ importFiles()

bool ClassImport::importFiles ( const QStringList &  fileNames)

Import files.

Parameters
fileNamesList of files to import.
Here is the call graph for this function:

◆ initialize()

virtual void ClassImport::initialize ( )
protectedpure virtual

Initialize the importer. This is called by importFiles() once, before entering the loop for importing one or more files. To be implemented by inheriting classes.

Implemented in CppImport, NativeImportBase, and PHPImport.

◆ initPerFile()

void ClassImport::initPerFile ( )
protectedvirtual

Do initializations before importing a single file. This is called by importFile() before calling parseFile().

Todo:
check if the default implementation should do anything

Reimplemented in CppImport, and PHPImport.

◆ log() [1/2]

void ClassImport::log ( const QString &  file,
const QString &  text 
)
protected

Write info to a logger or to the debug output.

Parameters
filethe name of the parsed file
textthe text to write
Here is the call graph for this function:

◆ log() [2/2]

void ClassImport::log ( const QString &  text)
protected

Write info to a logger or to the debug output.

Parameters
textthe text to write
Here is the call graph for this function:

◆ parseFile()

virtual bool ClassImport::parseFile ( const QString &  fileName)
protectedpure virtual

Import a single file. To be implemented by inheriting classes.

Parameters
fileNameThe file to import.

Implemented in IDLImport, CppImport, CsValaImportBase, JavaImport, NativeImportBase, and PHPImport.

◆ setRootPath()

void ClassImport::setRootPath ( const QString &  path)

Member Data Documentation

◆ m_enabled

bool ClassImport::m_enabled
protected

state of importer

◆ m_rootPath

QString ClassImport::m_rootPath
protected

root path of import

◆ m_thread

CodeImpThread* ClassImport::m_thread
protected

thread in which the work of importing is done


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