|
HDK
|
#include <dependencyCache.h>
Public Types | |
| using | PredicateFunction = bool(*)(const VdfNode &node, VdfOutputToMaskMap *, std::vector< const VdfNode * > *) |
Public Member Functions | |
| EF_API | EfDependencyCache (PredicateFunction predicate) |
| EF_API | ~EfDependencyCache () |
| EF_API const VdfOutputToMaskMap & | FindOutputs (const VdfMaskedOutputVector &outputs, bool updateIncrementally) const |
| EF_API const std::vector < const VdfNode * > & | FindNodes (const VdfMaskedOutputVector &outputs, bool updateIncrementally) const |
| EF_API void | Invalidate () |
| EF_API void | WillDeleteConnection (const VdfConnection &connection) |
| EF_API void | DidConnect (const VdfConnection &connection) |
Caches output traversals by associating an input request with a set of stored output dependencies, as determined by a predicate function.
The traversals in this cache are invalidated by calling the WillDeleteConnection and DidConnect methods in response to network edits (WillDeleteNode, WillDeleteConnection, DidConnect). Invalidation is optionally sparse, depending on the value of the updateIncrementally flag passed to FindOutputs and FindNodes.
Definition at line 44 of file dependencyCache.h.
| using EfDependencyCache::PredicateFunction = bool (*) ( const VdfNode &node, VdfOutputToMaskMap *, std::vector<const VdfNode *> *) |
The predicate function that determines the cached dependencies.
Takes the node currently being visited, as well as a result map to insert output and node dependencies into.
Returns false in order to stop the traversal at the current branch, and true to continue.
Definition at line 59 of file dependencyCache.h.
|
explicit |
Constructor.
| EF_API EfDependencyCache::~EfDependencyCache | ( | ) |
Destructor.
| EF_API void EfDependencyCache::DidConnect | ( | const VdfConnection & | connection | ) |
Invalidate all traversals dependent on this new connection.
| EF_API const std::vector<const VdfNode *>& EfDependencyCache::FindNodes | ( | const VdfMaskedOutputVector & | outputs, |
| bool | updateIncrementally | ||
| ) | const |
Find the node dependencies associated with the given request.
Set updateIncrementally to true for cached dependencies that should be sparsely invalidated and updated incrementally.
| EF_API const VdfOutputToMaskMap& EfDependencyCache::FindOutputs | ( | const VdfMaskedOutputVector & | outputs, |
| bool | updateIncrementally | ||
| ) | const |
Find the output dependencies associated with the given request.
Set updateIncrementally to true for cached dependencies that should be sparsely invalidated and updated incrementally.
Note that the masks here may sometimes be empty, to signify that an output mask couldn't be inferred for that output. If an output is returned with an empty mask, that output is reachable from the provided outputs but the mask associated with the traversal is unknown.
Invalidate all cached dependencies.
| EF_API void EfDependencyCache::WillDeleteConnection | ( | const VdfConnection & | connection | ) |
Invalidate all traversals dependent on this connection.