|
Ninja
|
Global state (file status) for a single run. More...
#include <state.h>
Public Types | |
| typedef ExternalStringHashMap< Node * >::Type | Paths |
| Mapping of path -> Node. More... | |
Public Member Functions | |
| bool | AddDefault (StringPiece path, std::string *error) |
| Edge * | AddEdge (const Rule *rule) |
| void | AddIn (Edge *edge, StringPiece path, uint64_t slash_bits) |
| bool | AddOut (Edge *edge, StringPiece path, uint64_t slash_bits) |
| void | AddPool (Pool *pool) |
| void | AddValidation (Edge *edge, StringPiece path, uint64_t slash_bits) |
| std::vector< Node * > | DefaultNodes (std::string *error) const |
| void | Dump () |
| Dump the nodes and Pools (useful for debugging). More... | |
| Node * | GetNode (StringPiece path, uint64_t slash_bits) |
| Node * | LookupNode (StringPiece path) const |
| Pool * | LookupPool (const std::string &pool_name) |
| void | Reset () |
| Reset state. More... | |
| std::vector< Node * > | RootNodes (std::string *error) const |
| Node * | SpellcheckNode (const std::string &path) |
| State () | |
Public Attributes | |
| BindingEnv | bindings_ |
| std::vector< Node * > | defaults_ |
| std::vector< Edge * > | edges_ |
| All the edges of the graph. More... | |
| Paths | paths_ |
| std::map< std::string, Pool * > | pools_ |
| All the pools used in the graph. More... | |
Static Public Attributes | |
| static Pool | kConsolePool |
| static Pool | kDefaultPool |
| static const Rule | kPhonyRule |
| typedef ExternalStringHashMap<Node*>::Type State::Paths |
| bool State::AddDefault | ( | StringPiece | path, |
| std::string * | error | ||
| ) |
Definition at line 150 of file state.cc.
References StringPiece::AsString().
Referenced by ManifestParser::ParseDefault().
Definition at line 86 of file state.cc.
References Edge::env_, Edge::id_, kDefaultPool, Edge::pool_, and Edge::rule_.
Referenced by MissingDependencyScannerTest::CreateInitialState(), and ManifestParser::ParseEdge().
| void State::AddIn | ( | Edge * | edge, |
| StringPiece | path, | ||
| uint64_t | slash_bits | ||
| ) |
Definition at line 129 of file state.cc.
References Node::AddOutEdge(), and Edge::inputs_.
Referenced by MissingDependencyScannerTest::CreateGraphDependencyBetween(), and ManifestParser::ParseEdge().
| bool State::AddOut | ( | Edge * | edge, |
| StringPiece | path, | ||
| uint64_t | slash_bits | ||
| ) |
Definition at line 135 of file state.cc.
References Node::in_edge(), Edge::outputs_, and Node::set_in_edge().
Referenced by MissingDependencyScannerTest::CreateInitialState(), and ManifestParser::ParseEdge().
| void State::AddPool | ( | Pool * | pool | ) |
Definition at line 74 of file state.cc.
References Pool::name().
Referenced by ManifestParser::ParsePool().
| void State::AddValidation | ( | Edge * | edge, |
| StringPiece | path, | ||
| uint64_t | slash_bits | ||
| ) |
Definition at line 144 of file state.cc.
References Node::AddValidationOutEdge(), and Edge::validations_.
Referenced by ManifestParser::ParseEdge().
| vector< Node * > State::DefaultNodes | ( | std::string * | error | ) | const |
| void State::Dump | ( | ) |
Dump the nodes and Pools (useful for debugging).
Definition at line 192 of file state.cc.
References Node::dirty(), Node::id(), Node::path(), and Node::status_known().
| Node * State::GetNode | ( | StringPiece | path, |
| uint64_t | slash_bits | ||
| ) |
Definition at line 96 of file state.cc.
References StringPiece::AsString(), and Node::path().
Referenced by Builder::ExtractDeps(), DepsLog::Load(), DyndepParser::ParseEdge(), ManifestParser::ParseEdge(), and TEST_F().
| Node * State::LookupNode | ( | StringPiece | path | ) | const |
Definition at line 105 of file state.cc.
Referenced by MissingDependencyScannerTest::AssertMissingDependencyBetween(), Cleaner::CleanDead(), Cleaner::CleanTarget(), Cleaner::CleanTargets(), MissingDependencyScannerTest::CreateGraphDependencyBetween(), DyndepParser::ParseEdge(), and MissingDependencyScannerTest::RecordDepsLogDep().
| Pool * State::LookupPool | ( | const std::string & | pool_name | ) |
Definition at line 79 of file state.cc.
Referenced by ManifestParser::ParseEdge(), ManifestParser::ParsePool(), and TEST_F().
| void State::Reset | ( | ) |
Reset state.
Keeps all nodes and edges, but restores them to the state where we haven't yet examined the disk for dirty state.
Definition at line 182 of file state.cc.
References Edge::VisitNone.
Referenced by TestPhonyUseCase().
| vector< Node * > State::RootNodes | ( | std::string * | error | ) | const |
| error | where to write the error message if somethings went wrong. |
Definition at line 160 of file state.cc.
Referenced by MissingDependencyScannerTest::ProcessAllNodes().
| Node * State::SpellcheckNode | ( | const std::string & | path | ) |
Definition at line 112 of file state.cc.
References EditDistance().
| BindingEnv State::bindings_ |
Definition at line 135 of file state.h.
Referenced by Cleaner::CleanRule(), Cleaner::CleanRules(), and ManifestParser::ManifestParser().
| std::vector<Edge*> State::edges_ |
All the edges of the graph.
Definition at line 133 of file state.h.
Referenced by Cleaner::CleanAll(), Cleaner::DoCleanRule(), Cleaner::LoadDyndeps(), LoadManifests(), ManifestParser::ParseEdge(), TEST_F(), VerifyGraph(), and WriteTestData().
|
static |
Definition at line 94 of file state.h.
Referenced by Edge::use_console().
|
static |
Definition at line 95 of file state.h.
Referenced by ImplicitDepLoader::CreatePhonyInEdge(), and Edge::is_phony().
| Paths State::paths_ |
Definition at line 127 of file state.h.
Referenced by VerifyGraph().
| std::map<std::string, Pool*> State::pools_ |
1.8.14