12 #ifndef __UN_Iterator_h__
13 #define __UN_Iterator_h__
32 template <
typename HANDLE,
typename ID_ARRAY>
46 : myGraphData( graph_data )
47 , myDataIDs( data_ids )
53 : myGraphData( graph_data )
67 return myCurrent != other.myCurrent
68 || myGraphData != other.myGraphData;
80 return myDataIDs.isValidIndex( myCurrent )
81 ? HANDLE( myGraphData, myDataIDs[ myCurrent ])
88 UN_GraphData * myGraphData;
103 template <
bool IS_SOURCE_ITERATOR>
116 UN_WireIDList &&data_ids,
119 graph_data, std::move(data_ids),
begin)
154 : myGraphData( graph_data )
156 pushChild( node_id );
161 : myGraphData( graph_data )
167 UN_NodeID node_id = popChild();
168 pushChild( node_id );
177 return myNodeIDs.size() != other.myNodeIDs.size()
178 || myGraphData != other.myGraphData;
187 void pushChild( UN_NodeID parent_id );
190 UN_NodeID popChild();
194 UN_GraphData * myGraphData;
197 UN_NodeIDList myNodeIDs;
205 template <
bool CHILD_ONLY>
217 : myGraphData( graph_data )
219 myNodeIDs.append( node_id );
225 : myGraphData( graph_data )
241 return myWireIDs.size() != other.myWireIDs.size()
242 || myGraphData != other.myGraphData;
255 UN_GraphData * myGraphData;
258 UN_WireIDList myWireIDs;
261 UN_NodeIDList myNodeIDs;
UN_Port operator*() const
bool operator!=(const UN_DataArrayIterator &other) const
Comparison operator.
UN_NodeWireIterator(UN_GraphData *graph_data)
Constructor for the end iterator.
std::input_iterator_tag iterator_category
UN_NodeDescendantIterator & operator++()
Increment operator.
std::ptrdiff_t difference_type
UN_DataArrayIterator(UN_GraphData *graph_data, ID_ARRAY &&data_ids, exint begin=0)
Constructor for the start iterator of the given data array.
std::ptrdiff_t difference_type
UN_NodeWireIterator(UN_GraphData *graph_data, UN_NodeID node_id)
Constructor for the start and end iterator for node's wires.
UN_DataArrayIterator(UN_GraphData *graph_data, exint end)
Constructor for the end iterator.
std::input_iterator_tag iterator_category
std::ptrdiff_t difference_type
UN_WireArrayPortIterator(UN_GraphData *graph_data, UN_WireIDList &&data_ids, exint begin=0)
Constructor for the start iterator of the given data array.
IMATH_HOSTDEVICE constexpr Color4< T > operator*(S a, const Color4< T > &v) IMATH_NOEXCEPT
Reverse multiplication: S * Color4.
UN_NodeWireIterator & operator++()
Increment operator.
UN_DataArrayIterator & 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.
HANDLE handle() const
Returns the handle to the current data object.
bool operator!=(const BaseDimensions< T > &a, const BaseDimensions< Y > &b)
UN_NodeDescendantIterator(UN_GraphData *graph_data, UN_NodeID node_id)
Constructor for the start iterator of the given node ancestral tree.
PcpNodeRef_ChildrenIterator begin(const PcpNodeRef::child_const_range &r)
Support for range-based for loops for PcpNodeRef children ranges.