summaryrefslogtreecommitdiffstats
path: root/src/graph.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/graph.h')
-rw-r--r--src/graph.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/graph.h b/src/graph.h
index 8b93e29..4ef05ec 100644
--- a/src/graph.h
+++ b/src/graph.h
@@ -32,7 +32,8 @@ struct Node {
: path_(path),
mtime_(-1),
dirty_(false),
- in_edge_(NULL) {}
+ in_edge_(NULL),
+ id_(-1) {}
/// Return true if the file exists (mtime_ got a value).
bool Stat(DiskInterface* disk_interface);
@@ -74,6 +75,9 @@ struct Node {
Edge* in_edge() const { return in_edge_; }
void set_in_edge(Edge* edge) { in_edge_ = edge; }
+ int id() const { return id_; }
+ void set_id(int id) { id_ = id; }
+
const vector<Edge*>& out_edges() const { return out_edges_; }
void AddOutEdge(Edge* edge) { out_edges_.push_back(edge); }
@@ -98,6 +102,9 @@ private:
/// All Edges that use this Node as an input.
vector<Edge*> out_edges_;
+
+ /// A dense integer id for the node, assigned and used by DepsLog.
+ int id_;
};
/// An invokable build command and associated metadata (description, etc.).