25#ifndef __BITPIT_PIERCED_STORAGE_ITERATOR_TPP__
26#define __BITPIT_PIERCED_STORAGE_ITERATOR_TPP__
33template<
typename value_t,
typename id_t,
typename value_no_cv_t>
45template<
typename value_t,
typename id_t,
typename value_no_cv_t>
46template<typename other_value_t, typename std::enable_if<std::is_const<value_t>::value && !std::is_const<other_value_t>::value && std::is_same<other_value_t, typename std::remove_cv<value_t>::type>::value,
int>::type>
56template<
typename value_t,
typename id_t,
typename value_no_cv_t>
66template<
typename value_t,
typename id_t,
typename value_no_cv_t>
68 : PiercedKernelIterator<id_t>(iterator), m_storage(storage)
70 assert(&(iterator.
getKernel()) == &(storage->getKernel()));
79template<
typename value_t,
typename id_t,
typename value_no_cv_t>
84 std::swap(m_storage, other.m_storage);
92template<
typename value_t,
typename id_t,
typename value_no_cv_t>
103template<
typename value_t,
typename id_t,
typename value_no_cv_t>
115template<
typename value_t,
typename id_t,
typename value_no_cv_t>
118 if (*
this == m_storage->getKernel().end()) {
119 throw std::out_of_range(
"Iterator points to an invalid position.");
122 std::size_t rawIndex = getRawIndex();
124 return m_storage->rawAt(rawIndex, k);
134template<
typename value_t,
typename id_t,
typename value_no_cv_t>
149template<
typename value_t,
typename id_t,
typename value_no_cv_t>
152 std::size_t rawIndex = getRawIndex();
167template<
typename value_t,
typename id_t,
typename value_no_cv_t>
182template<
typename value_t,
typename id_t,
typename value_no_cv_t>
185 std::size_t rawIndex = getRawIndex();
198template<
typename value_t,
typename id_t,
typename value_no_cv_t>
201 std::size_t rawIndex = getRawIndex();
203 return m_storage->rawAt(rawIndex, 0);
211template<
typename value_t,
typename id_t,
typename value_no_cv_t>
214 std::size_t rawIndex = getRawIndex();
216 return m_storage->rawData(rawIndex);
225template<
typename value_t,
typename id_t,
typename value_no_cv_t>
226template<typename other_value_t, typename std::enable_if<std::is_const<value_t>::value && !std::is_const<other_value_t>::value && std::is_same<other_value_t, typename std::remove_cv<value_t>::type>::value,
int>::type>
230 m_storage = other.m_storage;
Iterator for the class PiercedKernel.
void swap(PiercedKernelIterator &other) noexcept
PiercedKernelIterator & operator++()
PiercedKernelIterator & operator--()
const kernel_type & getKernel() const
Iterator for the class PiercedStorage.
PiercedStorageIterator & operator++()
void swap(PiercedStorageIterator &other) noexcept
__PSI_POINTER__ operator->() const
storage_type & getStorage() const
__PSI_REFERENCE__ operator*() const
__PSI_REFERENCE__ getValue(std::size_t k=0) const
const PiercedKernelIterator< id_t > & getKernelIterator() const
PiercedStorageIterator & operator--()