Loading...
Searching...
No Matches
Ef_LeafNodeIndexer Class Reference

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 VdfNodeGetNode (Index index) const
 Returns the node for a given index.
 
const VdfOutputGetSourceOutput (Index index) const
 Returns the output a given leaf node index is sourcing data from.
 
const VdfMaskGetSourceMask (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.
 

Detailed Description

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.

Member Typedef Documentation

◆ Index

using Index = uint32_t

Data type of the index.

Definition at line 39 of file leafNodeIndexer.h.

Member Function Documentation

◆ DidConnect()

void DidConnect ( const VdfConnection connection)

Call this to notify the cache of newly added connections.

Note
It is safe to call DidDisconnect() and DidConnect() concurrently.

◆ DidDisconnect()

void DidDisconnect ( const VdfConnection connection)

Call this to notify the cache of connections that have been deleted.

Note
It is safe to call DidDisconnect() and DidConnect() concurrently.

◆ GetCapacity()

size_t GetCapacity ( ) const
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.

◆ GetIndex()

Ef_LeafNodeIndexer::Index GetIndex ( const VdfNode node) const
inline

Returns an index for a given leaf node.

Returns InvalidIndex if no such index exists.

Definition at line 117 of file leafNodeIndexer.h.

◆ GetNode()

const VdfNode * GetNode ( Index  index) const
inline

Returns the node for a given index.

Returns nullptr if no such node exists.

Definition at line 60 of file leafNodeIndexer.h.

◆ GetSourceMask()

const VdfMask * GetSourceMask ( Index  index) const
inline

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.

◆ GetSourceOutput()

const VdfOutput * GetSourceOutput ( Index  index) const
inline

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.

◆ Invalidate()

void Invalidate ( )

Invalidate the entire cache.

Member Data Documentation

◆ InvalidIndex

constexpr Index InvalidIndex = Index(-1)
staticconstexpr

Sentinel for an invalid index.

Definition at line 43 of file leafNodeIndexer.h.


The documentation for this class was generated from the following file: