7 #ifndef PXR_EXEC_VDF_READ_ITERATOR_H
8 #define PXR_EXEC_VDF_READ_ITERATOR_H
96 return _connectionIndex == -1;
119 unsigned int boxedIndex);
123 return *it._iterator + it._boxedIndex;
129 (*it._input)[it._connectionIndex].GetSourceOutput());
136 bool _SetCurrentConnection(
int connectionIndex);
142 bool _SetCurrentBoxedIndex(
unsigned int boxedIndex);
151 bool _AdvanceConnection(
int connectionIndex);
161 int _connectionIndex;
164 unsigned int _boxedIndex;
181 _input(_GetNode(context).GetInput(inputName)),
182 _connectionIndex(-1),
193 if (!_AdvanceConnection(-1)) {
203 unsigned int boxedIndex) :
205 _input(_GetNode(context).GetInput(inputName)),
206 _connectionIndex(-1),
212 connectionIndex < 0 ||
220 if (!_AdvanceConnection(connectionIndex - 1) ||
221 !_SetCurrentBoxedIndex(boxedIndex)) {
231 _input == rhs._input &&
232 _connectionIndex == rhs._connectionIndex &&
233 _boxedIndex == rhs._boxedIndex &&
234 _iterator == rhs._iterator;
259 const size_t idx = *_iterator + _boxedIndex;
262 return &_accessor[idx];
270 if (!_input || _input->GetNumConnections() == 0) {
275 if (_input->GetNumConnections() == 1 && _accessor.IsBoxed()) {
276 return _accessor.GetNumValues();
281 for (
const VdfConnection *connection : _input->GetConnections()) {
291 if (_IsRequiredInput(*_context, *connection)) {
294 _GetInputValue(*_context, *connection, mask)) {
296 v->template GetReadAccessor<T>();
317 _connectionIndex = -1;
326 const VdfConnection &connection = (*_input)[connectionIndex];
330 _connectionIndex = connectionIndex;
332 _iterator = mask.
begin();
339 if (!_IsRequiredInput(*_context, connection)) {
344 const VdfVector *
data = _GetInputValue(*_context, connection, mask);
351 if (!_accessor.GetNumValues()) {
356 return !_iterator.IsAtEnd();
365 if (boxedIndex >= _accessor.GetNumValues()) {
366 return _AdvanceConnection(_connectionIndex);
370 _boxedIndex = boxedIndex;
382 if (_accessor.IsBoxed()) {
387 if (_boxedIndex >= _accessor.GetNumValues()) {
388 return _AdvanceConnection(_connectionIndex);
398 if (_iterator.IsAtEnd()) {
399 return _AdvanceConnection(_connectionIndex);
413 const int numConnections = _input->GetNumConnections();
414 for (
int i = connectionIndex + 1; i < numConnections; ++i) {
418 if (_SetCurrentConnection(i)) {
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
#define PXR_NAMESPACE_OPEN_SCOPE
VdfReadIterator(const VdfContext &context, const TfToken &inputName)
size_t ComputeSize() const
A VdfMask is placed on connections to specify the data flowing through them.
reference operator*() const
VdfReadIterator & operator++()
#define TF_DEV_AXIOM(cond)
pointer operator->() const
bool Vdf_IsPoolOutput(const VdfOutput &output)
friend bool Vdf_IsIteratorSourcePool(const VdfReadIterator &it)
std::forward_iterator_tag iterator_category
ReadAccessor< TYPE > GetReadAccessor() const
#define PXR_NAMESPACE_CLOSE_SCOPE
bool operator!=(const VdfReadIterator &rhs) const
bool operator==(const VdfReadIterator &rhs) const
size_t GetNumValues() const
const VdfMask & GetMask() const
Returns the mask for this connection.
friend int Vdf_GetIteratorIndex(const VdfReadIterator &it)