23 #include "ocilibcpp/types.hpp" 31 CollectionIterator<T>::CollectionIterator() : _elem()
37 CollectionIterator<T>::CollectionIterator(
CollectionType *collection,
unsigned int pos) : _elem(collection, pos)
43 CollectionIterator<T>::CollectionIterator(
const CollectionIterator& other) : _elem(other._elem)
49 CollectionIterator<T>& CollectionIterator<T>::operator = (
const CollectionIterator& other)
53 _elem._pos = other._elem._pos;
54 _elem._coll = other._elem._coll;
61 CollectionIterator<T>& CollectionIterator<T>::operator += (difference_type value)
63 _elem._pos +=
static_cast<unsigned int>(value);
68 CollectionIterator<T>& CollectionIterator<T>::operator -= (difference_type value)
70 _elem._pos -=
static_cast<unsigned int>(value);
75 T& CollectionIterator<T>::operator*()
81 T* CollectionIterator<T>::operator->()
87 CollectionIterator<T>& CollectionIterator<T>::operator--()
94 CollectionIterator<T>& CollectionIterator<T>::operator++()
96 ++*(
const_cast<unsigned int*
>(&_elem._pos));
101 CollectionIterator<T> CollectionIterator<T>::operator++(
int)
103 CollectionIterator res(_elem._coll, _elem._pos);
109 CollectionIterator<T> CollectionIterator<T>::operator--(
int)
111 CollectionIterator res(_elem);
117 CollectionIterator<T> CollectionIterator<T>::operator + (difference_type value)
119 return CollectionIterator(_elem._coll, _elem._pos + static_cast<unsigned int>(value));
123 CollectionIterator<T> CollectionIterator<T>::operator - (difference_type value)
125 return CollectionIterator(_elem._coll, _elem._pos - static_cast<unsigned int>(value));
129 typename CollectionIterator<T>::difference_type CollectionIterator<T>::operator - (
const CollectionIterator & other)
131 return static_cast<difference_type
>(_elem._pos - other._elem._pos);
135 bool CollectionIterator<T>::operator == (
const CollectionIterator& other)
137 return _elem._pos == other._elem._pos && (
static_cast<OCI_Coll *
>(*_elem._coll)) == (
static_cast<OCI_Coll *
>(*other._elem._coll));
141 bool CollectionIterator<T>::operator != (
const CollectionIterator& other)
143 return !(*
this == other);
147 bool CollectionIterator<T>::operator > (
const CollectionIterator& other)
149 return _elem._pos > other._elem._pos;
153 bool CollectionIterator<T>::operator < (
const CollectionIterator& other)
155 return _elem._pos < other._elem._pos;
159 bool CollectionIterator<T>::operator >= (
const CollectionIterator& other)
161 return _elem._pos >= other._elem._pos;
165 bool CollectionIterator<T>::operator <= (
const CollectionIterator& other)
167 return _elem._pos <= other._elem._pos;
core::Enum< CollectionTypeValues > CollectionType
Collection type.
struct OCI_Coll OCI_Coll
Oracle Collections (VARRAYs and Nested Tables) representation.