|
Ninja
|
Global state (file status, loaded rules) for a single run. More...
#include <state.h>
Public Member Functions | |
| bool | AddDefault (const string &path, string *error) |
| Edge * | AddEdge (const Rule *rule) |
| void | AddIn (Edge *edge, const string &path) |
| void | AddOut (Edge *edge, const string &path) |
| void | AddRule (const Rule *rule) |
| vector< Node * > | DefaultNodes (string *error) |
| Node * | GetNode (const string &path) |
| Node * | LookupNode (const string &path) |
| const Rule * | LookupRule (const string &rule_name) |
| void | Reset () |
| vector< Node * > | RootNodes (string *error) |
| StatCache * | stat_cache () |
| State () | |
Public Attributes | |
| BindingEnv | bindings_ |
| struct BuildLog * | build_log_ |
| vector< Node * > | defaults_ |
| vector< Edge * > | edges_ |
| All the edges of the graph. | |
| map< string, const Rule * > | rules_ |
| All the rules used in the graph. | |
| StatCache | stat_cache_ |
Static Public Attributes | |
| static const Rule | kPhonyRule |
| State::State | ( | ) |
Definition at line 24 of file state.cc.
References AddRule(), and kPhonyRule.
| bool State::AddDefault | ( | const string & | path, |
| string * | error | ||
| ) |
Definition at line 78 of file state.cc.
References defaults_, and LookupNode().
Referenced by ManifestParser::ParseDefaults().
Definition at line 40 of file state.cc.
References bindings_, edges_, Edge::env_, and Edge::rule_.
Referenced by Edge::LoadDepFile(), and ManifestParser::ParseEdge().
| void State::AddIn | ( | Edge * | edge, |
| const string & | path | ||
| ) |
Definition at line 62 of file state.cc.
References GetNode(), Edge::inputs_, and Node::out_edges_.
Referenced by ManifestParser::ParseEdge().
| void State::AddOut | ( | Edge * | edge, |
| const string & | path | ||
| ) |
Definition at line 68 of file state.cc.
References GetNode(), Node::in_edge_, Edge::outputs_, and Warning().
Referenced by ManifestParser::ParseEdge().
| void State::AddRule | ( | const Rule * | rule | ) |
Definition at line 28 of file state.cc.
References LookupRule(), Rule::name_, and rules_.
Referenced by ManifestParser::ParseRule(), and State().
| vector< Node * > State::DefaultNodes | ( | string * | error | ) |
Definition at line 106 of file state.cc.
References defaults_, and RootNodes().
| Node * State::GetNode | ( | const string & | path | ) |
Definition at line 48 of file state.cc.
References StatCache::GetFile(), FileStat::node_, and stat_cache_.
Referenced by AddIn(), AddOut(), StateTestWithBuiltinRules::GetNode(), and Edge::LoadDepFile().
| Node * State::LookupNode | ( | const string & | path | ) |
Definition at line 55 of file state.cc.
References StatCache::GetFile(), FileStat::node_, and stat_cache_.
Referenced by AddDefault(), Builder::AddTarget(), Cleaner::CleanTarget(), and Cleaner::CleanTargets().
| const Rule * State::LookupRule | ( | const string & | rule_name | ) |
Definition at line 33 of file state.cc.
References rules_.
Referenced by AddRule(), Cleaner::CleanRule(), Cleaner::CleanRules(), ManifestParser::ParseEdge(), and ManifestParser::ParseRule().
| void State::Reset | ( | ) |
Definition at line 110 of file state.cc.
References edges_, StatCache::Invalidate(), and stat_cache_.
| vector< Node * > State::RootNodes | ( | string * | error | ) |
| error | where to write the error message if somethings went wrong. |
Definition at line 88 of file state.cc.
References edges_.
Referenced by DefaultNodes().
Definition at line 64 of file state.h.
Referenced by AddEdge(), main(), and ManifestParser::ManifestParser().
| struct BuildLog* State::build_log_ |
Definition at line 66 of file state.h.
Referenced by Builder::Builder(), BuildWithLogTest::BuildWithLogTest(), main(), and Edge::RecomputeDirty().
| vector<Node*> State::defaults_ |
Definition at line 65 of file state.h.
Referenced by AddDefault(), and DefaultNodes().
| vector<Edge*> State::edges_ |
All the edges of the graph.
Definition at line 62 of file state.h.
Referenced by AddEdge(), Cleaner::CleanAll(), Cleaner::DoCleanRule(), Reset(), and RootNodes().
const Rule State::kPhonyRule [static] |
Definition at line 35 of file state.h.
Referenced by Cleaner::CleanAll(), Edge::is_phony(), Edge::LoadDepFile(), and State().
| map<string, const Rule*> State::rules_ |
All the rules used in the graph.
Definition at line 59 of file state.h.
Referenced by AddRule(), and LookupRule().
Definition at line 56 of file state.h.
Referenced by GetNode(), LookupNode(), and Reset().
1.7.5.1