| 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_ACTION_VALUES_H_ | 5 #ifndef TOOLS_GN_ACTION_VALUES_H_ |
| 6 #define TOOLS_GN_ACTION_VALUES_H_ | 6 #define TOOLS_GN_ACTION_VALUES_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| 11 #include "base/macros.h" | 11 #include "base/macros.h" |
| 12 #include "tools/gn/label_ptr.h" |
| 12 #include "tools/gn/source_file.h" | 13 #include "tools/gn/source_file.h" |
| 13 #include "tools/gn/substitution_list.h" | 14 #include "tools/gn/substitution_list.h" |
| 14 | 15 |
| 16 class Pool; |
| 15 class Target; | 17 class Target; |
| 16 | 18 |
| 17 // Holds the values (outputs, args, script name, etc.) for either an action or | 19 // Holds the values (outputs, args, script name, etc.) for either an action or |
| 18 // an action_foreach target. | 20 // an action_foreach target. |
| 19 class ActionValues { | 21 class ActionValues { |
| 20 public: | 22 public: |
| 21 ActionValues(); | 23 ActionValues(); |
| 22 ~ActionValues(); | 24 ~ActionValues(); |
| 23 | 25 |
| 24 // Filename of the script to execute. | 26 // Filename of the script to execute. |
| (...skipping 18 matching lines...) Expand all Loading... |
| 43 bool has_depfile() const { return !depfile_.ranges().empty(); } | 45 bool has_depfile() const { return !depfile_.ranges().empty(); } |
| 44 void set_depfile(const SubstitutionPattern& depfile) { depfile_ = depfile; } | 46 void set_depfile(const SubstitutionPattern& depfile) { depfile_ = depfile; } |
| 45 | 47 |
| 46 // Response file contents. Empty means no response file. | 48 // Response file contents. Empty means no response file. |
| 47 SubstitutionList& rsp_file_contents() { return rsp_file_contents_; } | 49 SubstitutionList& rsp_file_contents() { return rsp_file_contents_; } |
| 48 const SubstitutionList& rsp_file_contents() const { | 50 const SubstitutionList& rsp_file_contents() const { |
| 49 return rsp_file_contents_; | 51 return rsp_file_contents_; |
| 50 } | 52 } |
| 51 bool uses_rsp_file() const { return !rsp_file_contents_.list().empty(); } | 53 bool uses_rsp_file() const { return !rsp_file_contents_.list().empty(); } |
| 52 | 54 |
| 53 // Console pool option | 55 // Pool option |
| 54 bool is_console() const { return console_; } | 56 const LabelPtrPair<Pool>& pool() const { return pool_; } |
| 55 void set_console(bool value) { console_ = value; } | 57 void set_pool(LabelPtrPair<Pool> pool) { pool_ = std::move(pool); } |
| 56 | 58 |
| 57 private: | 59 private: |
| 58 SourceFile script_; | 60 SourceFile script_; |
| 59 SubstitutionList args_; | 61 SubstitutionList args_; |
| 60 SubstitutionList outputs_; | 62 SubstitutionList outputs_; |
| 61 SubstitutionPattern depfile_; | 63 SubstitutionPattern depfile_; |
| 62 SubstitutionList rsp_file_contents_; | 64 SubstitutionList rsp_file_contents_; |
| 63 bool console_; | 65 LabelPtrPair<Pool> pool_; |
| 64 | 66 |
| 65 DISALLOW_COPY_AND_ASSIGN(ActionValues); | 67 DISALLOW_COPY_AND_ASSIGN(ActionValues); |
| 66 }; | 68 }; |
| 67 | 69 |
| 68 #endif // TOOLS_GN_ACTION_VALUES_H_ | 70 #endif // TOOLS_GN_ACTION_VALUES_H_ |
| OLD | NEW |