15 #ifndef NINJA_STATE_H_ 16 #define NINJA_STATE_H_ 79 typedef std::set<Edge*,bool(*)(const Edge*, const Edge*)>
DelayedEdges;
113 std::vector<Node*>
RootNodes(std::string* error)
const;
114 std::vector<Node*>
DefaultNodes(std::string* error)
const;
130 #endif // NINJA_STATE_H_
bool AddDefault(StringPiece path, std::string *error)
void RetrieveReadyEdges(std::set< Edge *> *ready_queue)
Pool will add zero or more edges to the ready_queue.
Node * SpellcheckNode(const std::string &path)
std::map< std::string, Pool * > pools_
All the pools used in the graph.
void EdgeScheduled(const Edge &edge)
informs this Pool that the given edge is committed to be run.
Node * GetNode(StringPiece path, uint64_t slash_bits)
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.
void AddIn(Edge *edge, StringPiece path, uint64_t slash_bits)
An edge in the dependency graph; links between Nodes using Rules.
Node * LookupNode(StringPiece path) const
std::set< Edge *, bool(*)(const Edge *, const Edge *)> DelayedEdges
std::vector< Node * > RootNodes(std::string *error) const
Edge * AddEdge(const Rule *rule)
An Env which contains a mapping of variables to values as well as a pointer to a parent scope...
bool AddOut(Edge *edge, StringPiece path, uint64_t slash_bits)
void Dump()
Dump the nodes and Pools (useful for debugging).
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...
void Dump() const
Dump the Pool and its edges (useful for debugging).
void DelayEdge(Edge *edge)
adds the given edge to this Pool to be delayed.
A pool for delayed edges.
bool ShouldDelayEdge() const
true if the Pool might delay this edge
Pool * LookupPool(const std::string &pool_name)
ExternalStringHashMap< Node * >::Type Paths
Mapping of path -> Node.
std::vector< Node * > DefaultNodes(std::string *error) const
static bool WeightedEdgeCmp(const Edge *a, const Edge *b)
void EdgeFinished(const Edge &edge)
informs this Pool that the given edge is no longer runnable, and should relinquish its resources back...
Global state (file status) for a single run.
unsigned long long uint64_t
std::vector< Edge * > edges_
All the edges of the graph.
Pool(const std::string &name, int depth)
const std::string & name() const
std::vector< Node * > defaults_
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