11 #ifndef __UT_OrderedIterator__
12 #define __UT_OrderedIterator__
25 template <
typename T,
typename ITERATOR_T>
51 for (; !it.atEnd(); ++it)
61 return myList == src.myList && myCurr == src.myCurr;
66 return !(*
this ==
src);
89 T &
item()
const {
return (*myList)(myCurr); }
102 bool atEnd()
const {
return !myList || myCurr>=myList->entries(); }
typedef int(APIENTRYP RE_PFNGLXSWAPINTERVALSGIPROC)(int)
bool operator==(const UT_OrderedIterator< T, ITERATOR_T > &src) const
Test equality.
UT_OrderedIterator()
Default c-tor.
IMATH_HOSTDEVICE constexpr int cmp(T a, T b) IMATH_NOEXCEPT
bool atEnd() const
Test if at end of the list.
std::shared_ptr< T > UT_SharedPtr
Wrapper around std::shared_ptr.
exint index() const
Return current index.
void advance()
Advance to the next iteration.
UT_OrderedIterator< T, ITERATOR_T > & operator++()
Pre-increment operator.
UT_OrderedIterator< T, ITERATOR_T > & operator=(const UT_OrderedIterator< T, ITERATOR_T > &src)
Assignment operator.
UT_OrderedIterator(const UT_OrderedIterator &src)
Copy c-tor.
int(* Comparator)(const T *, const T *)
exint entries() const
Return the number of elemenets in the iteration.
UT_Compare::Less< T > UTcompareLess(UT_Compare::Ternary< T > compare)
UT_ValArray< T > ListType
Storage for the list of items.
UT_OrderedIterator(ITERATOR_T it, Comparator cmp)
bool operator!=(const UT_OrderedIterator< T, ITERATOR_T > &src) const
Test inequality.
void rewind()
Rewind and start iteration again.