| 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_VALUE_EXTRACTORS_H_ | 5 #ifndef TOOLS_GN_VALUE_EXTRACTORS_H_ |
| 6 #define TOOLS_GN_VALUE_EXTRACTORS_H_ | 6 #define TOOLS_GN_VALUE_EXTRACTORS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "tools/gn/target.h" |
| 11 #include "tools/gn/value.h" | 12 #include "tools/gn/value.h" |
| 12 | 13 |
| 13 class BuildSettings; | 14 class BuildSettings; |
| 14 class Err; | 15 class Err; |
| 15 class Label; | 16 class Label; |
| 16 class SourceDir; | 17 class SourceDir; |
| 17 class SourceFile; | 18 class SourceFile; |
| 18 | 19 |
| 19 // Sets the error and returns false on failure. | 20 // Sets the error and returns false on failure. |
| 20 template<typename T, class Converter> | 21 template<typename T, class Converter> |
| (...skipping 23 matching lines...) Expand all Loading... |
| 44 std::vector<SourceFile>* files, | 45 std::vector<SourceFile>* files, |
| 45 Err* err); | 46 Err* err); |
| 46 | 47 |
| 47 // Looks for a list of source directories relative to a given current dir. | 48 // Looks for a list of source directories relative to a given current dir. |
| 48 bool ExtractListOfRelativeDirs(const BuildSettings* build_settings, | 49 bool ExtractListOfRelativeDirs(const BuildSettings* build_settings, |
| 49 const Value& value, | 50 const Value& value, |
| 50 const SourceDir& current_dir, | 51 const SourceDir& current_dir, |
| 51 std::vector<SourceDir>* dest, | 52 std::vector<SourceDir>* dest, |
| 52 Err* err); | 53 Err* err); |
| 53 | 54 |
| 55 // Extracts the list of labels and their origins to the given vector. Only the |
| 56 // labels are filled in, the ptr for each pair in the vector will be null. |
| 54 bool ExtractListOfLabels(const Value& value, | 57 bool ExtractListOfLabels(const Value& value, |
| 55 const SourceDir& current_dir, | 58 const SourceDir& current_dir, |
| 56 const Label& current_toolchain, | 59 const Label& current_toolchain, |
| 57 std::vector<Label>* dest, | 60 LabelConfigVector* dest, |
| 61 Err* err); |
| 62 bool ExtractListOfLabels(const Value& value, |
| 63 const SourceDir& current_dir, |
| 64 const Label& current_toolchain, |
| 65 LabelTargetVector* dest, |
| 58 Err* err); | 66 Err* err); |
| 59 | 67 |
| 60 #endif // TOOLS_GN_VALUE_EXTRACTORS_H_ | 68 #endif // TOOLS_GN_VALUE_EXTRACTORS_H_ |
| OLD | NEW |