| 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_ITEM_H_ | 5 #ifndef TOOLS_GN_ITEM_H_ |
| 6 #define TOOLS_GN_ITEM_H_ | 6 #define TOOLS_GN_ITEM_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "tools/gn/label.h" | 10 #include "tools/gn/label.h" |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 virtual Target* AsTarget(); | 41 virtual Target* AsTarget(); |
| 42 virtual const Target* AsTarget() const; | 42 virtual const Target* AsTarget() const; |
| 43 virtual Toolchain* AsToolchain(); | 43 virtual Toolchain* AsToolchain(); |
| 44 virtual const Toolchain* AsToolchain() const; | 44 virtual const Toolchain* AsToolchain() const; |
| 45 | 45 |
| 46 // Returns a name like "target" or "config" for the type of item this is, to | 46 // Returns a name like "target" or "config" for the type of item this is, to |
| 47 // be used in logging and error messages. | 47 // be used in logging and error messages. |
| 48 std::string GetItemTypeName() const; | 48 std::string GetItemTypeName() const; |
| 49 | 49 |
| 50 // Called when this item is resolved, meaning it and all of its dependents | 50 // Called when this item is resolved, meaning it and all of its dependents |
| 51 // have no unresolved deps. | 51 // have no unresolved deps. Returns true on success. Sets the error and |
| 52 virtual void OnResolved() {} | 52 // returns false on failure. |
| 53 virtual bool OnResolved(Err* err); |
| 53 | 54 |
| 54 private: | 55 private: |
| 55 const Settings* settings_; | 56 const Settings* settings_; |
| 56 Label label_; | 57 Label label_; |
| 57 const ParseNode* defined_from_; | 58 const ParseNode* defined_from_; |
| 58 | 59 |
| 59 Visibility visibility_; | 60 Visibility visibility_; |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 #endif // TOOLS_GN_ITEM_H_ | 63 #endif // TOOLS_GN_ITEM_H_ |
| OLD | NEW |