15 #ifndef NINJA_STATE_H_
16 #define NINJA_STATE_H_
40 explicit Pool(
const string& name,
int depth)
41 : name_(name), current_use_(0), depth_(depth), delayed_(&WeightedEdgeCmp) { }
45 int depth()
const {
return depth_; }
46 const string&
name()
const {
return name_; }
53 void EdgeScheduled(
const Edge& edge);
57 void EdgeFinished(
const Edge& edge);
60 void DelayEdge(
Edge* edge);
63 void RetrieveReadyEdges(set<Edge*>* ready_queue);
76 static bool WeightedEdgeCmp(
const Edge* a,
const Edge* b);
89 void AddRule(
const Rule* rule);
90 const Rule* LookupRule(
const string& rule_name);
92 void AddPool(
Pool* pool);
93 Pool* LookupPool(
const string& pool_name);
99 Node* SpellcheckNode(
const string& path);
114 vector<Node*> RootNodes(
string* error);
115 vector<Node*> DefaultNodes(
string* error);
134 #endif // NINJA_STATE_H_
Pool(const string &name, int depth)
vector< Edge * > edges_
All the edges of the graph.
StringPiece represents a slice of a string whose memory is managed externally.
Information about a node in the dependency graph: the file, whether it's dirty, mtime, etc.
bool ShouldDelayEdge() const
true if the Pool might delay this edge
vector< Node * > defaults_
An edge in the dependency graph; links between Nodes using Rules.
An Env which contains a mapping of variables to values as well as a pointer to a parent scope...
An invokable build command and associated metadata (description, etc.).
A template for hash_maps keyed by a StringPiece whose string is owned externally (typically by the va...
A pool for delayed edges.
const string & name() const
set< Edge *, bool(*)(const Edge *, const Edge *)> DelayedEdges
ExternalStringHashMap< Node * >::Type Paths
Mapping of path -> Node.
Global state (file status, loaded rules) for a single run.
map< string, Pool * > pools_
All the pools used in the graph.
map< string, const Rule * > rules_
All the rules used in the graph.
int current_use_
|current_use_| is the total of the weights of the edges which are currently scheduled in the Plan (i...
static const Rule kPhonyRule