5 #include <libutl/RandIt.h> 33 : _array(const_cast<
Array*>(array))
36 IFDEBUG(FwdIt::setOwner(_array));
54 virtual void forward(
size_t dist = 1);
59 if (_offset >= _array->totalSize())
return nullptr;
60 return _array->get(_offset);
69 get(
size_t offset)
const 72 return _array->get(offset);
82 virtual size_t offset()
const;
84 virtual void reverse(
size_t dist = 1);
93 virtual void set(
const Object* object);
96 set(
size_t offset,
const Object* object)
99 _array->set(offset,
object);
105 return _array->size();
186 Array::beginNew()
const 204 Array::endNew()
const virtual void seek(size_t offset)
Seek to the given offset.
void deInit()
De-initialize UTL++.
Random-access Array iterator.
Array * getArray() const
Get the associated array.
ArrayIt(const Array *array, size_t offset)
Constructor.
#define UTL_CLASS_DECL(DC, BC)
Declaration of standard UTL++ functionality for a non-template class.
void reverse(const BidIt &begin, const BidIt &end)
Reverse a sequence.
Random-access iterator abstraction.
size_t operator-(const ArrayIt &it) const
Return the distance from the given iterator to self.
virtual size_t size() const
Return the current size of the sequence.
const size_t size_t_max
Maximum size_t value.
#define IFDEBUG(x)
Do x in DEBUG mode only.
SortedCollection that stores objects in an array.
void copy(T *dest, const T *src, size_t len)
Copy one array of objects to another.
ArrayIt operator+(size_t dist) const
Return an ArrayIt equivalent to self, but moved forward the given number of objects.
virtual void forward(size_t dist=1)
Move forward the given number of objects.
ArrayIt operator-(size_t dist) const
Return copy of self moved backward the given number of objects.
Root of UTL++ class hierarchy.
int compare(bool lhs, bool rhs)
Compare two boolean values.
void init()
Initialize UTL++.
virtual void reverse(size_t dist=1)
Move backward the given number of objects.
#define ASSERTD
Do an assertion in DEBUG mode only.