Metafunction for generating a pierced vector. More...
#include <piercedVector.hpp>
Public Types | |
typedef PiercedVectorStorage< value_t, id_t >::const_iterator | const_iterator |
typedef PiercedVectorStorage< value_t, id_t >::const_range | const_range |
typedef PiercedVectorKernel< id_t >::id_type | id_type |
typedef PiercedVectorStorage< value_t, id_t >::iterator | iterator |
typedef PiercedVectorKernel< id_t > | kernel_type |
typedef PiercedVectorStorage< value_t, id_t >::range | range |
typedef PiercedVectorStorage< value_t, id_t >::raw_const_iterator | raw_const_iterator |
typedef PiercedVectorStorage< value_t, id_t >::raw_iterator | raw_iterator |
typedef PiercedVectorStorage< value_t, id_t >::value_type | value_type |
Public Types inherited from bitpit::PiercedKernel< id_t > | |
typedef PiercedKernelIterator< id_t > | const_iterator |
typedef PiercedKernelRange< id_t > | const_range |
typedef id_t | id_type |
typedef std::vector< id_t >::const_iterator | raw_const_iterator |
enum | SyncMode |
Public Types inherited from bitpit::PiercedSyncMaster | |
typedef std::vector< PiercedSyncSlave * > | SyncGroup |
enum | SyncMode { SYNC_MODE_CONCURRENT , SYNC_MODE_JOURNALED , SYNC_MODE_DISABLED , SYNC_MODE_ITR_COUNT = SYNC_MODE_DISABLED + 1 , SYNC_MODE_ITR_BEGIN = 0 , SYNC_MODE_ITR_END = SYNC_MODE_ITR_BEGIN + SYNC_MODE_ITR_COUNT } |
Public Types inherited from bitpit::PiercedStorage< value_t, id_t > | |
typedef PiercedStorageIterator< const value_t, id_t > | const_iterator |
typedef container_t::const_pointer | const_pointer |
typedef PiercedStorageRange< const value_t, id_t > | const_range |
typedef container_t::const_reference | const_reference |
typedef std::vector< value_t > | container_t |
template<typename... Args> | |
using | EnableIfHasInitialize = typename std::enable_if<PiercedStorage<value_t, id_t>::template has_initialize<Args...>()>::type |
typedef Kernel< id_t >::id_type | id_type |
typedef PiercedStorageIterator< value_t, id_t > | iterator |
template<typename PK_id_t > | |
using | Kernel = typename PiercedStorageSyncSlave<id_t>::template Kernel<PK_id_t> |
typedef Kernel< id_t > | kernel_t |
typedef PiercedStorageSyncSlave< id_t >::KernelType | KernelType |
typedef container_t::pointer | pointer |
typedef PiercedStorageRange< value_t, id_t > | range |
typedef std::vector< value_t >::const_iterator | raw_const_iterator |
typedef std::vector< value_t >::iterator | raw_iterator |
typedef container_t::reference | reference |
typedef value_t | value_type |
Public Types inherited from bitpit::PiercedStorageSyncSlave< id_t > | |
typedef Kernel< id_t >::id_type | id_type |
template<typename PK_id_t > | |
using | Kernel = PiercedKernel<PK_id_t> |
typedef Kernel< id_t > | kernel_t |
enum | KernelType { KERNEL_NONE = -1 , KERNEL_STATIC = 0 , KERNEL_DYNAMIC = 1 } |
Public Member Functions | |
PiercedVector () | |
PiercedVector (const PiercedVector< value_t, id_t > &other) | |
PiercedVector (PiercedVector< value_t, id_t > &&other) | |
PiercedVector (std::size_t n) | |
void | clear (bool release=true) |
void | dump () const |
template<typename T = value_t, typename std::enable_if< std::is_pod< T >::value||PiercedVectorStorage< T, id_t >::has_dump()>::type * = nullptr> | |
void | dump (std::ostream &stream) const |
void | dumpKernel (std::ostream &stream) const |
template<typename... Args> | |
iterator | emplace (id_t id, Args &&... args) |
template<typename... Args> | |
iterator | emplaceAfter (const id_t &referenceId, id_t id, Args &&... args) |
template<typename... Args> | |
void | emplaceBack (id_t id, Args &&... args) |
template<typename... Args> | |
iterator | emplaceBefore (const id_t &referenceId, id_t id, Args &&... args) |
template<typename... Args, typename PiercedStorage< value_t, id_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
iterator | emreclaim (id_t id, Args &&... args) |
template<typename... Args, typename PiercedStorage< value_t, id_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
iterator | emreclaimAfter (const id_t &referenceId, id_t id, Args &&... args) |
template<typename... Args, typename PiercedStorage< value_t, id_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
void | emreclaimBack (id_t id, Args &&... args) |
template<typename... Args, typename PiercedStorage< value_t, id_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
iterator | emreclaimBefore (const id_t &referenceId, id_t id, Args &&... args) |
template<typename... Args> | |
iterator | emreplace (id_t id, Args &&... args) |
iterator | erase (id_t id, bool delayed=false) |
const PiercedVectorKernel< id_t > & | getKernel () const |
const PiercedVectorStorage< value_t, id_t > & | getStorage () const |
iterator | insert (id_t id, const value_t &value) |
iterator | insertAfter (const id_t &referenceId, id_t id, const value_t &value) |
iterator | insertBefore (const id_t &referenceId, id_t id, const value_t &value) |
iterator | moveAfter (const id_t &referenceId, id_t id, bool delayed=false) |
iterator | moveBefore (const id_t &referenceId, id_t id, bool delayed=false) |
PiercedVector< value_t, id_t > & | operator= (const PiercedVector< value_t, id_t > &other) |
PiercedVector< value_t, id_t > & | operator= (PiercedVector< value_t, id_t > &&other) |
void | popBack () |
iterator | pushBack (id_t id, const value_t &value) |
iterator | reclaim (id_t id) |
iterator | reclaimAfter (const id_t &referenceId, id_t id) |
iterator | reclaimBack (id_t id) |
iterator | reclaimBefore (const id_t &referenceId, id_t id) |
iterator | replace (id_t id, value_t &&value) |
void | reserve (std::size_t n) |
void | resize (std::size_t n) |
template<typename T = value_t, typename std::enable_if< std::is_pod< T >::value||PiercedVectorStorage< T, id_t >::has_restore()>::type * = nullptr> | |
void | restore (std::istream &stream) |
void | restoreKernel (std::istream &stream) |
void | shrinkToFit () |
void | sort () |
void | sortAfter (id_t referenceId, bool inclusive) |
void | sortBefore (id_t referenceId, bool inclusive) |
void | squeeze () |
void | swap (id_t id_first, id_t id_second) |
void | swap (PiercedVector &other) noexcept |
Public Member Functions inherited from bitpit::PiercedVectorKernel< id_t > | |
bool | exists (id_t id) const |
std::size_t | rawIndex (id_t id) const |
Public Member Functions inherited from bitpit::PiercedKernel< id_t > | |
PiercedKernel () | |
PiercedKernel (const PiercedKernel &other)=default | |
PiercedKernel (PiercedKernel &&other)=default | |
PiercedKernel (std::size_t n) | |
~PiercedKernel () override | |
std::size_t | back () const |
const_iterator | begin () const noexcept |
std::size_t | capacity () const |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
void | checkIntegrity () const |
ClearAction | clear (bool release=true) |
bool | contains (id_t id) const |
bool | contiguous () const |
std::size_t | count (id_t id) const |
void | dump () const |
void | dump (std::ostream &stream) const |
bool | empty () const |
const_iterator | end () const noexcept |
EraseAction | erase (id_t id, bool flush=false) |
std::size_t | evalFlatIndex (id_t id) const |
FillAction | fillAfter (id_t referenceId, id_t id) |
FillAction | fillAppend (id_t id) |
FillAction | fillBefore (id_t referenceId, id_t id) |
FillAction | fillHead (id_t id) |
FillAction | fillHole (std::size_t hole, id_t id) |
FillAction | fillInsert (std::size_t pos, id_t id) |
FillAction | fillTail (id_t id) |
const_iterator | find (const id_t &id) const noexcept |
void | flush () |
std::size_t | front () const |
std::vector< id_t > | getIds (bool ordered=true) const |
std::size_t | getRawIndex (id_t id) const |
id_t | getSizeMarker (std::size_t targetSize, const id_t &fallback=-1) |
bool | isIteratorSlow () |
bool | isSynced () const |
std::size_t | maxSize () const |
MoveAction | moveAfter (id_t referenceId, id_t id, bool flush=false) |
MoveAction | moveBefore (id_t referenceId, id_t id, bool flush=false) |
EraseAction | popBack () |
const_iterator | rawFind (std::size_t pos) const noexcept |
ReserveAction | reserve (std::size_t n) |
ResizeAction | resize (std::size_t n) |
void | restore (std::istream &stream) |
ShrinkToFitAction | shrinkToFit () |
std::size_t | size () const |
SortAction | sort () |
SortAction | sortAfter (id_t referenceId, bool inclusive) |
SortAction | sortBefore (id_t referenceId, bool inclusive) |
SqueezeAction | squeeze () |
SwapAction | swap (id_t id_first, id_t id_second) |
void | swap (PiercedKernel &other) noexcept |
void | sync () |
void | updateId (const id_t ¤tId, const id_t &updatedId) |
Public Member Functions inherited from bitpit::PiercedVectorStorage< value_t, id_t > | |
__PVS_REFERENCE__ | at (id_t id) |
__PVS_CONST_REFERENCE__ | at (id_t id) const |
__PVS_REFERENCE__ | back () |
__PVS_CONST_REFERENCE__ | back () const |
__PVS_REFERENCE__ | front () |
__PVS_CONST_REFERENCE__ | front () const |
const PiercedVectorKernel< id_t > * | getKernel () const |
__PVS_REFERENCE__ | operator[] (id_t id) |
__PVS_CONST_REFERENCE__ | operator[] (id_t id) const |
__PVS_REFERENCE__ | rawAt (std::size_t pos) |
__PVS_CONST_REFERENCE__ | rawAt (std::size_t pos) const |
void | setDynamicKernel (const PiercedVectorKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) |
void | setStaticKernel (const PiercedVectorKernel< id_t > *kernel) |
Public Member Functions inherited from bitpit::PiercedStorage< value_t, id_t > | |
PiercedStorage () | |
PiercedStorage (const PiercedStorage< value_t, id_t > &other) | |
PiercedStorage (const PiercedStorage< value_t, id_t > &other, const PiercedKernel< id_t > *kernel) | |
PiercedStorage (const PiercedStorage< value_t, id_t > &other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorage (PiercedStorage< value_t, id_t > &&other) | |
PiercedStorage (PiercedStorage< value_t, id_t > &&other, const PiercedKernel< id_t > *kernel) | |
PiercedStorage (PiercedStorage< value_t, id_t > &&other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorage (std::size_t nFields) | |
PiercedStorage (std::size_t nFields, const PiercedKernel< id_t > *kernel) | |
PiercedStorage (std::size_t nFields, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
__PS_REFERENCE__ | at (id_t id, std::size_t k=0) |
__PS_CONST_REFERENCE__ | at (id_t id, std::size_t k=0) const |
__PS_REFERENCE__ | back (std::size_t k=0) |
__PS_CONST_REFERENCE__ | back (std::size_t k=0) const |
const_iterator | begin () const noexcept |
iterator | begin () noexcept |
const_iterator | cbegin () const noexcept |
const_iterator | cend () const noexcept |
void | copy (id_t id, std::size_t nFields, std::size_t offset, value_t *values) const |
void | copy (id_t id, value_t *values) const |
__PS_POINTER__ | data () |
__PS_CONST_POINTER__ | data () const |
__PS_POINTER__ | data (id_t id, std::size_t offset=0) |
__PS_CONST_POINTER__ | data (id_t id, std::size_t offset=0) const |
template<typename T = value_t, typename std::enable_if< std::is_pod< T >::value||PiercedStorage< T, id_t >::has_dump()>::type * = nullptr> | |
void | dump (std::ostream &stream) const |
const_iterator | end () const noexcept |
iterator | end () noexcept |
void | fill (const value_t &value) |
const_iterator | find (const id_t &id) const noexcept |
iterator | find (const id_t &id) noexcept |
__PS_REFERENCE__ | front (std::size_t k=0) |
__PS_CONST_REFERENCE__ | front (std::size_t k=0) const |
std::size_t | getFieldCount () const |
PiercedStorage & | operator= (const PiercedStorage &other) |
PiercedStorage & | operator= (PiercedStorage &&other) |
__PS_REFERENCE__ | operator[] (id_t id) |
__PS_CONST_REFERENCE__ | operator[] (id_t id) const |
__PS_REFERENCE__ | rawAt (std::size_t pos, std::size_t offset=0) |
__PS_CONST_REFERENCE__ | rawAt (std::size_t pos, std::size_t offset=0) const |
raw_const_iterator | rawBegin () const noexcept |
raw_iterator | rawBegin () noexcept |
raw_const_iterator | rawCbegin () const noexcept |
raw_const_iterator | rawCend () const noexcept |
void | rawCopy (std::size_t pos, std::size_t nFields, std::size_t offset, value_t *values) const |
void | rawCopy (std::size_t pos, value_t *values) const |
__PS_POINTER__ | rawData (std::size_t pos, std::size_t offset=0) |
__PS_CONST_POINTER__ | rawData (std::size_t pos, std::size_t offset=0) const |
raw_const_iterator | rawEnd () const noexcept |
raw_iterator | rawEnd () noexcept |
const_iterator | rawFind (std::size_t pos) const noexcept |
iterator | rawFind (std::size_t pos) noexcept |
void | rawSet (std::size_t pos, const value_t &value) |
void | rawSet (std::size_t pos, const value_t *values) |
void | rawSet (std::size_t pos, std::size_t k, const value_t &value) |
void | rawSet (std::size_t pos, std::size_t nFields, std::size_t offset, const value_t *values) |
template<typename T = value_t, typename std::enable_if< std::is_pod< T >::value||PiercedStorage< T, id_t >::has_restore()>::type * = nullptr> | |
void | restore (std::istream &stream) |
void | set (id_t id, const value_t &value) |
void | set (id_t id, const value_t *values) |
void | set (id_t id, std::size_t k, const value_t &value) |
void | set (id_t id, std::size_t nFields, std::size_t offset, const value_t *values) |
void | swap (PiercedStorage &other) noexcept |
Public Member Functions inherited from bitpit::PiercedStorageSyncSlave< id_t > | |
virtual | ~PiercedStorageSyncSlave () |
const PiercedKernel< id_t > * | getKernel () const |
KernelType | getKernelType () const |
PiercedSyncMaster::SyncMode | getSyncMode () const |
void | setDynamicKernel (const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) |
void | setStaticKernel (const PiercedKernel< id_t > *kernel) |
void | swap (PiercedStorageSyncSlave< id_t > &other) noexcept |
void | unsetKernel (bool release=true) |
Additional Inherited Members | |
Static Public Member Functions inherited from bitpit::PiercedStorage< value_t, id_t > | |
static constexpr bool | has_dump () |
template<typename... Args> | |
static constexpr bool | has_initialize () |
static constexpr bool | has_restore () |
Protected Types inherited from bitpit::PiercedKernel< id_t > | |
typedef holes_container::const_iterator | holes_const_iterator |
typedef std::vector< std::size_t > | holes_container |
typedef holes_container::iterator | holes_iterator |
Protected Member Functions inherited from bitpit::BasePiercedVector | |
BasePiercedVector () | |
Protected Member Functions inherited from bitpit::BasePiercedVectorKernel | |
BasePiercedVectorKernel () | |
Protected Member Functions inherited from bitpit::PiercedKernel< id_t > | |
ClearAction | _clear (bool release=true) |
ReserveAction | _reserve (std::size_t n) |
ResizeAction | _resize (std::size_t n) |
ShrinkToFitAction | _shrinkToFit () |
SortAction | _sort (std::size_t begin, std::size_t end) |
SqueezeAction | _squeeze () |
std::size_t | findNextUsedPos (std::size_t pos) const |
std::size_t | findPrevUsedPos (std::size_t pos) const |
std::size_t | getFirstUsedPos () const |
std::size_t | getLastUsedPos () const |
std::size_t | getPos (id_t id) const |
std::vector< PiercedStorageSyncSlave< id_t > * > | getStorages () |
std::vector< const PiercedStorageSyncSlave< id_t > * > | getStorages () const |
bool | isPosEmpty (std::size_t pos) const |
std::size_t | rawSize () const |
Protected Member Functions inherited from bitpit::PiercedSyncMaster | |
PiercedSyncMaster () | |
void | dump (std::ostream &stream) const |
PiercedSyncMaster::SyncMode | getSlaveSyncMode (const PiercedSyncSlave *slave) const |
bool | isSlaveRegistered (const PiercedSyncSlave *slave) const |
bool | isSlaveSynced (const PiercedSyncSlave *slave) const |
bool | isSynced () const |
bool | isSyncEnabled () const |
void | processSyncAction (const PiercedSyncAction &action) |
void | registerSlave (PiercedSyncSlave *slave, PiercedSyncMaster::SyncMode syncMode) const |
void | restore (std::istream &stream) |
void | setSyncEnabled (bool enabled) const |
void | swap (PiercedSyncMaster &other) noexcept |
void | sync () |
void | unregisterSlave (const PiercedSyncSlave *slave) const |
Protected Member Functions inherited from bitpit::PiercedStorage< value_t, id_t > | |
void | _postSetDynamicKernel () override |
void | _postSetStaticKernel () override |
void | _postUnsetKernel (bool release=true) override |
void | commitSyncAction (const PiercedSyncAction &action) override |
void | rawClear (bool release) |
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr, typename... Args> | |
void | rawEmplace (std::size_t pos, Args &&... args) |
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr> | |
void | rawEmplace (std::size_t pos, bool value=false) |
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr, typename... Args> | |
void | rawEmplaceBack (Args &&... args) |
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr> | |
void | rawEmplaceBack (bool value=false) |
template<typename... Args> | |
void | rawEmreplace (std::size_t pos, Args &&... args) |
void | rawErase (std::size_t pos, std::size_t n) |
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
void | rawInitialize (std::size_t pos, Args &&... args) |
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * = nullptr> | |
void | rawInitialize (std::size_t pos, std::size_t k, Args &&... args) |
void | rawInsert (std::size_t pos, std::size_t n, const value_t &value) |
void | rawPushBack (const value_t &value) |
void | rawReorder (const std::vector< std::size_t > &permutations) |
void | rawReserve (std::size_t n) |
void | rawResize (std::size_t n, const value_t &value=value_t()) |
void | rawShrinkToFit () |
std::size_t | rawSize () const |
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr> | |
void | rawSwap (std::size_t pos_first, std::size_t pos_second) |
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr> | |
void | rawSwap (std::size_t pos_first, std::size_t pos_second) |
Protected Member Functions inherited from bitpit::PiercedStorageSyncSlave< id_t > | |
PiercedStorageSyncSlave () | |
PiercedStorageSyncSlave (const PiercedKernel< id_t > *kernel) | |
PiercedStorageSyncSlave (const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other, const PiercedKernel< id_t > *kernel) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other, const PiercedKernel< id_t > *kernel) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
void | detachKernel () |
Protected Member Functions inherited from bitpit::PiercedSyncSlave | |
PiercedSyncSlave () | |
void | swap (PiercedSyncSlave &other) noexcept |
Protected Attributes inherited from bitpit::PiercedSyncMaster | |
std::unordered_map< PiercedSyncSlave *, SyncMode > | m_slaves |
Protected Attributes inherited from bitpit::PiercedStorageSyncSlave< id_t > | |
const PiercedKernel< id_t > * | m_kernel |
KernelType | m_kernelType |
Metafunction for generating a pierced vector.
Usage: use PiercedVector<value_t, id_t>
to declare a pierced vector.
value_t | is the type of the elements stored in the vector |
id_t | is the type of the ids associated to the elements |
Definition at line 63 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::const_iterator bitpit::PiercedVector< value_t, id_t >::const_iterator |
Constant iterator
Definition at line 115 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::const_range bitpit::PiercedVector< value_t, id_t >::const_range |
Constant range
Definition at line 135 of file piercedVector.hpp.
typedef PiercedVectorKernel<id_t>::id_type bitpit::PiercedVector< value_t, id_t >::id_type |
Type of ids stored in the container
Definition at line 100 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::iterator bitpit::PiercedVector< value_t, id_t >::iterator |
Iterator
Definition at line 110 of file piercedVector.hpp.
typedef PiercedVectorKernel<id_t> bitpit::PiercedVector< value_t, id_t >::kernel_type |
Type of ids stored in the container
Definition at line 95 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::range bitpit::PiercedVector< value_t, id_t >::range |
Range
Definition at line 130 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::raw_const_iterator bitpit::PiercedVector< value_t, id_t >::raw_const_iterator |
Raw constant iterator
Definition at line 125 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::raw_iterator bitpit::PiercedVector< value_t, id_t >::raw_iterator |
Raw iterator
Definition at line 120 of file piercedVector.hpp.
typedef PiercedVectorStorage<value_t,id_t>::value_type bitpit::PiercedVector< value_t, id_t >::value_type |
Type of data stored in the container
Definition at line 105 of file piercedVector.hpp.
bitpit::PiercedVector< value_t, id_t >::PiercedVector | ( | ) |
Constructs an empty pierced vector with no elements.
For increase the performances, the synchronization of the internal storage is handled outside the kernel.
Definition at line 37 of file piercedVector.tpp.
bitpit::PiercedVector< value_t, id_t >::PiercedVector | ( | std::size_t | n | ) |
Constructs a pierced vector with a capacity at least enough to contain n elements.
For increase the performances, the synchronization of the internal storage is handled outside the kernel.
n | the minimum capacity requested for the container |
Definition at line 53 of file piercedVector.tpp.
bitpit::PiercedVector< value_t, id_t >::PiercedVector | ( | const PiercedVector< value_t, id_t > & | other | ) |
Copy constructor
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container. |
Definition at line 66 of file piercedVector.tpp.
bitpit::PiercedVector< value_t, id_t >::PiercedVector | ( | PiercedVector< value_t, id_t > && | other | ) |
Move constructor
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container. |
Definition at line 83 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::clear | ( | bool | release = true | ) |
Removes all elements from the container (which are destroyed), leaving the container with a size of 0.
release | if it's true the memory hold by the container will be released, otherwise the container will be cleared but its memory will not be relased |
Definition at line 638 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::dump | ( | ) | const |
Dumps to screen the internal data.
Definition at line 859 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::dump | ( | std::ostream & | stream | ) | const |
Dump the container.
stream | is the stream data should be written to |
Definition at line 885 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::dumpKernel | ( | std::ostream & | stream | ) | const |
Dump the kernel's container.
stream | is the stream data should be written to |
Definition at line 911 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emplace | ( | id_t | id, |
Args &&... | args ) |
The container is extended by inserting a new element. This new element is constructed in place using args as the arguments for its construction.
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 473 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emplaceAfter | ( | const id_t & | referenceId, |
id_t | id, | ||
Args &&... | args ) |
The container is extended by inserting a new element. The element will have a position that is between the element with the specified reference id and the end of the container.
referenceId | is the id of the element after which the new element will be inserted |
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 495 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::emplaceBack | ( | id_t | id, |
Args &&... | args ) |
Inserts a new element at the end of the container, right after its current last element. This new element is constructed in place using args as the arguments for its construction.
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 514 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emplaceBefore | ( | const id_t & | referenceId, |
id_t | id, | ||
Args &&... | args ) |
The container is extended by inserting a new element. This new element is constructed in place using args as the arguments for its construction. The element will have a position that is between the beginning of the container and the element with the specified reference id.
referenceId | is the id of the element before which the new element will be inserted |
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 538 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emreclaim | ( | id_t | id, |
Args &&... | args ) |
The container is extended by inserting a new element. If the element can reuse an existing position that position will be initialize using args as the argument for its initialization otherwise a new element will be created in-place using args as the arguments for its construction.
This function is only enabled if the object stored in the container has an initialization function with a signature like "void initialize(Args...)".
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct or initialize the new element |
Definition at line 374 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emreclaimAfter | ( | const id_t & | referenceId, |
id_t | id, | ||
Args &&... | args ) |
The container is extended by inserting a new element. The element will have a position that is between the element with the specified reference id and the end of the container. If the element can reuse an existing position that position will be initialize using args as the argument for its initialization otherwise a new element will be created in-place using args as the arguments for its construction.
This function is only enabled if the object stored in the container has an initialization function with a signature like "void initialize(Args...)".
referenceId | is the id of the element after which the new element will be inserted |
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 402 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::emreclaimBack | ( | id_t | id, |
Args &&... | args ) |
Inserts a new element at the end of the container, right after its current last element. If the element can reuse an existing position that position will be initialize using args as the argument for its initialization otherwise a new element will be created in-place using args as the arguments for its construction.
This function is only enabled if the object stored in the container has an initialization function with a signature like "void initialize(Args...)".
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 426 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emreclaimBefore | ( | const id_t & | referenceId, |
id_t | id, | ||
Args &&... | args ) |
The container is extended by inserting a new element. The element will have a position that is between the beginning of the container and the element with the specified reference id. If the element can reuse an existing position that position will be initialize using args as the argument for its initialization otherwise a new element will be created in-place using args as the arguments for its construction.
This function is only enabled if the object stored in the container has an initialization function with a signature like "void initialize(Args...)".
referenceId | is the id of the element before which the new element will be inserted |
id | is the id that will be associated to the element |
args | are the arguments forwarded to construct the new element |
Definition at line 454 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::emreplace | ( | id_t | id, |
Args &&... | args ) |
The element with the specified id is replaced with a new element. This new element is constructed in place using args as the arguments for its construction.
id | is the id of the element that will be replaced |
args | are the arguments forwarded to construct the new element |
Definition at line 558 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::erase | ( | id_t | id, |
bool | delayed = false ) |
Removes from the container the element with the specified id. If the id does not exists the function throws an exception.
Element is overwritten with an empty element and the id associated to its position is updated to mark the position as empty and allow the container to reuse that position.
id | is the id of the element to erase |
delayed | if true some changes can remain in a pending state until a flush is called |
Definition at line 586 of file piercedVector.tpp.
const PiercedVectorKernel< id_t > & bitpit::PiercedVector< value_t, id_t >::getKernel | ( | ) | const |
Get a constant reference to the kernel of the vector.
Definition at line 839 of file piercedVector.tpp.
const PiercedVectorStorage< value_t, id_t > & bitpit::PiercedVector< value_t, id_t >::getStorage | ( | ) | const |
Get a constant reference to the storage of the vector.
Definition at line 850 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::insert | ( | id_t | id, |
const value_t & | value ) |
The container is extended by inserting a new element.
id | is the id that will be associated to the element |
value | is the value to be copied (or moved) to the inserted elements. |
Definition at line 266 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::insertAfter | ( | const id_t & | referenceId, |
id_t | id, | ||
const value_t & | value ) |
The container is extended by inserting a new element. The element will have a position that is between the element with the specified reference id and the end of the container.
referenceId | is the id of the element after which the new element will be inserted |
id | is the id that will be associated to the element |
value | is the value to be copied (or moved) to the inserted element |
Definition at line 288 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::insertBefore | ( | const id_t & | referenceId, |
id_t | id, | ||
const value_t & | value ) |
The container is extended by inserting a new element. The element will have a position that is between the beginning of the container and the element with the specified reference id.
referenceId | is the id of the element before which the new element will be inserted |
id | is the id that will be associated to the element |
value | is the value to be copied (or moved) to the inserted element |
Definition at line 310 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::moveAfter | ( | const id_t & | referenceId, |
id_t | id, | ||
bool | delayed = false ) |
Move the specified element after the element with the given reference id.
referenceId | is the id of the element after which the new element will be moved |
id | is the id of the element that will be moved |
delayed | if true some changes can remain in a pending state until a flush is called |
Definition at line 248 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::moveBefore | ( | const id_t & | referenceId, |
id_t | id, | ||
bool | delayed = false ) |
Move the specified element before the element with the given reference id.
referenceId | is the id of the element before which the new element will be moved |
id | is the id of the element that will be moved |
delayed | if true some changes can remain in a pending state until a flush is called |
Definition at line 227 of file piercedVector.tpp.
PiercedVector< value_t, id_t > & bitpit::PiercedVector< value_t, id_t >::operator= | ( | const PiercedVector< value_t, id_t > & | other | ) |
Copy assignment operator.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container. |
Definition at line 100 of file piercedVector.tpp.
PiercedVector< value_t, id_t > & bitpit::PiercedVector< value_t, id_t >::operator= | ( | PiercedVector< value_t, id_t > && | other | ) |
Move assignment operator.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container. |
Definition at line 115 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::popBack | ( | ) |
Removes the last element in the container, effectively reducing the container size by one.
Element is not deleted from the internal vector, instead its id is changed to mark the position as empty and allow the container to reuse that position.
Definition at line 604 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::pushBack | ( | id_t | id, |
const value_t & | value ) |
Adds a new element at the end of the container, after its current last element.
The content of value is copied (or moved) to the new element.
id | is the id that will be assigned to the element |
value | the value to be copied (or moved) to the new element |
Definition at line 349 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::reclaim | ( | id_t | id | ) |
Gets an element from a the first position marked as empty and assignes to it the specified id. Except for setting the id, the element is not modified. Therefore it will still contain the data of the element that was previously occupying the position or it will be empty if there was no empty position and a new element has been created.
id | is the id that will be assigned to the element |
Definition at line 133 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::reclaimAfter | ( | const id_t & | referenceId, |
id_t | id ) |
Gets an element marked as empty and assignes to it the specified id. The element will have a position that is between the element with the specified reference id and the end of the container. Except for setting the id, the element is not modified. Therefore it will still contain the data of the element that was previously occupying the position or it will be empty if there was no empty position and a new element has been created. The container is extended by inserting a new element. The element will be inserted .
referenceId | is the id of the element after which an empty position will be reclaimed |
id | is the id that will be assigned to the element |
Definition at line 159 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::reclaimBack | ( | id_t | id | ) |
Gets an element from the first position marked as empty past the last element assignes to it the specified id. Except for setting the id, the element is not modified. Therefore it will still contain the data of the element that was previously occupying the position or it will be empty if there was no empty position and a new element has been created.
id | is the id that will be assigned to the element |
Definition at line 180 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::reclaimBefore | ( | const id_t & | referenceId, |
id_t | id ) |
Gets an element marked as empty and assignes to it the specified id. The element will have a position that is between the begin of the container and the specified reference id. Except for setting the id, the element is not modified. Therefore it will still contain the data of the element that was previously occupying the position or it will be empty if there was no empty position and a new element has been created. The container is extended by inserting a new element. The element will be inserted .
referenceId | is the id of the element before which an empty position will be reclaimed |
id | is the id that will be assigned to the element |
Definition at line 206 of file piercedVector.tpp.
PiercedVector< value_t, id_t >::iterator bitpit::PiercedVector< value_t, id_t >::replace | ( | id_t | id, |
value_t && | value ) |
The element with the specified id is replaced with a new element.
id | is the id of the element that will be replaced |
value | is the value to be moved to the inserted elements. |
Definition at line 327 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::reserve | ( | std::size_t | n | ) |
Requests that the container capacity be at least enough to contain n elements.
If n is greater than the current container capacity, the function causes the container to reallocate its storage increasing its capacity to n (or greater).
In all other cases, the function call does not cause a reallocation and the container capacity is not affected.
n | the minimum capacity requested for the container |
Definition at line 660 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::resize | ( | std::size_t | n | ) |
Resizes the container so that it contains n elements.
If n is smaller than the current container size, the content is reduced to its first n elements, removing those beyond (and destroying them).
If n is greater than the current container size, space is reserved in the storage to allow the container to reach the requested size.
If n is also greater than the current container capacity, an automatic reallocation of the allocated storage space takes place.
Notice that this function changes the actual content of the container by erasing elements from it.
n | is the new container size, expressed in number of elements. |
Definition at line 687 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::restore | ( | std::istream & | stream | ) |
Restore the container.
stream | is the stream data should be read from |
Definition at line 871 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::restoreKernel | ( | std::istream & | stream | ) |
Restore the kernel's container.
stream | is the stream data should be read from |
Definition at line 898 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::shrinkToFit | ( | ) |
Requests the container to reduce its capacity to fit its size. This method will NOT compact the elements, leaving the existing holes unaltered.
The request is non-binding, and the function can leave the container with a capacity greater than its size.
This may cause a reallocation, but has no effect on the container size and cannot alter its elements not the holes.
Definition at line 778 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::sort | ( | ) |
Sorts the elements of the container in ascending id order.
Definition at line 700 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::sortAfter | ( | id_t | referenceId, |
bool | inclusive ) |
Sorts the container after the element with the reference id in ascending id order.
referenceId | is the id of the element after which the container will be sorted |
inclusive | if true the reference element will be sorted, otherwise the sorting will stop at the element following the reference |
Definition at line 719 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::sortBefore | ( | id_t | referenceId, |
bool | inclusive ) |
Sorts the container before the element with the reference id in ascending id order.
referenceId | is the id of the element before which the container will be sorted |
inclusive | if true the reference element will be sorted, otherwise the sorting will stop at the element preceding the reference |
Definition at line 738 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::squeeze | ( | ) |
Requests the container to compact the elements and reduce its capacity to fit its size.
The request is non-binding, and the function can leave the container with a capacity greater than its size.
This may cause a reallocation, but has no effect on the container size and cannot alter its elements.
Definition at line 758 of file piercedVector.tpp.
void bitpit::PiercedVector< value_t, id_t >::swap | ( | id_t | id_first, |
id_t | id_second ) |
Swap the elements with the specified id.
id_first | is the id of the first element to be swapped |
id_second | is the id of the second element to be swapped |
Definition at line 620 of file piercedVector.tpp.
|
noexcept |
Exchanges the content of the container by the content of x, which is another container of the same type. Sizes may differ.
After the call to this member function, the elements in this container are those which were in x before the call, and the elements of x are those which were in this. All iterators, references and pointers remain valid for the swapped objects.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is swapped with that of this container. |
Definition at line 801 of file piercedVector.tpp.