Loading...
Searching...
No Matches
VdfIterator Class Reference

Base class for libVdf iterators. More...

#include <iterator.h>

+ Inheritance diagram for VdfIterator:

Protected Member Functions

 ~VdfIterator ()=default
 Disallow destruction via base class pointers.
 
const VdfNode_GetNode (const VdfContext &context) const
 Returns the current node being run.
 
const VdfExecutorInterface_GetExecutor (const VdfContext &context) const
 Returns the executor for the given context.
 
VDF_API const VdfVector_GetInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 Returns a vector for reading an input value.
 
VDF_API const VdfVector_GetRequiredInputValue (const VdfContext &context, const VdfConnection &connection, const VdfMask &mask) const
 Returns the cached output value for a given output, or issues an error message if a cache value is not available.
 
VDF_API const VdfOutput_GetRequiredOutputForWriting (const VdfContext &context, const TfToken &name) const
 Returns the output for writing based on the name provided.
 
VDF_API VdfVector_GetOutputValueForWriting (const VdfContext &context, const VdfOutput &output) const
 Returns a vector for writing an output value into.
 
VDF_API bool _GetOutputMasks (const VdfContext &context, const VdfOutput &output, const VdfMask **requestMask, const VdfMask **affectsMask) const
 Retrieves the request and affects masks of the given output.
 
VDF_API bool _IsRequiredInput (const VdfContext &context, const VdfConnection &connection) const
 Returns true when the connection is scheduled and required, and false otherwise.
 
VDF_API const VdfMask_GetRequestMask (const VdfContext &context, const VdfOutput &output) const
 Returns the request mask of output, if the output has been scheduled and NULL otherwise.
 
VDF_API void _ForEachScheduledOutput (const VdfContext &context, const VdfNode &node, const VdfScheduledOutputCallback &callback) const
 Loops over each scheduled output of node and calls callback with the output and request mask in an efficient manner.
 

Detailed Description

Base class for libVdf iterators.

Iterators can derive from this class to have access to restricted API from the VdfContext.

Definition at line 35 of file iterator.h.

Constructor & Destructor Documentation

◆ ~VdfIterator()

~VdfIterator ( )
protecteddefault

Disallow destruction via base class pointers.

Member Function Documentation

◆ _ForEachScheduledOutput()

VDF_API void _ForEachScheduledOutput ( const VdfContext context,
const VdfNode node,
const VdfScheduledOutputCallback callback 
) const
protected

Loops over each scheduled output of node and calls callback with the output and request mask in an efficient manner.

◆ _GetExecutor()

const VdfExecutorInterface & _GetExecutor ( const VdfContext context) const
inlineprotected

Returns the executor for the given context.

Definition at line 51 of file iterator.h.

◆ _GetInputValue()

VDF_API const VdfVector * _GetInputValue ( const VdfContext context,
const VdfConnection connection,
const VdfMask mask 
) const
protected

Returns a vector for reading an input value.

This will return NULL if no value is flowing across the given connection, or if the data requested with mask is unavailable.

◆ _GetNode()

const VdfNode & _GetNode ( const VdfContext context) const
inlineprotected

Returns the current node being run.

Definition at line 45 of file iterator.h.

◆ _GetOutputMasks()

VDF_API bool _GetOutputMasks ( const VdfContext context,
const VdfOutput output,
const VdfMask **  requestMask,
const VdfMask **  affectsMask 
) const
protected

Retrieves the request and affects masks of the given output.

Note, that output must be an output on the current node. Returns true if the output is scheduled, and false otherwise.

The requestMask is the mask of the elements requested of a particular output.

The affectsMask is the mask of the elements that are potentially going to be modified by a particular output.

◆ _GetOutputValueForWriting()

VDF_API VdfVector * _GetOutputValueForWriting ( const VdfContext context,
const VdfOutput output 
) const
protected

Returns a vector for writing an output value into.

Note that if this method returns NULL a data entry has not been created for the given output. This is not necessarily an error condition, if for example the output is simply not scheduled.

◆ _GetRequestMask()

VDF_API const VdfMask * _GetRequestMask ( const VdfContext context,
const VdfOutput output 
) const
protected

Returns the request mask of output, if the output has been scheduled and NULL otherwise.

◆ _GetRequiredInputValue()

VDF_API const VdfVector & _GetRequiredInputValue ( const VdfContext context,
const VdfConnection connection,
const VdfMask mask 
) const
protected

Returns the cached output value for a given output, or issues an error message if a cache value is not available.

◆ _GetRequiredOutputForWriting()

VDF_API const VdfOutput * _GetRequiredOutputForWriting ( const VdfContext context,
const TfToken name 
) const
protected

Returns the output for writing based on the name provided.

This returns the associated output of the input named name, if it exists. Otherwise, returns the output name name. If name is the empty token, returns the single output on the current node. Issues a coding error if the required output does not exist.

◆ _IsRequiredInput()

VDF_API bool _IsRequiredInput ( const VdfContext context,
const VdfConnection connection 
) const
protected

Returns true when the connection is scheduled and required, and false otherwise.

Used by special iterators to avoid computing outputs that aren't necessary.


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