File indexing completed on 2024-05-19 04:39:57

0001 /*
0002     SPDX-FileCopyrightText: 2009 David Nolden <david.nolden.kdevelop@art-master.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef KDEVPLATFORM_MAIN_H
0008 #define KDEVPLATFORM_MAIN_H
0009 
0010 #include <QObject>
0011 #include <QAtomicInt>
0012 #include <QUrl>
0013 
0014 #include <language/duchain/topducontext.h>
0015 #include <serialization/indexedstring.h>
0016 
0017 class QCommandLineParser;
0018 
0019 class Manager : public QObject
0020 {
0021     Q_OBJECT
0022 
0023 public:
0024     explicit Manager(QCommandLineParser* args);
0025     void addToBackgroundParser(const QString& path, KDevelop::TopDUContext::Features features);
0026     QSet<QUrl> waiting();
0027 
0028 private:
0029     QSet<QUrl> m_waiting;
0030     uint m_total;
0031     QCommandLineParser* m_args;
0032     QAtomicInt m_allFilesAdded;
0033 
0034 public Q_SLOTS:
0035     // delay init into event loop so the DUChain can always shutdown gracefully
0036     void init();
0037     void updateReady(const KDevelop::IndexedString& url, const KDevelop::ReferencedTopDUContext& topContext);
0038     void finish();
0039     void dump(const KDevelop::ReferencedTopDUContext& topContext);
0040 };
0041 
0042 #endif