umbrello: ClassImport Class Reference

umbrello 2.38.1 Umbrello UML Modeller is a Unified Modelling Language (UML) diagram program based on KDE Technology

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

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:

## 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 ClassImport * | createImporterByFileExt (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
CodeImpThread * | m_thread
| thread in which the work of importing is done
bool | m_enabled
| state of importer
QString | m_rootPath
| root path of import

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

  fileName | name of imported file
  thread | pointer 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

  fileName | The file to import.

## ◆ importFiles()

bool ClassImport::importFiles | ( | const QStringList & | fileNames | ) |

Import files.

Parameters

  fileNames | List 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 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

  file | the name of the parsed file
  text | the text to write

## ◆ log() [2/2]

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

Write info to a logger or to the debug output.

Parameters

  text | the text to write

## ◆ parseFile()

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

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

Parameters

  fileName | The 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:

- umbrello/codeimport/classimport.h
- umbrello/codeimport/classimport.cpp