12 #ifndef __UN_Iterator_h__
13 #define __UN_Iterator_h__
32 template <
typename HANDLE,
typename INDEX_ARRAY,
typename ID_ARRAY>
44 INDEX_ARRAY &&data_indices,
47 : myGraphData( graph_data )
48 , myDataIndices( data_indices )
49 , myDataIDs( data_ids )
55 : myGraphData( graph_data )
69 return myCurrent != other.myCurrent
70 || myGraphData != other.myGraphData;
82 return myDataIndices.isValidIndex( myCurrent )
83 ? HANDLE( myGraphData,
84 myDataIndices[ myCurrent ], myDataIDs[ myCurrent ])
91 UN_GraphData * myGraphData;
94 INDEX_ARRAY myDataIndices;
109 template <
bool IS_SOURCE_ITERATOR>
126 graph_data, std::move(data_indices), std::move(data_ids),
begin)
163 : myGraphData( graph_data )
165 pushChildData( node_index, node_id );
170 : myGraphData( graph_data )
179 popData( node_index, node_id );
180 pushChildData( node_index, node_id );
189 return myDataIndices.size() != other.myDataIndices.
size()
190 || myGraphData != other.myGraphData;
205 UN_GraphData * myGraphData;
219 template <
bool CHILD_ONLY>
235 : myGraphData( graph_data )
236 , myNodeIndex( node_index )
237 , myNodeID( node_id )
241 if( !isCurrentValid() )
255 return myCurrent != other.myCurrent
256 || myGraphData != other.myGraphData;
264 bool isCurrentValid()
const;
271 UN_GraphData * myGraphData;
UN_WireArrayPortIterator(UN_GraphData *graph_data, UN_WireIndexArray &&data_indices, UN_WireIDArray &&data_ids, exint begin=0)
Constructor for the start iterator of the given data array.
UN_NodeWireIterator(UN_GraphData *graph_data, UN_NodeIndex node_index, UN_NodeID node_id, UN_WireIndex index, UN_WireIndex end)
Constructor for the start and end iterator for node's wires.
UN_Port operator*() const
std::ptrdiff_t difference_type
UN_NodeDescendantIterator & operator++()
Increment operator.
HANDLE handle() const
Returns the handle to the current data object.
UN_DataArrayIterator(UN_GraphData *graph_data, INDEX_ARRAY &&data_indices, ID_ARRAY &&data_ids, exint begin=0)
Constructor for the start iterator of the given data array.
std::ptrdiff_t difference_type
std::input_iterator_tag iterator_category
std::input_iterator_tag iterator_category
std::ptrdiff_t difference_type
IMATH_HOSTDEVICE constexpr Color4< T > operator*(S a, const Color4< T > &v) IMATH_NOEXCEPT
Reverse multiplication: S * Color4.
UN_NodeWireIterator & operator++()
Increment operator.
UN_NodeDescendantIterator(UN_GraphData *graph_data)
Constructor for the end iterator.
UN_WireArrayPortIterator(UN_GraphData *graph_data, exint end)
Constructor for the end iterator.
std::input_iterator_tag iterator_category
std::ptrdiff_t difference_type
std::input_iterator_tag iterator_category
HANDLE operator*() const
Dereferencing operator, returns the handle to the current data object.
UN_NodeDescendantIterator(UN_GraphData *graph_data, UN_NodeIndex node_index, UN_NodeID node_id)
Constructor for the start iterator of the given node ancestral tree.
UN_DataArrayIterator(UN_GraphData *graph_data, exint end)
Constructor for the end iterator.
UN_DataArrayIterator & operator++()
Increment operator.
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
bool operator!=(const UN_DataArrayIterator &other) const
Comparison operator.
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.