18 template <
class T = Object>
37 virtual void steal(
Object& rhs);
72 return utl::cast<T>(_it->get());
76 get(
size_t offset)
const 78 return _it->get(offset);
88 set(
size_t offset,
const Object* object)
90 _it->set(offset,
object);
108 return _it->subtract(it);
141 return utl::cast<T>(_it->get());
158 typedef std::random_access_iterator_tag iterator_category;
159 typedef std::ptrdiff_t difference_type;
186 auto& it = utl::cast<TRandIt<T>>(rhs);
191 auto& it = utl::cast<RandIt>(rhs);
205 auto& it = utl::cast<TRandIt<T>>(rhs);
210 auto& it = utl::cast<RandIt>(rhs);
223 auto& rhs = utl::cast<TRandIt<T>>(rhs_);
224 if (_it !=
nullptr)
delete _it;
230 auto& rhs = utl::cast<RandIt>(rhs_);
#define UTL_CLASS_IMPL_TPL(className, T)
Implementation of standard UTL++ functionality for a template class.
virtual size_t offset() const
Get the current offset.
virtual size_t size() const
Return the current size of the sequence.
T * clone(const T *object)
Create a clone of the given object.
void deInit()
De-initialize UTL++.
TRandIt & operator=(RandIt *it)
Set the iterator.
virtual const Object & getProxiedObject() const
Get the proxied object (= self if none).
Random-access iterator abstraction.
RandIt * iterator() const
Get the proxied iterator.
void copy(T *dest, const T *src, size_t len)
Copy one array of objects to another.
void setIt(RandIt *it)
Set the iterator.
virtual size_t subtract(const RandIt &it) const
Determine the distance between self and another random-access iterator for the same sequence...
Templated proxy for RandIt.
int compareNullable(const Object *lhs, const Object *rhs, const Ordering *ordering=nullptr)
Compare two objects.
TRandIt(RandIt *it)
Constructor.
virtual void seek(size_t offset)
Seek to the given offset.
#define UTL_CLASS_DECL_TPL(DC, T, BC)
Declaration of standard UTL++ functionality for a template class with one parameter.
virtual void steal(Object &rhs)
"Steal" the internal representation from another instance.
virtual Object & getProxiedObject()
Get the proxied object (= self if none).
virtual void reverse(size_t dist=1)
Move backward the given number of objects.
virtual void forward(size_t dist=1)
Move forward the given number of objects.
Root of UTL++ class hierarchy.
int compare(bool lhs, bool rhs)
Compare two boolean values.
void init()
Initialize UTL++.
T * operator*() const
Pointer dereference operator – return a T* instead of an Object*.