diff options
author | Evan Martin <martine@danga.com> | 2011-12-07 17:38:10 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-07 17:38:10 (GMT) |
commit | d58d918bafb26af9fd0c65cd61058ad29c5d2f4b (patch) | |
tree | 163351351c3f4cad33cb3331e0ffc1721e8b8491 /src/graph.h | |
parent | 48526b9c08f22ddcf7e36ca02fde0202312920fa (diff) | |
download | Ninja-d58d918bafb26af9fd0c65cd61058ad29c5d2f4b.zip Ninja-d58d918bafb26af9fd0c65cd61058ad29c5d2f4b.tar.gz Ninja-d58d918bafb26af9fd0c65cd61058ad29c5d2f4b.tar.bz2 |
make Node::out_edges_ private
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/graph.h b/src/graph.h index b6f5139..6756417 100644 --- a/src/graph.h +++ b/src/graph.h @@ -71,6 +71,9 @@ struct Node { Edge* in_edge() const { return in_edge_; } void set_in_edge(Edge* edge) { in_edge_ = edge; } + const vector<Edge*>& out_edges() const { return out_edges_; } + void AddOutEdge(Edge* edge) { out_edges_.push_back(edge); } + private: string path_; /// Possible values of mtime_: @@ -88,9 +91,7 @@ private: /// known edge to produce it. Edge* in_edge_; - // TODO: make these private as well. But don't just blindly add - // setters/getters, instead pay attention to the proper API. -public: + /// All Edges that use this Node as an input. vector<Edge*> out_edges_; }; |