1 /**************************************************************************** 2 ** 3 ** Copyright (C) 2016 The Qt Company Ltd. 4 ** Contact: https://www.qt.io/licensing/ 5 ** 6 ** This file is part of Qbs. 7 ** 8 ** $QT_BEGIN_LICENSE:LGPL$ 9 ** Commercial License Usage 10 ** Licensees holding valid commercial Qt licenses may use this file in 11 ** accordance with the commercial license agreement provided with the 12 ** Software or, alternatively, in accordance with the terms contained in 13 ** a written agreement between you and The Qt Company. For licensing terms 14 ** and conditions see https://www.qt.io/terms-conditions. For further 15 ** information use the contact form at https://www.qt.io/contact-us. 16 ** 17 ** GNU Lesser General Public License Usage 18 ** Alternatively, this file may be used under the terms of the GNU Lesser 19 ** General Public License version 3 as published by the Free Software 20 ** Foundation and appearing in the file LICENSE.LGPL3 included in the 21 ** packaging of this file. Please review the following information to 22 ** ensure the GNU Lesser General Public License version 3 requirements 23 ** will be met: https://www.gnu.org/licenses/lgpl-3.0.html. 24 ** 25 ** GNU General Public License Usage 26 ** Alternatively, this file may be used under the terms of the GNU 27 ** General Public License version 2.0 or (at your option) the GNU General 28 ** Public license version 3 or any later version approved by the KDE Free 29 ** Qt Foundation. The licenses are as published by the Free Software 30 ** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 31 ** included in the packaging of this file. Please review the following 32 ** information to ensure the GNU General Public License requirements will 33 ** be met: https://www.gnu.org/licenses/gpl-2.0.html and 34 ** https://www.gnu.org/licenses/gpl-3.0.html. 35 ** 36 ** $QT_END_LICENSE$ 37 ** 38 ****************************************************************************/ 39 #ifndef QBS_LANG_FORWARD_DECLS_H 40 #define QBS_LANG_FORWARD_DECLS_H 41 42 #include <memory> 43 44 namespace qbs { 45 namespace Internal { 46 47 enum class ObserveMode; 48 49 class Value; 50 using ValuePtr = std::shared_ptr<Value>; 51 using ValueConstPtr = std::shared_ptr<const Value>; 52 53 class ItemValue; 54 using ItemValuePtr = std::shared_ptr<ItemValue>; 55 using ItemValueConstPtr = std::shared_ptr<const ItemValue>; 56 57 class JSSourceValue; 58 using JSSourceValuePtr = std::shared_ptr<JSSourceValue>; 59 using JSSourceValueConstPtr = std::shared_ptr<const JSSourceValue>; 60 61 class VariantValue; 62 using VariantValuePtr = std::shared_ptr<VariantValue>; 63 using VariantValueConstPtr = std::shared_ptr<const VariantValue>; 64 65 class FileContext; 66 using FileContextPtr = std::shared_ptr<FileContext>; 67 using FileContextConstPtr = std::shared_ptr<const FileContext>; 68 69 class FileContextBase; 70 using FileContextBasePtr = std::shared_ptr<FileContextBase>; 71 using FileContextBaseConstPtr = std::shared_ptr<const FileContextBase>; 72 73 class Probe; 74 using ProbePtr = std::shared_ptr<Probe>; 75 using ProbeConstPtr = std::shared_ptr<const Probe>; 76 77 class PropertyMapInternal; 78 using PropertyMapPtr = std::shared_ptr<PropertyMapInternal>; 79 using PropertyMapConstPtr = std::shared_ptr<const PropertyMapInternal>; 80 81 class FileTagger; 82 using FileTaggerPtr = std::shared_ptr<FileTagger>; 83 using FileTaggerConstPtr = std::shared_ptr<const FileTagger>; 84 85 class ResolvedProduct; 86 using ResolvedProductPtr = std::shared_ptr<ResolvedProduct>; 87 using ResolvedProductConstPtr = std::shared_ptr<const ResolvedProduct>; 88 89 class ResolvedProject; 90 using ResolvedProjectPtr = std::shared_ptr<ResolvedProject>; 91 using ResolvedProjectConstPtr = std::shared_ptr<const ResolvedProject>; 92 93 class TopLevelProject; 94 using TopLevelProjectPtr = std::shared_ptr<TopLevelProject>; 95 using TopLevelProjectConstPtr = std::shared_ptr<const TopLevelProject>; 96 97 class ResolvedFileContext; 98 using ResolvedFileContextPtr = std::shared_ptr<ResolvedFileContext>; 99 using ResolvedFileContextConstPtr = std::shared_ptr<const ResolvedFileContext>; 100 101 class Rule; 102 using RulePtr = std::shared_ptr<Rule>; 103 using RuleConstPtr = std::shared_ptr<const Rule>; 104 105 class ResolvedScanner; 106 using ResolvedScannerPtr = std::shared_ptr<ResolvedScanner>; 107 using ResolvedScannerConstPtr = std::shared_ptr<const ResolvedScanner>; 108 109 class SourceArtifactInternal; 110 using SourceArtifactPtr = std::shared_ptr<SourceArtifactInternal>; 111 using SourceArtifactConstPtr = std::shared_ptr<const SourceArtifactInternal>; 112 113 class ScriptFunction; 114 using ScriptFunctionPtr = std::shared_ptr<ScriptFunction>; 115 using ScriptFunctionConstPtr = std::shared_ptr<const ScriptFunction>; 116 class PrivateScriptFunction; 117 118 class RuleArtifact; 119 using RuleArtifactPtr = std::shared_ptr<RuleArtifact>; 120 using RuleArtifactConstPtr = std::shared_ptr<const RuleArtifact>; 121 122 class ResolvedModule; 123 using ResolvedModulePtr = std::shared_ptr<ResolvedModule>; 124 using ResolvedModuleConstPtr = std::shared_ptr<const ResolvedModule>; 125 126 class ResolvedGroup; 127 using GroupPtr = std::shared_ptr<ResolvedGroup>; 128 using GroupConstPtr = std::shared_ptr<const ResolvedGroup>; 129 130 class ArtifactProperties; 131 using ArtifactPropertiesPtr = std::shared_ptr<ArtifactProperties>; 132 using ArtifactPropertiesConstPtr = std::shared_ptr<const ArtifactProperties>; 133 134 class ExportedItem; 135 using ExportedItemPtr = std::shared_ptr<ExportedItem>; 136 class ExportedModule; 137 class ExportedModuleDependency; 138 class ExportedProperty; 139 class PersistentPool; 140 141 } // namespace Internal 142 } // namespace qbs 143 144 #ifdef QT_CORE_LIB 145 #include "../tools/porting.h" 146 147 #include <QtCore/qhash.h> 148 149 namespace qbs { 150 namespace Internal { 151 152 template <typename T> inline static QHashValueType qHash(const std::shared_ptr<T> &p, QHashValueType seed = 0) 153 { 154 return ::qHash(p.get(), seed); 155 } 156 157 } // namespace Internal 158 } // namespace qbs 159 #endif 160 161 #endif // QBS_LANG_FORWARD_DECLS_H 162