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_SCRIPT_VALUES_H_ | 5 #ifndef TOOLS_GN_SCRIPT_VALUES_H_ |
6 #define TOOLS_GN_SCRIPT_VALUES_H_ | 6 #define TOOLS_GN_SCRIPT_VALUES_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 // Arguments to the script. | 25 // Arguments to the script. |
26 std::vector<std::string>& args() { return args_; } | 26 std::vector<std::string>& args() { return args_; } |
27 const std::vector<std::string>& args() const { return args_; } | 27 const std::vector<std::string>& args() const { return args_; } |
28 void swap_in_args(std::vector<std::string>* a) { args_.swap(*a); } | 28 void swap_in_args(std::vector<std::string>* a) { args_.swap(*a); } |
29 | 29 |
30 // Files created by the script. | 30 // Files created by the script. |
31 std::vector<SourceFile>& outputs() { return outputs_; } | 31 std::vector<SourceFile>& outputs() { return outputs_; } |
32 const std::vector<SourceFile>& outputs() const { return outputs_; } | 32 const std::vector<SourceFile>& outputs() const { return outputs_; } |
33 void swap_in_outputs(std::vector<SourceFile>* op) { outputs_.swap(*op); } | 33 void swap_in_outputs(std::vector<SourceFile>* op) { outputs_.swap(*op); } |
34 | 34 |
| 35 // Depfile generated by the script. |
| 36 const SourceFile& depfile() const { return depfile_; } |
| 37 bool has_depfile() const { return !depfile_.is_null(); } |
| 38 void set_depfile(const SourceFile& depfile) { depfile_ = depfile; } |
| 39 |
35 private: | 40 private: |
36 SourceFile script_; | 41 SourceFile script_; |
37 std::vector<std::string> args_; | 42 std::vector<std::string> args_; |
38 std::vector<SourceFile> outputs_; | 43 std::vector<SourceFile> outputs_; |
| 44 SourceFile depfile_; |
39 | 45 |
40 DISALLOW_COPY_AND_ASSIGN(ScriptValues); | 46 DISALLOW_COPY_AND_ASSIGN(ScriptValues); |
41 }; | 47 }; |
42 | 48 |
43 #endif // TOOLS_GN_SCRIPT_VALUES_H_ | 49 #endif // TOOLS_GN_SCRIPT_VALUES_H_ |
OLD | NEW |