Ninja
Public Member Functions | Public Attributes
Edge Struct Reference

An edge in the dependency graph; links between Nodes using Rules. More...

#include <graph.h>

List of all members.

Public Member Functions

bool AllInputsReady () const
 Return true if all inputs' in-edges are ready.
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.
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
Poolpool () const
const Rulerule () const
int weight () const

Public Attributes

bool deps_missing_
BindingEnvenv_
int implicit_deps_
vector< Node * > inputs_
int order_only_deps_
vector< Node * > outputs_
bool outputs_ready_
Poolpool_
const Rulerule_

Detailed Description

An edge in the dependency graph; links between Nodes using Rules.

Definition at line 137 of file graph.h.


Constructor & Destructor Documentation

Edge::Edge ( ) [inline]

Definition at line 138 of file graph.h.


Member Function Documentation

bool Edge::AllInputsReady ( ) const

Return true if all inputs' in-edges are ready.

Definition at line 207 of file graph.cc.

References inputs_.

Referenced by Plan::AddSubTarget().

void Edge::Dump ( const char *  prefix = "") const

Definition at line 286 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 267 of file graph.cc.

References GetBinding().

Referenced by BuildStatus::BuildEdgeFinished(), DependencyScan::RecomputeOutputsDirty(), BuildLog::RecordCommand(), FakeCommandRunner::StartCommand(), RealCommandRunner::StartCommand(), Builder::StartEdge(), and TEST_F().

string Edge::GetBinding ( const string &  key)
bool Edge::GetBindingBool ( const string &  key)

Definition at line 282 of file graph.cc.

References GetBinding().

Referenced by Builder::FinishCommand(), and DependencyScan::RecomputeOutputDirty().

bool Edge::is_implicit ( size_t  index) [inline]

Definition at line 177 of file graph.h.

Referenced by TEST_F().

bool Edge::is_order_only ( size_t  index) [inline]

Definition at line 181 of file graph.h.

Referenced by GraphViz::AddTarget(), DependencyScan::RecomputeDirty(), and TEST_F().

bool Edge::is_phony ( ) const
bool Edge::outputs_ready ( ) const [inline]

Definition at line 165 of file graph.h.

Referenced by Plan::AddSubTarget().

Pool* Edge::pool ( ) const [inline]

Definition at line 163 of file graph.h.

Referenced by Plan::ResumeDelayedJobs(), and Plan::ScheduleWork().

const Rule& Edge::rule ( ) const [inline]

Definition at line 162 of file graph.h.

Referenced by FakeCommandRunner::StartCommand(), and FakeCommandRunner::WaitForCommand().

int Edge::weight ( ) const [inline]

Member Data Documentation

Definition at line 160 of file graph.h.

Referenced by DependencyScan::RecomputeDirty().

Definition at line 158 of file graph.h.

Referenced by State::AddEdge(), EdgeEnv::LookupVariable(), and ManifestParser::ParseEdge().

vector<Node*> Edge::inputs_
vector<Node*> Edge::outputs_

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().


The documentation for this struct was generated from the following files: