25#ifndef __BITPIT_PIERCED_VECTOR_HPP__
26#define __BITPIT_PIERCED_VECTOR_HPP__
30#include "piercedVectorKernel.hpp"
31#include "piercedVectorStorage.hpp"
33#define __PV_REFERENCE__ typename PiercedVector<value_t, id_t>::reference
34#define __PV_CONST_REFERENCE__ typename PiercedVector<value_t, id_t>::const_reference
35#define __PV_POINTER__ typename PiercedVector<value_t, id_t>::pointer
36#define __PV_CONST_POINTER__ typename PiercedVector<value_t, id_t>::const_pointer
62template<
typename value_t,
typename id_t =
long>
172 template<
typename... Args>
174 template<
typename... Args>
176 template<
typename... Args>
178 template<
typename... Args>
181 template<
typename... Args>
187 void swap(id_t id_first, id_t id_second);
190 void clear(
bool release =
true);
192 void resize(std::size_t n);
194 void sortAfter(id_t referenceId,
bool inclusive);
195 void sortBefore(id_t referenceId,
bool inclusive);
231 void restore(std::istream &stream);
234 void dump(std::ostream &stream)
const;
256 template<
typename... Args>
270#include "piercedVector.tpp"
Base class for pierced vectors.
const_iterator rawFind(std::size_t pos) const noexcept
const_iterator cend() const noexcept
const_iterator find(const id_t &id) const noexcept
const_iterator begin() const noexcept
const_iterator cbegin() const noexcept
const_iterator end() const noexcept
Iterator for the class PiercedStorage.
The PiercedStorageRange allow to iterate using range-based loops over a PiercedStorage.
PiercedSyncMaster::SyncMode getSyncMode() const
void unsetKernel(bool release=true)
KernelType getKernelType() const
Metafunction for generating a pierced storage.
raw_iterator rawBegin() noexcept
raw_iterator rawEnd() noexcept
std::vector< value_t >::const_iterator raw_const_iterator
std::vector< value_t >::iterator raw_iterator
typename std::enable_if< PiercedStorage< value_t, id_t >::template has_initialize< Args... >()>::type EnableIfHasInitialize
static constexpr bool has_dump()
static constexpr bool has_restore()
raw_const_iterator rawCbegin() const noexcept
raw_const_iterator rawCend() const noexcept
Kernel of the pierced vector.
Kernel of the pierced vector.
void setStaticKernel(const PiercedVectorKernel< id_t > *kernel)
__PVS_REFERENCE__ at(id_t id)
__PVS_REFERENCE__ rawAt(std::size_t pos)
void setDynamicKernel(const PiercedVectorKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
__PVS_REFERENCE__ front()
Metafunction for generating a pierced vector.
PiercedVectorStorage< value_t, id_t >::const_range const_range
iterator emplaceBefore(const id_t &referenceId, id_t id, Args &&... args)
void restore(std::istream &stream)
iterator insert(id_t id, const value_t &value)
iterator insertBefore(const id_t &referenceId, id_t id, const value_t &value)
iterator emreclaimAfter(const id_t &referenceId, id_t id, Args &&... args)
iterator replace(id_t id, value_t &&value)
iterator emplace(id_t id, Args &&... args)
const PiercedVectorKernel< id_t > & getKernel() const
iterator emreclaimBefore(const id_t &referenceId, id_t id, Args &&... args)
const PiercedVectorStorage< value_t, id_t > & getStorage() const
iterator reclaimBefore(const id_t &referenceId, id_t id)
void clear(bool release=true)
iterator reclaim(id_t id)
iterator emreclaim(id_t id, Args &&... args)
PiercedVectorStorage< value_t, id_t >::raw_const_iterator raw_const_iterator
void sortAfter(id_t referenceId, bool inclusive)
iterator pushBack(id_t id, const value_t &value)
PiercedVectorKernel< id_t >::id_type id_type
iterator erase(id_t id, bool delayed=false)
void swap(id_t id_first, id_t id_second)
PiercedVectorStorage< value_t, id_t >::const_iterator const_iterator
PiercedVector< value_t, id_t > & operator=(const PiercedVector< value_t, id_t > &other)
iterator emreplace(id_t id, Args &&... args)
void restoreKernel(std::istream &stream)
iterator reclaimBack(id_t id)
PiercedVectorStorage< value_t, id_t >::range range
iterator moveAfter(const id_t &referenceId, id_t id, bool delayed=false)
iterator insertAfter(const id_t &referenceId, id_t id, const value_t &value)
PiercedVectorStorage< value_t, id_t >::raw_iterator raw_iterator
void sortBefore(id_t referenceId, bool inclusive)
iterator reclaimAfter(const id_t &referenceId, id_t id)
PiercedVectorStorage< value_t, id_t >::iterator iterator
PiercedVectorStorage< value_t, id_t >::value_type value_type
void emreclaimBack(id_t id, Args &&... args)
void emplaceBack(id_t id, Args &&... args)
void dumpKernel(std::ostream &stream) const
void reserve(std::size_t n)
void resize(std::size_t n)
PiercedVectorKernel< id_t > kernel_type
iterator moveBefore(const id_t &referenceId, id_t id, bool delayed=false)
iterator emplaceAfter(const id_t &referenceId, id_t id, Args &&... args)