HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ef_LeafNodeIndexer Class Reference

#include <leafNodeIndexer.h>

Public Types

using Index = uint32_t
 

Public Member Functions

size_t GetCapacity () const
 
Index GetIndex (const VdfNode &node) const
 
const VdfNodeGetNode (Index index) const
 
const VdfOutputGetSourceOutput (Index index) const
 
const VdfMaskGetSourceMask (Index index) const
 
void Invalidate ()
 
void DidDisconnect (const VdfConnection &connection)
 
void DidConnect (const VdfConnection &connection)
 

Static Public Attributes

static constexpr Index InvalidIndex = Index(-1)
 

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

using Ef_LeafNodeIndexer::Index = uint32_t

Data type of the index.

Definition at line 39 of file leafNodeIndexer.h.

Member Function Documentation

void Ef_LeafNodeIndexer::DidConnect ( const VdfConnection connection)

Call this to notify the cache of newly added connections.

Note
It is safe to call DidDisconnect() and DidConnect() concurrently.
void Ef_LeafNodeIndexer::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.
size_t Ef_LeafNodeIndexer::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.

Ef_LeafNodeIndexer::Index Ef_LeafNodeIndexer::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.

const VdfNode* Ef_LeafNodeIndexer::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.

const VdfMask* Ef_LeafNodeIndexer::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.

const VdfOutput* Ef_LeafNodeIndexer::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.

void Ef_LeafNodeIndexer::Invalidate ( )

Invalidate the entire cache.

Member Data Documentation

constexpr Index Ef_LeafNodeIndexer::InvalidIndex = Index(-1)
static

Sentinel for an invalid index.

Definition at line 43 of file leafNodeIndexer.h.


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