diff options
author | Evan Martin <martine@danga.com> | 2011-12-24 01:29:05 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2011-12-24 01:29:05 (GMT) |
commit | d89ddd6be801869aff1308f7c57398c072b776d6 (patch) | |
tree | d64d51777b0b7da0ca718013c1d46a1611107e65 /src/graph.h | |
parent | e9ffd8dfbadcf9eb0963e30be3f989b7ef70d01d (diff) | |
parent | 32bf74f0e94bbe26bd6a8befe55241f8dc1440e2 (diff) | |
download | Ninja-d89ddd6be801869aff1308f7c57398c072b776d6.zip Ninja-d89ddd6be801869aff1308f7c57398c072b776d6.tar.gz Ninja-d89ddd6be801869aff1308f7c57398c072b776d6.tar.bz2 |
Merge pull request #164 from tfarina/rule-private-members
Fix the TODO in Rule class.
Diffstat (limited to 'src/graph.h')
-rw-r--r-- | src/graph.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/graph.h b/src/graph.h index 067d90e..fe102d2 100644 --- a/src/graph.h +++ b/src/graph.h @@ -104,21 +104,23 @@ struct Rule { bool generator() const { return generator_; } bool restat() const { return restat_; } -private: + const EvalString& command() const { return command_; } + const EvalString& description() const { return description_; } + const EvalString& depfile() const { return depfile_; } + + private: + // Allow the parsers to reach into this object and fill out its fields. + friend class ManifestParser; + friend class ParserTest; + string name_; - // TODO: make these private. But various tests want to reach into them... -public: + bool generator_; + bool restat_; + EvalString command_; EvalString description_; EvalString depfile_; - -private: - bool generator_, restat_; - - // Allow the parsers to reach into this object and fill out its fields. - friend class ManifestParser; - friend class ParserTest; }; struct BuildLog; @@ -130,9 +132,9 @@ struct Edge { Edge() : rule_(NULL), env_(NULL), outputs_ready_(false), implicit_deps_(0), order_only_deps_(0) {} - /// Examine inputs, outputs, and command lines to judge whether this edge needs - /// to be re-run, and update outputs_ready_ and each outputs' dirty_ state - /// accordingly. + /// Examine inputs, outputs, and command lines to judge whether this edge + /// needs to be re-run, and update outputs_ready_ and each outputs' |dirty_| + /// state accordingly. /// Returns false on failure. bool RecomputeDirty(State* state, DiskInterface* disk_interface, string* err); |