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 | 10 |
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
158 const Scope* GetTargetDefaults(const std::string& target_type) const; | 158 const Scope* GetTargetDefaults(const std::string& target_type) const; |
159 | 159 |
160 // Filter to apply when the sources variable is assigned. May return NULL. | 160 // Filter to apply when the sources variable is assigned. May return NULL. |
161 const PatternList* GetSourcesAssignmentFilter() const; | 161 const PatternList* GetSourcesAssignmentFilter() const; |
162 void set_sources_assignment_filter( | 162 void set_sources_assignment_filter( |
163 scoped_ptr<PatternList> f) { | 163 scoped_ptr<PatternList> f) { |
164 sources_assignment_filter_ = f.Pass(); | 164 sources_assignment_filter_ = f.Pass(); |
165 } | 165 } |
166 | 166 |
167 // Indicates if we're currently processing the build configuration file. | 167 // Indicates if we're currently processing the build configuration file. |
168 // This is true when processing the config file for any toolchain. See also | 168 // This is true when processing the config file for any toolchain. |
169 // *ProcessingDefaultBuildConfig() below. | |
170 // | 169 // |
171 // To set or clear the flag, it must currently be in the opposite state in | 170 // To set or clear the flag, it must currently be in the opposite state in |
172 // the current scope. Note that querying the state of the flag recursively | 171 // the current scope. Note that querying the state of the flag recursively |
173 // checks all containing scopes until it reaches the top or finds the flag | 172 // checks all containing scopes until it reaches the top or finds the flag |
174 // set. | 173 // set. |
175 void SetProcessingBuildConfig(); | 174 void SetProcessingBuildConfig(); |
176 void ClearProcessingBuildConfig(); | 175 void ClearProcessingBuildConfig(); |
177 bool IsProcessingBuildConfig() const; | 176 bool IsProcessingBuildConfig() const; |
178 | 177 |
179 // Indicates we're currently processing the default toolchain's build | |
180 // configuration file. | |
181 void SetProcessingDefaultBuildConfig(); | |
182 void ClearProcessingDefaultBuildConfig(); | |
183 bool IsProcessingDefaultBuildConfig() const; | |
184 | |
185 // Indicates if we're currently processing an import file. | 178 // Indicates if we're currently processing an import file. |
186 // | 179 // |
187 // See SetProcessingBaseConfig for how flags work. | 180 // See SetProcessingBaseConfig for how flags work. |
188 void SetProcessingImport(); | 181 void SetProcessingImport(); |
189 void ClearProcessingImport(); | 182 void ClearProcessingImport(); |
190 bool IsProcessingImport() const; | 183 bool IsProcessingImport() const; |
191 | 184 |
192 // The source directory associated with this scope. This will check embedded | 185 // The source directory associated with this scope. This will check embedded |
193 // scopes until it finds a nonempty source directory. This will default to | 186 // scopes until it finds a nonempty source directory. This will default to |
194 // an empty dir if no containing scope has a source dir set. | 187 // an empty dir if no containing scope has a source dir set. |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
261 | 254 |
262 typedef std::set<ProgrammaticProvider*> ProviderSet; | 255 typedef std::set<ProgrammaticProvider*> ProviderSet; |
263 ProviderSet programmatic_providers_; | 256 ProviderSet programmatic_providers_; |
264 | 257 |
265 SourceDir source_dir_; | 258 SourceDir source_dir_; |
266 | 259 |
267 DISALLOW_COPY_AND_ASSIGN(Scope); | 260 DISALLOW_COPY_AND_ASSIGN(Scope); |
268 }; | 261 }; |
269 | 262 |
270 #endif // TOOLS_GN_SCOPE_H_ | 263 #endif // TOOLS_GN_SCOPE_H_ |
OLD | NEW |