| 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 #include "tools/gn/item.h" | 5 #include "tools/gn/item.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 | 8 |
| 9 Item::Item(const Settings* settings, const Label& label) | 9 Item::Item(const Label& label) : label_(label) { |
| 10 : settings_(settings), | |
| 11 label_(label) { | |
| 12 } | 10 } |
| 13 | 11 |
| 14 Item::~Item() { | 12 Item::~Item() { |
| 15 } | 13 } |
| 16 | 14 |
| 17 Config* Item::AsConfig() { return NULL; } | 15 Config* Item::AsConfig() { return NULL; } |
| 18 const Config* Item::AsConfig() const { return NULL; } | 16 const Config* Item::AsConfig() const { return NULL; } |
| 19 Target* Item::AsTarget() { return NULL; } | 17 Target* Item::AsTarget() { return NULL; } |
| 20 const Target* Item::AsTarget() const { return NULL; } | 18 const Target* Item::AsTarget() const { return NULL; } |
| 21 Toolchain* Item::AsToolchain() { return NULL; } | 19 Toolchain* Item::AsToolchain() { return NULL; } |
| 22 const Toolchain* Item::AsToolchain() const { return NULL; } | 20 const Toolchain* Item::AsToolchain() const { return NULL; } |
| 23 | 21 |
| 24 std::string Item::GetItemTypeName() const { | 22 std::string Item::GetItemTypeName() const { |
| 25 if (AsConfig()) | 23 if (AsConfig()) |
| 26 return "config"; | 24 return "config"; |
| 27 if (AsTarget()) | 25 if (AsTarget()) |
| 28 return "target"; | 26 return "target"; |
| 29 if (AsToolchain()) | 27 if (AsToolchain()) |
| 30 return "toolchain"; | 28 return "toolchain"; |
| 31 NOTREACHED(); | 29 NOTREACHED(); |
| 32 return "this thing that I have no idea what it is"; | 30 return "this thing that I have no idea what it is"; |
| 33 } | 31 } |
| OLD | NEW |