Ninja
|
An edge in the dependency graph; links between Nodes using Rules. More...
#include <graph.h>
Public Member Functions | |
bool | AllInputsReady () const |
Return true if all inputs' in-edges are ready. More... | |
void | Dump (const char *prefix="") const |
Edge () | |
string | EvaluateCommand (bool incl_rsp_file=false) |
Expand all variables in a command and return it as a string. More... | |
string | GetBinding (const string &key) |
bool | GetBindingBool (const string &key) |
bool | is_implicit (size_t index) |
bool | is_order_only (size_t index) |
bool | is_phony () const |
bool | outputs_ready () const |
Pool * | pool () const |
const Rule & | rule () const |
int | weight () const |
Public Attributes | |
BindingEnv * | env_ |
int | implicit_deps_ |
vector< Node * > | inputs_ |
int | order_only_deps_ |
vector< Node * > | outputs_ |
bool | outputs_ready_ |
Pool * | pool_ |
const Rule * | rule_ |
An edge in the dependency graph; links between Nodes using Rules.
bool Edge::AllInputsReady | ( | ) | const |
Return true if all inputs' in-edges are ready.
Definition at line 214 of file graph.cc.
References inputs_.
Referenced by Plan::AddSubTarget().
void Edge::Dump | ( | const char * | prefix = "" | ) | const |
Definition at line 293 of file graph.cc.
References inputs_, Pool::name(), Rule::name(), outputs_, pool_, and rule_.
Referenced by Node::Dump().
string Edge::EvaluateCommand | ( | bool | incl_rsp_file = false | ) |
Expand all variables in a command and return it as a string.
If incl_rsp_file is enabled, the string will also contain the full contents of a response file (if applicable)
Definition at line 274 of file graph.cc.
References GetBinding().
Referenced by BuildStatus::BuildEdgeFinished(), DependencyScan::RecomputeDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), RealCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
string Edge::GetBinding | ( | const string & | key | ) |
Definition at line 284 of file graph.cc.
References EdgeEnv::LookupVariable().
Referenced by EvaluateCommand(), Builder::ExtractDeps(), Builder::FinishCommand(), GetBindingBool(), ImplicitDepLoader::LoadDeps(), ManifestParser::ParseEdge(), BuildStatus::PrintStatus(), Cleaner::RemoveEdgeFiles(), Builder::StartEdge(), and TEST_F().
bool Edge::GetBindingBool | ( | const string & | key | ) |
Definition at line 289 of file graph.cc.
References GetBinding().
Referenced by Builder::FinishCommand(), and DependencyScan::RecomputeOutputDirty().
|
inline |
|
inline |
Definition at line 180 of file graph.h.
Referenced by GraphViz::AddTarget(), DependencyScan::RecomputeDirty(), and TEST_F().
bool Edge::is_phony | ( | ) | const |
Definition at line 314 of file graph.cc.
References State::kPhonyRule, and rule_.
Referenced by Plan::AddSubTarget(), Builder::Build(), DependencyScan::RecomputeDirty(), DependencyScan::RecomputeOutputDirty(), and Builder::StartEdge().
|
inline |
Definition at line 164 of file graph.h.
Referenced by Plan::AddSubTarget().
|
inline |
Definition at line 162 of file graph.h.
Referenced by Plan::ResumeDelayedJobs(), and Plan::ScheduleWork().
|
inline |
Definition at line 161 of file graph.h.
Referenced by FakeCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().
|
inline |
Definition at line 163 of file graph.h.
Referenced by Pool::EdgeFinished(), Pool::EdgeScheduled(), Pool::RetrieveReadyEdges(), and Pool::WeightedEdgeCmp().
BindingEnv* Edge::env_ |
Definition at line 158 of file graph.h.
Referenced by State::AddEdge(), EdgeEnv::LookupVariable(), and ManifestParser::ParseEdge().
int Edge::implicit_deps_ |
Definition at line 174 of file graph.h.
Referenced by EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), and TEST_F().
vector<Node*> Edge::inputs_ |
Definition at line 156 of file graph.h.
Referenced by State::AddIn(), Plan::AddSubTarget(), GraphViz::AddTarget(), AllInputsReady(), Dump(), Builder::FinishCommand(), EdgeEnv::LookupVariable(), ImplicitDepLoader::PreallocateSpace(), DependencyScan::RecomputeDirty(), DependencyScan::RecomputeOutputDirty(), and TEST_F().
int Edge::order_only_deps_ |
Definition at line 175 of file graph.h.
Referenced by Builder::FinishCommand(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), ImplicitDepLoader::PreallocateSpace(), and TEST_F().
vector<Node*> Edge::outputs_ |
Definition at line 157 of file graph.h.
Referenced by State::AddOut(), GraphViz::AddTarget(), ImplicitDepLoader::CreatePhonyInEdge(), Dump(), Plan::EdgeFinished(), PlanTest::FindWorkSorted(), Builder::FinishCommand(), ImplicitDepLoader::LoadDepFile(), ImplicitDepLoader::LoadDeps(), ImplicitDepLoader::LoadDepsFromLog(), EdgeEnv::LookupVariable(), ManifestParser::ParseEdge(), DependencyScan::RecomputeDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().
bool Edge::outputs_ready_ |
Definition at line 159 of file graph.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge(), Plan::EdgeFinished(), and DependencyScan::RecomputeDirty().
Pool* Edge::pool_ |
Definition at line 155 of file graph.h.
Referenced by State::AddEdge(), Dump(), and ManifestParser::ParseEdge().
const Rule* Edge::rule_ |
Definition at line 154 of file graph.h.
Referenced by State::AddEdge(), GraphViz::AddTarget(), Dump(), is_phony(), and EdgeEnv::LookupVariable().