aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/clangpchmanager/projectupdater.h
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2017-01-30 11:24:46 +0100
committerMarco Bubke <marco.bubke@qt.io>2017-01-30 13:55:58 +0000
commitc072cdfb8876df773da11222a35b7062dee2ad29 (patch)
tree954c931d5fed150fe4cb14d92a8aeb7285a27794 /src/plugins/clangpchmanager/projectupdater.h
parentd4b1cb4a65510477d0bc4a888e66c67da6e28237 (diff)
Clang: Add ClangPchManager
Compiling every header file again and again is quite time comsuming. There are technics to improve this like preambles(a kind of automated precompiled header) but they don't share their data between translation units. This approach provides an automatically generated precompiled header for every project and subproject to improve the loading time. Change-Id: I34f5bd4db21951175920e2a9bbf6b97b1d705969 Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/plugins/clangpchmanager/projectupdater.h')
-rw-r--r--src/plugins/clangpchmanager/projectupdater.h70
1 files changed, 70 insertions, 0 deletions
diff --git a/src/plugins/clangpchmanager/projectupdater.h b/src/plugins/clangpchmanager/projectupdater.h
new file mode 100644
index 0000000000..880920d1b7
--- /dev/null
+++ b/src/plugins/clangpchmanager/projectupdater.h
@@ -0,0 +1,70 @@
+/****************************************************************************
+**
+** Copyright (C) 2016 The Qt Company Ltd.
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of Qt Creator.
+**
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see https://www.qt.io/terms-conditions. For further
+** information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3 as published by the Free Software
+** Foundation with exceptions as appearing in the file LICENSE.GPL3-EXCEPT
+** included in the packaging of this file. Please review the following
+** information to ensure the GNU General Public License requirements will
+** be met: https://www.gnu.org/licenses/gpl-3.0.html.
+**
+****************************************************************************/
+
+#pragma once
+
+#include <clangpchmanager_global.h>
+
+namespace CppTools {
+class ProjectPart;
+}
+
+namespace ClangBackEnd {
+class PchManagerServerInterface;
+
+namespace V2 {
+class ProjectPartContainer;
+}
+}
+
+QT_FORWARD_DECLARE_CLASS(QStringList)
+
+#include <vector>
+
+namespace ClangPchManager {
+
+class PchManagerClient;
+
+class ProjectUpdater
+{
+public:
+ ProjectUpdater(ClangBackEnd::PchManagerServerInterface &server,
+ PchManagerClient &client);
+
+ void updateProjectParts(const std::vector<CppTools::ProjectPart *> &projectParts);
+ void removeProjectParts(const QStringList &projectPartIds);
+
+unittest_public:
+ static ClangBackEnd::V2::ProjectPartContainer toProjectPartContainer(
+ CppTools::ProjectPart *projectPart);
+ static std::vector<ClangBackEnd::V2::ProjectPartContainer> toProjectPartContainers(
+ std::vector<CppTools::ProjectPart *> projectParts);
+
+private:
+ ClangBackEnd::PchManagerServerInterface &m_server;
+ PchManagerClient &m_client;
+};
+
+} // namespace ClangPchManager