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

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

- File List
- File Members

classimport.h
Go to the documentation of this file.
1/*
2 SPDX-License-Identifier: GPL-2.0-or-later
3 SPDX-FileCopyrightText: 2005-2021 Umbrello UML Modeller Authors <umbrello-devel@kde.org>
4*/
5
6#ifndef CLASSIMPORT_H
7#define CLASSIMPORT_H
8
9#include <QStringList>
10
11 class CodeImpThread;
12
20 class ClassImport
21{
22 public:
23 ClassImport(CodeImpThread *thread = nullptr);
24 virtual ~ClassImport();
25
26 bool importFiles(const QStringList& fileNames);
27 bool importFile(const QString& fileName);
28 void setRootPath(const QString &path);
29
35 bool enabled() const { return m_enabled; }
36
37 static ClassImport *createImporterByFileExt(const QString &fileName, CodeImpThread* thread = nullptr);
38
39 protected:
40
47 virtual void initialize() = 0;
48
49 virtual void initPerFile();
50
57 virtual bool parseFile(const QString& fileName) = 0;
58
59 void log(const QString& file, const QString& text);
60 void log(const QString& text);
61
62 CodeImpThread* m_thread;
63 bool m_enabled;
64 QString m_rootPath;
65};
66
67#endif
ClassImport
Definition: classimport.h:21
ClassImport::log
void log(const QString &file, const QString &text)
Definition: classimport.cpp:133
ClassImport::importFiles
bool importFiles(const QStringList &fileNames)
Definition: classimport.cpp:92
ClassImport::initialize
virtual void initialize()=0
ClassImport::~ClassImport
virtual ~ClassImport()
Definition: classimport.cpp:75
ClassImport::m_thread
CodeImpThread * m_thread
thread in which the work of importing is done
Definition: classimport.h:62
ClassImport::setRootPath
void setRootPath(const QString &path)
Definition: classimport.cpp:123
ClassImport::importFile
bool importFile(const QString &fileName)
Definition: classimport.cpp:117
ClassImport::enabled
bool enabled() const
Definition: classimport.h:35
ClassImport::m_rootPath
QString m_rootPath
root path of import
Definition: classimport.h:64
ClassImport::m_enabled
bool m_enabled
state of importer
Definition: classimport.h:63
ClassImport::initPerFile
virtual void initPerFile()
Definition: classimport.cpp:84
ClassImport::createImporterByFileExt
static ClassImport * createImporterByFileExt(const QString &fileName, CodeImpThread *thread=nullptr)
Definition: classimport.cpp:41
ClassImport::parseFile
virtual bool parseFile(const QString &fileName)=0
CodeImpThread
Definition: codeimpthread.h:22