Loading...
Searching...
No Matches
VdfReadIterator< T > Class Template Reference

An iterator that provides read access to input values using a context. More...

#include <readIterator.h>

+ Inheritance diagram for VdfReadIterator< T >:

Public Types

using value_type = const T
 Type of the elements this iterator gives access to.
 
using difference_type = int
 The type used to identify distance between instances of this iterator.
 
using reference = value_type &
 Type of a reference to a value of this iterator.
 
using pointer = value_type *
 Type of a pointer to a value of this iterator.
 
using iterator_category = std::forward_iterator_tag
 The STL category of this iterator type.
 

Public Member Functions

 VdfReadIterator (const VdfContext &context, const TfToken &inputName)
 Constructs a read iterator.
 
bool operator== (const VdfReadIterator &rhs) const
 Returns true if this iterator and rhs compare equal.
 
bool operator!= (const VdfReadIterator &rhs) const
 Returns true if this iterator and rhs do not compare equal.
 
VdfReadIteratoroperator++ ()
 Increment operator to point to the next element.
 
reference operator* () const
 Returns reference to current element.
 
pointer operator-> () const
 Returns pointer to current element.
 
bool IsAtEnd () const
 Returns true if the iterator is done iterating and false otherwise.
 
size_t ComputeSize () const
 Returns the total number of data elements that will be iterated over.
 
void AdvanceToEnd ()
 Advance the iterator to the end.
 

Friends

template<typename >
class VdfSubrangeView
 
int Vdf_GetIteratorIndex (const VdfReadIterator &it)
 
bool Vdf_IsIteratorSourcePool (const VdfReadIterator &it)
 

Additional Inherited Members

- Protected Member Functions inherited from VdfIterator
 ~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

template<typename T>
class VdfReadIterator< T >

An iterator that provides read access to input values using a context.

Note
This is a ForwardIterator with the exception of a missing post-increment operator. The implementation of a post-increment operator would be slower than that of pre-increment and to prevent erroneous use it has been omitted entirely.

Definition at line 38 of file readIterator.h.

Member Typedef Documentation

◆ difference_type

using difference_type = int

The type used to identify distance between instances of this iterator.

Definition at line 48 of file readIterator.h.

◆ iterator_category

using iterator_category = std::forward_iterator_tag

The STL category of this iterator type.

Definition at line 60 of file readIterator.h.

◆ pointer

using pointer = value_type *

Type of a pointer to a value of this iterator.

Definition at line 56 of file readIterator.h.

◆ reference

using reference = value_type &

Type of a reference to a value of this iterator.

Definition at line 52 of file readIterator.h.

◆ value_type

using value_type = const T

Type of the elements this iterator gives access to.

Definition at line 44 of file readIterator.h.

Constructor & Destructor Documentation

◆ VdfReadIterator()

VdfReadIterator ( const VdfContext context,
const TfToken inputName 
)

Constructs a read iterator.

Definition at line 177 of file readIterator.h.

Member Function Documentation

◆ AdvanceToEnd()

void AdvanceToEnd

Advance the iterator to the end.

Definition at line 315 of file readIterator.h.

◆ ComputeSize()

size_t ComputeSize

Returns the total number of data elements that will be iterated over.

Definition at line 267 of file readIterator.h.

◆ IsAtEnd()

bool IsAtEnd ( ) const
inline

Returns true if the iterator is done iterating and false otherwise.

Definition at line 95 of file readIterator.h.

◆ operator!=()

bool operator!= ( const VdfReadIterator< T > &  rhs) const
inline

Returns true if this iterator and rhs do not compare equal.

Definition at line 72 of file readIterator.h.

◆ operator*()

reference operator* ( ) const
inline

Returns reference to current element.

Calling this on an iterator that IsAtEnd() is invalid and will lead to undefined behavior.

Definition at line 84 of file readIterator.h.

◆ operator++()

VdfReadIterator< T > & operator++

Increment operator to point to the next element.

Calling this on an iterator that IsAtEnd() is invalid and will lead to undefined behavior.

Definition at line 239 of file readIterator.h.

◆ operator->()

VdfReadIterator< T >::pointer operator->

Returns pointer to current element.

Calling this on an iterator that IsAtEnd() is invalid and will lead to undefined behavior.

Definition at line 256 of file readIterator.h.

◆ operator==()

bool operator== ( const VdfReadIterator< T > &  rhs) const

Returns true if this iterator and rhs compare equal.

Definition at line 228 of file readIterator.h.

Friends And Related Function Documentation

◆ Vdf_GetIteratorIndex

int Vdf_GetIteratorIndex ( const VdfReadIterator< T > &  it)
friend

Definition at line 122 of file readIterator.h.

◆ Vdf_IsIteratorSourcePool

bool Vdf_IsIteratorSourcePool ( const VdfReadIterator< T > &  it)
friend

Definition at line 127 of file readIterator.h.

◆ VdfSubrangeView

friend class VdfSubrangeView
friend

Definition at line 110 of file readIterator.h.


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