Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(128)

Side by Side Diff: tools/gn/item.h

Issue 21114002: Add initial prototype for the GN meta-buildsystem. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add owners and readme Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « tools/gn/input_file_manager.cc ('k') | tools/gn/item.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef TOOLS_GN_ITEM_H_
6 #define TOOLS_GN_ITEM_H_
7
8 #include <string>
9
10 #include "tools/gn/label.h"
11
12 class Config;
13 class Target;
14 class Toolchain;
15
16 // A named item (target, config, etc.) that participates in the dependency
17 // graph.
18 class Item {
19 public:
20 Item(const Label& label);
21 virtual ~Item();
22
23 const Label& label() const { return label_; }
24
25 // Manual RTTI.
26 virtual Config* AsConfig();
27 virtual const Config* AsConfig() const;
28 virtual Target* AsTarget();
29 virtual const Target* AsTarget() const;
30 virtual Toolchain* AsToolchain();
31 virtual const Toolchain* AsToolchain() const;
32
33 // Returns a name like "target" or "config" for the type of item this is, to
34 // be used in logging and error messages.
35 std::string GetItemTypeName() const;
36
37 // Called when this item is resolved, meaning it and all of its dependents
38 // have no unresolved deps.
39 virtual void OnResolved() {}
40
41 private:
42 Label label_;
43 };
44
45 #endif // TOOLS_GN_ITEM_H_
OLDNEW
« no previous file with comments | « tools/gn/input_file_manager.cc ('k') | tools/gn/item.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698