![]() |
|
The leaf node indexer tracks leaf nodes added and removed from the network, and associates each leaf node with a unique index. More...
#include <leafNodeIndexer.h>
Public Types | |
| using | Index = uint32_t |
| Data type of the index. | |
Public Member Functions | |
| size_t | GetCapacity () const |
| Returns the capacity of the indexer, i.e. | |
| Index | GetIndex (const VdfNode &node) const |
Returns an index for a given leaf node. | |
| const VdfNode * | GetNode (Index index) const |
Returns the node for a given index. | |
| const VdfOutput * | GetSourceOutput (Index index) const |
Returns the output a given leaf node index is sourcing data from. | |
| const VdfMask * | GetSourceMask (Index index) const |
Returns the mask at the output a given leaf node index is sourcing data from. | |
| void | Invalidate () |
| Invalidate the entire cache. | |
| void | DidDisconnect (const VdfConnection &connection) |
| Call this to notify the cache of connections that have been deleted. | |
| void | DidConnect (const VdfConnection &connection) |
| Call this to notify the cache of newly added connections. | |
Static Public Attributes | |
| static constexpr Index | InvalidIndex = Index(-1) |
| Sentinel for an invalid index. | |
The leaf node indexer tracks leaf nodes added and removed from the network, and associates each leaf node with a unique index.
The indexer also maintains a list of the source outputs, each individual leaf node is connected to. The size of the index space is relative to the number of leaf nodes, rather than all nodes in the network.
Definition at line 34 of file leafNodeIndexer.h.
| using Index = uint32_t |
Data type of the index.
Definition at line 39 of file leafNodeIndexer.h.
| void DidConnect | ( | const VdfConnection & | connection | ) |
Call this to notify the cache of newly added connections.
| void DidDisconnect | ( | const VdfConnection & | connection | ) |
Call this to notify the cache of connections that have been deleted.
|
inline |
Returns the capacity of the indexer, i.e.
the high water mark of tracked leaf nodes.
Definition at line 48 of file leafNodeIndexer.h.
|
inline |
Returns an index for a given leaf node.
Returns InvalidIndex if no such index exists.
Definition at line 117 of file leafNodeIndexer.h.
Returns the node for a given index.
Returns nullptr if no such node exists.
Definition at line 60 of file leafNodeIndexer.h.
Returns the mask at the output a given leaf node index is sourcing data from.
Returns nullptr if no such mask exists.
Definition at line 74 of file leafNodeIndexer.h.
Returns the output a given leaf node index is sourcing data from.
Returns nullptr if no such output exists.
Definition at line 67 of file leafNodeIndexer.h.
| void Invalidate | ( | ) |
Invalidate the entire cache.
Sentinel for an invalid index.
Definition at line 43 of file leafNodeIndexer.h.