OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef TOOLS_GN_SCOPE_H_ | 5 #ifndef TOOLS_GN_SCOPE_H_ |
6 #define TOOLS_GN_SCOPE_H_ | 6 #define TOOLS_GN_SCOPE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
| 10 #include <utility> |
10 | 11 |
11 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
14 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
15 #include "base/memory/scoped_vector.h" | 16 #include "base/memory/scoped_vector.h" |
16 #include "tools/gn/err.h" | 17 #include "tools/gn/err.h" |
17 #include "tools/gn/pattern.h" | 18 #include "tools/gn/pattern.h" |
18 #include "tools/gn/source_dir.h" | 19 #include "tools/gn/source_dir.h" |
19 #include "tools/gn/value.h" | 20 #include "tools/gn/value.h" |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 Scope* MakeTargetDefaults(const std::string& target_type); | 234 Scope* MakeTargetDefaults(const std::string& target_type); |
234 | 235 |
235 // Gets the scope associated with the given target name, or null if it hasn't | 236 // Gets the scope associated with the given target name, or null if it hasn't |
236 // been set. | 237 // been set. |
237 const Scope* GetTargetDefaults(const std::string& target_type) const; | 238 const Scope* GetTargetDefaults(const std::string& target_type) const; |
238 | 239 |
239 // Filter to apply when the sources variable is assigned. May return NULL. | 240 // Filter to apply when the sources variable is assigned. May return NULL. |
240 const PatternList* GetSourcesAssignmentFilter() const; | 241 const PatternList* GetSourcesAssignmentFilter() const; |
241 void set_sources_assignment_filter( | 242 void set_sources_assignment_filter( |
242 scoped_ptr<PatternList> f) { | 243 scoped_ptr<PatternList> f) { |
243 sources_assignment_filter_ = f.Pass(); | 244 sources_assignment_filter_ = std::move(f); |
244 } | 245 } |
245 | 246 |
246 // Indicates if we're currently processing the build configuration file. | 247 // Indicates if we're currently processing the build configuration file. |
247 // This is true when processing the config file for any toolchain. | 248 // This is true when processing the config file for any toolchain. |
248 // | 249 // |
249 // To set or clear the flag, it must currently be in the opposite state in | 250 // To set or clear the flag, it must currently be in the opposite state in |
250 // the current scope. Note that querying the state of the flag recursively | 251 // the current scope. Note that querying the state of the flag recursively |
251 // checks all containing scopes until it reaches the top or finds the flag | 252 // checks all containing scopes until it reaches the top or finds the flag |
252 // set. | 253 // set. |
253 void SetProcessingBuildConfig(); | 254 void SetProcessingBuildConfig(); |
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
354 | 355 |
355 typedef std::set<ProgrammaticProvider*> ProviderSet; | 356 typedef std::set<ProgrammaticProvider*> ProviderSet; |
356 ProviderSet programmatic_providers_; | 357 ProviderSet programmatic_providers_; |
357 | 358 |
358 SourceDir source_dir_; | 359 SourceDir source_dir_; |
359 | 360 |
360 DISALLOW_COPY_AND_ASSIGN(Scope); | 361 DISALLOW_COPY_AND_ASSIGN(Scope); |
361 }; | 362 }; |
362 | 363 |
363 #endif // TOOLS_GN_SCOPE_H_ | 364 #endif // TOOLS_GN_SCOPE_H_ |
OLD | NEW |