umbrello  2.39.2
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:
CppImport NativeImportBase PHPImport AdaImport CsValaImportBase IDLImport JavaImport PascalImport PythonImport SQLImport CSharpImport ValaImport

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.

◆ importFiles()

bool ClassImport::importFiles ( const QStringList &  fileNames)

Import files.

Parameters
fileNamesList of files to import.

◆ 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 PHPImport, NativeImportBase, and CppImport.

◆ 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 PHPImport, and CppImport.

◆ 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

◆ 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

◆ 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 PHPImport, NativeImportBase, JavaImport, CsValaImportBase, CppImport, and IDLImport.

◆ 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: