umbrello: umbrello/codeimport/classimport.h Source File

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

classimport.h
Go to the documentation of this file.
1 /***************************************************************************
2 * This program is free software; you can redistribute it and/or modify *
3 * it under the terms of the GNU General Public License as published by *
4 * the Free Software Foundation; either version 2 of the License, or *
5 * (at your option) any later version. *
6 * *
7 * copyright (C) 2005-2020 *
8 * Umbrello UML Modeller Authors <umbrello-devel@kde.org> *
9 ***************************************************************************/
10
11 #ifndef CLASSIMPORT_H
12 #define CLASSIMPORT_H
13
14 #include <QStringList>
15
16 class CodeImpThread;
17
25 class ClassImport
26 {
27 public:
28 ClassImport(CodeImpThread* thread = 0);
29 virtual ~ClassImport();
30
31 bool importFiles(const QStringList& fileNames);
32 bool importFile(const QString& fileName);
33 void setRootPath(const QString &path);
34
40 bool enabled() { return m_enabled; }
41
42 static ClassImport *createImporterByFileExt(const QString &fileName, CodeImpThread* thread = 0);
43
44 protected:
45
52 virtual void initialize() = 0;
53
54 virtual void initPerFile();
55
62 virtual bool parseFile(const QString& fileName) = 0;
63
64 void log(const QString& file, const QString& text);
65 void log(const QString& text);
66
67 CodeImpThread* m_thread;
68 bool m_enabled;
69 QString m_rootPath;
70 };
71
72 #endif
ClassImport
Definition: classimport.h:26
ClassImport::log
void log(const QString &file, const QString &text)
Definition: classimport.cpp:133
ClassImport::createImporterByFileExt
static ClassImport * createImporterByFileExt(const QString &fileName, CodeImpThread *thread=0)
Definition: classimport.cpp:43
ClassImport::importFiles
bool importFiles(const QStringList &fileNames)
Definition: classimport.cpp:92
ClassImport::ClassImport
ClassImport(CodeImpThread *thread=0)
Definition: classimport.cpp:69
ClassImport::initialize
virtual void initialize()=0
ClassImport::~ClassImport
virtual ~ClassImport()
Definition: classimport.cpp:75
ClassImport::enabled
bool enabled()
Definition: classimport.h:40
ClassImport::m_thread
CodeImpThread * m_thread
thread in which the work of importing is done
Definition: classimport.h:67
ClassImport::setRootPath
void setRootPath(const QString &path)
Definition: classimport.cpp:123
ClassImport::importFile
bool importFile(const QString &fileName)
Definition: classimport.cpp:117
ClassImport::m_rootPath
QString m_rootPath
root path of import
Definition: classimport.h:69
ClassImport::m_enabled
bool m_enabled
state of importer
Definition: classimport.h:68
ClassImport::initPerFile
virtual void initPerFile()
Definition: classimport.cpp:84
ClassImport::parseFile
virtual bool parseFile(const QString &fileName)=0
CodeImpThread
Definition: codeimpthread.h:36