umbrello  2.31.90
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 
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 
68  bool m_enabled;
69  QString m_rootPath;
70 };
71 
72 #endif
Definition: classimport.h:26
void log(const QString &file, const QString &text)
Definition: classimport.cpp:133
static ClassImport * createImporterByFileExt(const QString &fileName, CodeImpThread *thread=0)
Definition: classimport.cpp:43
bool importFiles(const QStringList &fileNames)
Definition: classimport.cpp:92
ClassImport(CodeImpThread *thread=0)
Definition: classimport.cpp:69
virtual void initialize()=0
virtual ~ClassImport()
Definition: classimport.cpp:75
bool enabled()
Definition: classimport.h:40
CodeImpThread * m_thread
thread in which the work of importing is done
Definition: classimport.h:67
void setRootPath(const QString &path)
Definition: classimport.cpp:123
bool importFile(const QString &fileName)
Definition: classimport.cpp:117
QString m_rootPath
root path of import
Definition: classimport.h:69
bool m_enabled
state of importer
Definition: classimport.h:68
virtual void initPerFile()
Definition: classimport.cpp:84
virtual bool parseFile(const QString &fileName)=0
Definition: codeimpthread.h:36