OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_SUBSTITUTION_LIST_H_ | 5 #ifndef TOOLS_GN_SUBSTITUTION_LIST_H_ |
6 #define TOOLS_GN_SUBSTITUTION_LIST_H_ | 6 #define TOOLS_GN_SUBSTITUTION_LIST_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 Err* err); | 23 Err* err); |
24 | 24 |
25 // Makes a SubstitutionList from the given hardcoded patterns. | 25 // Makes a SubstitutionList from the given hardcoded patterns. |
26 static SubstitutionList MakeForTest( | 26 static SubstitutionList MakeForTest( |
27 const char* a, | 27 const char* a, |
28 const char* b = nullptr, | 28 const char* b = nullptr, |
29 const char* c = nullptr); | 29 const char* c = nullptr); |
30 | 30 |
31 const std::vector<SubstitutionPattern>& list() const { return list_; } | 31 const std::vector<SubstitutionPattern>& list() const { return list_; } |
32 | 32 |
33 // Returns a list of all substitution types used by the patterns in thist | 33 // Returns a list of all substitution types used by the patterns in this |
34 // list, with the exception of LITERAL. | 34 // list, with the exception of LITERAL. |
35 const std::vector<SubstitutionType>& required_types() const { | 35 const std::vector<SubstitutionType>& required_types() const { |
36 return required_types_; | 36 return required_types_; |
37 } | 37 } |
38 | 38 |
39 void FillRequiredTypes(SubstitutionBits* bits) const; | 39 void FillRequiredTypes(SubstitutionBits* bits) const; |
40 | 40 |
41 private: | 41 private: |
42 std::vector<SubstitutionPattern> list_; | 42 std::vector<SubstitutionPattern> list_; |
43 | 43 |
44 std::vector<SubstitutionType> required_types_; | 44 std::vector<SubstitutionType> required_types_; |
45 }; | 45 }; |
46 | 46 |
47 #endif // TOOLS_GN_SUBSTITUTION_LIST_H_ | 47 #endif // TOOLS_GN_SUBSTITUTION_LIST_H_ |
OLD | NEW |