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_LABEL_H_ | 5 #ifndef TOOLS_GN_LABEL_H_ |
6 #define TOOLS_GN_LABEL_H_ | 6 #define TOOLS_GN_LABEL_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "base/containers/hash_tables.h" | 10 #include "base/containers/hash_tables.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 | 22 |
23 // Makes a label given an already-separated out path and name. | 23 // Makes a label given an already-separated out path and name. |
24 // See also Resolve(). | 24 // See also Resolve(). |
25 Label(const SourceDir& dir, | 25 Label(const SourceDir& dir, |
26 const base::StringPiece& name, | 26 const base::StringPiece& name, |
27 const SourceDir& toolchain_dir, | 27 const SourceDir& toolchain_dir, |
28 const base::StringPiece& toolchain_name); | 28 const base::StringPiece& toolchain_name); |
29 | 29 |
30 // Makes a label with an empty toolchain. | 30 // Makes a label with an empty toolchain. |
31 Label(const SourceDir& dir, const base::StringPiece& name); | 31 Label(const SourceDir& dir, const base::StringPiece& name); |
32 Label(const Label& other); | |
tfarina
2016/02/24 19:13:48
add empty lines before and after like in Err?
| |
32 ~Label(); | 33 ~Label(); |
33 | 34 |
34 // Resolives a string from a build file that may be relative to the | 35 // Resolives a string from a build file that may be relative to the |
35 // current directory into a fully qualified label. On failure returns an | 36 // current directory into a fully qualified label. On failure returns an |
36 // is_null() label and sets the error. | 37 // is_null() label and sets the error. |
37 static Label Resolve(const SourceDir& current_dir, | 38 static Label Resolve(const SourceDir& current_dir, |
38 const Label& current_toolchain, | 39 const Label& current_toolchain, |
39 const Value& input, | 40 const Value& input, |
40 Err* err); | 41 Err* err); |
41 | 42 |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
116 } | 117 } |
117 }; | 118 }; |
118 | 119 |
119 } // namespace BASE_HASH_NAMESPACE | 120 } // namespace BASE_HASH_NAMESPACE |
120 | 121 |
121 inline void swap(Label& lhs, Label& rhs) { | 122 inline void swap(Label& lhs, Label& rhs) { |
122 lhs.swap(rhs); | 123 lhs.swap(rhs); |
123 } | 124 } |
124 | 125 |
125 #endif // TOOLS_GN_LABEL_H_ | 126 #endif // TOOLS_GN_LABEL_H_ |
OLD | NEW |