Metafunction for generating a pierced storage. More...
#include <piercedStorage.hpp>
Public Types | |
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 | |
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) |
Static Public Member Functions | |
static constexpr bool | has_dump () |
template<typename... Args> | |
static constexpr bool | has_initialize () |
static constexpr bool | has_restore () |
Protected Member Functions | |
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 |
Friends | |
template<typename PI_value_t , typename PI_id_t , typename PI_value_no_cv_t > | |
class | PiercedStorageIterator |
Additional Inherited Members | |
Protected Attributes inherited from bitpit::PiercedStorageSyncSlave< id_t > | |
const PiercedKernel< id_t > * | m_kernel |
KernelType | m_kernelType |
Metafunction for generating a pierced storage.
Usage: use PiercedStorage<value_t, id_t>
to declare a pierced storage.
value_t | is the type of the elements stored in the storage |
id_t | is the type of the ids associated to the elements |
Definition at line 146 of file piercedStorage.hpp.
typedef PiercedStorageIterator<const value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::const_iterator |
Constant iterator
Definition at line 288 of file piercedStorage.hpp.
typedef container_t::const_pointer bitpit::PiercedStorage< value_t, id_t >::const_pointer |
Constant pointer
Definition at line 278 of file piercedStorage.hpp.
typedef PiercedStorageRange<const value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::const_range |
Constant range
Definition at line 308 of file piercedStorage.hpp.
typedef container_t::const_reference bitpit::PiercedStorage< value_t, id_t >::const_reference |
Constant reference
Definition at line 268 of file piercedStorage.hpp.
typedef std::vector<value_t> bitpit::PiercedStorage< value_t, id_t >::container_t |
Container
Definition at line 258 of file piercedStorage.hpp.
using bitpit::PiercedStorage< value_t, id_t >::EnableIfHasInitialize = typename std::enable_if<PiercedStorage<value_t, id_t>::template has_initialize<Args...>()>::type |
Use SFINAE to enable a method only if the storage has the 'initialize' capability.
This is needed for being compliant with MSVC.
Definition at line 341 of file piercedStorage.hpp.
typedef Kernel<id_t>::id_type bitpit::PiercedStorage< value_t, id_t >::id_type |
Type of ids stored in the container
Definition at line 243 of file piercedStorage.hpp.
typedef PiercedStorageIterator<value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::iterator |
Iterator
Definition at line 283 of file piercedStorage.hpp.
using bitpit::PiercedStorage< value_t, id_t >::Kernel = typename PiercedStorageSyncSlave<id_t>::template Kernel<PK_id_t> |
Kernel template
Definition at line 231 of file piercedStorage.hpp.
typedef Kernel<id_t> bitpit::PiercedStorage< value_t, id_t >::kernel_t |
Kernel
Definition at line 248 of file piercedStorage.hpp.
typedef PiercedStorageSyncSlave<id_t>::KernelType bitpit::PiercedStorage< value_t, id_t >::KernelType |
Kernel type
Definition at line 253 of file piercedStorage.hpp.
typedef container_t::pointer bitpit::PiercedStorage< value_t, id_t >::pointer |
Pointer
Definition at line 273 of file piercedStorage.hpp.
typedef PiercedStorageRange<value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::range |
Range
Definition at line 303 of file piercedStorage.hpp.
typedef std::vector<value_t>::const_iterator bitpit::PiercedStorage< value_t, id_t >::raw_const_iterator |
Raw constant iterator
Definition at line 298 of file piercedStorage.hpp.
typedef std::vector<value_t>::iterator bitpit::PiercedStorage< value_t, id_t >::raw_iterator |
Raw iterator
Definition at line 293 of file piercedStorage.hpp.
typedef container_t::reference bitpit::PiercedStorage< value_t, id_t >::reference |
Reference
Definition at line 263 of file piercedStorage.hpp.
typedef value_t bitpit::PiercedStorage< value_t, id_t >::value_type |
Type of data stored in the container
Definition at line 238 of file piercedStorage.hpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | ) |
Constructor.
Definition at line 417 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields | ) |
Constructor.
nFields | is the number of fields in the storage |
Definition at line 428 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields, |
const PiercedKernel< id_t > * | kernel ) |
Constructor.
nFields | is the number of fields in the storage |
kernel | is the kernel that will be set |
Definition at line 440 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields, |
const PiercedKernel< id_t > * | kernel, | ||
PiercedSyncMaster::SyncMode | syncMode ) |
Constructor.
nFields | is the number of fields in the storage |
kernel | is the kernel that will be set |
syncMode | is the synchronization mode that will be used for the storage |
Definition at line 455 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | const PiercedStorage< value_t, id_t > & | other | ) |
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 470 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | const PiercedStorage< value_t, id_t > & | other, |
const PiercedKernel< id_t > * | kernel ) |
Constructor.
The newly created pierced sync slave will be associated with the given static kernel.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container |
kernel | is the kernel that will be set |
Definition at line 496 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | const PiercedStorage< value_t, id_t > & | other, |
const PiercedKernel< id_t > * | kernel, | ||
PiercedSyncMaster::SyncMode | syncMode ) |
Constructor.
The newly created pierced storage will be associated with the given dynamic kernel and will use the given synchronization mode.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container |
kernel | is the kernel that will be set |
syncMode | is the synchronization mode that will be used for the storage |
Definition at line 518 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | PiercedStorage< value_t, id_t > && | other | ) |
Constructor.
In the initializer list, the copy constructor of base class PiercedStorageSyncSlave should be called. This prevents the storage to be unregistered before having the chance to move its contents (when a storage is unregistered its contents are cleared). The other storage will be unregistered only after its content is properly moved.
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 544 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | PiercedStorage< value_t, id_t > && | other, |
const PiercedKernel< id_t > * | kernel ) |
Constructor.
The newly created pierced sync slave will be associated with the given static kernel.
In the initializer list, the copy constructor of base class PiercedStorageSyncSlave should be called. This prevents the storage to be unregistered before having the chance to move its contents (when a storage is unregistered its contents are cleared). The other storage will be unregistered only after its content is properly moved.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container |
kernel | is the kernel that will be set |
Definition at line 580 of file piercedStorage.tpp.
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | PiercedStorage< value_t, id_t > && | other, |
const PiercedKernel< id_t > * | kernel, | ||
PiercedSyncMaster::SyncMode | syncMode ) |
Constructor.
The newly created pierced storage will be associated with the given dynamic kernel and will use the given synchronization mode.
In the initializer list, the copy constructor of base class PiercedStorageSyncSlave should be called. This prevents the storage to be unregistered before having the chance to move its contents (when a storage is unregistered its contents are cleared). The other storage will be unregistered only after its content is properly moved.
other | is another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container |
kernel | is the kernel that will be set |
syncMode | is the synchronization mode that will be used for the storage |
Definition at line 612 of file piercedStorage.tpp.
|
overrideprotectedvirtual |
Internal function that will be called after setting a dynamic kernel.
The storage will dynamically synchronized with the kernel.
Reimplemented from bitpit::PiercedStorageSyncSlave< id_t >.
Definition at line 693 of file piercedStorage.tpp.
|
overrideprotectedvirtual |
Internal function that will be called after setting a static kernel.
The storage will NOT be synchronized with the kernel. Every change to the kernel can potentially invalidate the link between kernel and storage.
kernel | is the kernel that will be set |
Reimplemented from bitpit::PiercedStorageSyncSlave< id_t >.
Definition at line 680 of file piercedStorage.tpp.
|
overrideprotectedvirtual |
Internal function that will be called after unsetting the kernel.
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 released |
Reimplemented from bitpit::PiercedStorageSyncSlave< id_t >.
Definition at line 706 of file piercedStorage.tpp.
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::at | ( | id_t | id, |
std::size_t | k = 0 ) |
Gets a reference to the requested field of the specfied item.
id | is the id of the item |
k | is the index of the requested field |
Definition at line 1340 of file piercedStorage.tpp.
__PS_CONST_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::at | ( | id_t | id, |
std::size_t | k = 0 ) const |
Gets a constant reference to the requested field of the specfied item.
id | is the id of the item |
k | is the index of the requested field |
Definition at line 1355 of file piercedStorage.tpp.
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::back | ( | std::size_t | k = 0 | ) |
Returns a reference to the last element of the container.
If the container is empty, an exception is thrown.
k | is the index of the requested field |
Definition at line 1304 of file piercedStorage.tpp.
__PS_CONST_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::back | ( | std::size_t | k = 0 | ) | const |
Returns a constant reference to the last element of the container.
If the container is empty, an exception is thrown.
k | is the index of the requested field |
Definition at line 1322 of file piercedStorage.tpp.
|
noexcept |
Returns a constant iterator pointing to the first element in the vector.
Definition at line 1670 of file piercedStorage.tpp.
|
noexcept |
Returns an iterator pointing to the first element in the vector.
Definition at line 1648 of file piercedStorage.tpp.
|
noexcept |
Returns an conts_iterator pointing to the first element in the vector.
Definition at line 1694 of file piercedStorage.tpp.
|
noexcept |
Returns an const_iterator referring to the past-the-end element in the vector.
Definition at line 1706 of file piercedStorage.tpp.
|
overrideprotectedvirtual |
Commit the specified synchronization action.
Is the action requires new elements to be inserted in the storage, empty elements will be inserted.
action | is the synchronization action that will be commited |
Implements bitpit::PiercedSyncSlave.
Definition at line 737 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::copy | ( | id_t | id, |
std::size_t | nFields, | ||
std::size_t | offset, | ||
value_t * | values ) const |
Set the requested fields of the specified item.
id | is the id of the item |
nFields | is the number of fields that will be copied |
offset | is the offset used for setting the fields |
values | is a pointer to the destination |
Definition at line 1409 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::copy | ( | id_t | id, |
value_t * | values ) const |
Copy all the fields of the specified item.
id | is the id of the item |
values | is a pointer to the destination |
Definition at line 1393 of file piercedStorage.tpp.
__PS_POINTER__ bitpit::PiercedStorage< value_t, id_t >::data | ( | ) |
Gets a pointer to the memory array used internally by the vector to store its owned elements.
Definition at line 1194 of file piercedStorage.tpp.
__PS_CONST_POINTER__ bitpit::PiercedStorage< value_t, id_t >::data | ( | ) | const |
Gets a constant pointer to the memory array used internally by the vector to store its owned elements.
Definition at line 1181 of file piercedStorage.tpp.
__PS_POINTER__ bitpit::PiercedStorage< value_t, id_t >::data | ( | id_t | id, |
std::size_t | offset = 0 ) |
Gets a pointer to the data of the specified item.
id | the id of the item |
offset | is the offset relative to the first field |
Definition at line 1207 of file piercedStorage.tpp.
__PS_CONST_POINTER__ bitpit::PiercedStorage< value_t, id_t >::data | ( | id_t | id, |
std::size_t | offset = 0 ) const |
Gets a constant pointer to the data of the specified item.
id | the id of the item |
offset | is the offset relative to the first field |
Definition at line 1222 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::dump | ( | std::ostream & | stream | ) | const |
Dump the storage.
stream | is the stream data should be written to |
Definition at line 1853 of file piercedStorage.tpp.
|
noexcept |
Returns a constant iterator referring to the past-the-end element in the vector.
Definition at line 1683 of file piercedStorage.tpp.
|
noexcept |
Returns an iterator referring to the past-the-end element in the vector.
Definition at line 1659 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::fill | ( | const value_t & | value | ) |
Assigns the given value to all the elements in the storage.
value | is the value to be assigned |
Definition at line 1168 of file piercedStorage.tpp.
|
noexcept |
Gets a constant iterator pointing to the specified element.
id | is the id of the specified iterator. |
Definition at line 1611 of file piercedStorage.tpp.
|
noexcept |
Gets an iterator pointing to the specified element.
id | is the id of the specified iterator. |
Definition at line 1597 of file piercedStorage.tpp.
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::front | ( | std::size_t | k = 0 | ) |
Returns a reference to the first element of the container.
If the container is empty, an exception is thrown.
k | is the index of the requested field |
Definition at line 1268 of file piercedStorage.tpp.
__PS_CONST_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::front | ( | std::size_t | k = 0 | ) | const |
Returns a constant reference to the first element of the container.
If the container is empty, an exception is thrown.
k | is the index of the requested field |
Definition at line 1286 of file piercedStorage.tpp.
std::size_t bitpit::PiercedStorage< value_t, id_t >::getFieldCount | ( | ) | const |
Gets the number of fields in the storage.
Definition at line 665 of file piercedStorage.tpp.
|
inlinestaticconstexpr |
Checks if the storage has the 'dump' capability
Definition at line 321 of file piercedStorage.hpp.
|
inlinestaticconstexpr |
Checks if the storage has the 'initialize' capability
Definition at line 330 of file piercedStorage.hpp.
|
inlinestaticconstexpr |
Checks if the storage has the 'restore' capability
Definition at line 313 of file piercedStorage.hpp.
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= | ( | const PiercedStorage< 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 635 of file piercedStorage.tpp.
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= | ( | PiercedStorage< 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 651 of file piercedStorage.tpp.
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::operator[] | ( | id_t | id | ) |
Gets a reference to the first field of the specfied item.
id | is the id of the item |
Definition at line 1369 of file piercedStorage.tpp.
__PS_CONST_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::operator[] | ( | id_t | id | ) | const |
Gets a constant reference to the first field of the specfied item.
id | is the id of the item |
Definition at line 1381 of file piercedStorage.tpp.
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::rawAt | ( | std::size_t | pos, |
std::size_t | k = 0 ) |
Gets a reference to the requested field of the item at the specified raw position.
pos | is the raw position of the item |
k | is the index of the requested field |
Definition at line 1485 of file piercedStorage.tpp.
__PS_CONST_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::rawAt | ( | std::size_t | pos, |
std::size_t | k = 0 ) const |
Gets a constant reference to the requested field of the item at the specified raw position.
pos | is the raw position of the item |
k | is the index of the requested field |
Definition at line 1500 of file piercedStorage.tpp.
|
noexcept |
Returns a constant iterator pointing to the first element in the raw container.
Definition at line 1743 of file piercedStorage.tpp.
|
noexcept |
Returns an iterator pointing to the first element in the raw container.
Definition at line 1717 of file piercedStorage.tpp.
|
noexcept |
Returns an conts_iterator pointing to the first element in the raw container.
Definition at line 1767 of file piercedStorage.tpp.
|
noexcept |
Returns an const_iterator referring to the past-the-end element in raw container.
Definition at line 1780 of file piercedStorage.tpp.
|
protected |
Clears the contents of the storage.
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 888 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawCopy | ( | std::size_t | pos, |
std::size_t | nFields, | ||
std::size_t | offset, | ||
value_t * | values ) const |
Set the requested fields of the specified item.
pos | is the raw position of the item |
nFields | is the number of fields that will be copied |
offset | is the offset used for setting the fields |
values | is a pointer to the destination |
Definition at line 1526 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawCopy | ( | std::size_t | pos, |
value_t * | values ) const |
Copy all the fields of the specified item.
pos | is the raw position of the item |
values | is a pointer to the destination |
Definition at line 1512 of file piercedStorage.tpp.
__PS_POINTER__ bitpit::PiercedStorage< value_t, id_t >::rawData | ( | std::size_t | pos, |
std::size_t | offset = 0 ) |
Gets a constant pointer to the data of of the item at the specified raw position.
pos | is the raw position of the item |
offset | is the offset relative to the first field |
Definition at line 1239 of file piercedStorage.tpp.
__PS_CONST_POINTER__ bitpit::PiercedStorage< value_t, id_t >::rawData | ( | std::size_t | pos, |
std::size_t | offset = 0 ) const |
Gets a pointer to the data of of the item at the specified raw position.
pos | is the raw position of the item |
offset | is the offset relative to the first field |
Definition at line 1254 of file piercedStorage.tpp.
|
protected |
Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.
pos | is the position where the new element will be inserted |
args | are the arguments forwarded to construct the new element |
Definition at line 1063 of file piercedStorage.tpp.
|
protected |
Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.
pos | is the position where the new element will be inserted |
value | is the value assigned to the new element |
Definition at line 1079 of file piercedStorage.tpp.
|
protected |
Adds a new element at the end of the storage, after its current last element. This new element is constructed in place using args as the arguments for its construction.
args | are the arguments forwarded to construct the new element |
Definition at line 1093 of file piercedStorage.tpp.
|
protected |
Adds a new element at the end of the storage, after its current last element. This new element is constructed in place using args as the arguments for its construction.
value | is the value assigned to the new element |
Definition at line 1109 of file piercedStorage.tpp.
|
protected |
Replaces the element at the specified position with a new element. This new element is constructed in place using args as the arguments for its construction.
pos | is the position where the new element will be inserted |
args | are the arguments forwarded to construct the new element |
Definition at line 1124 of file piercedStorage.tpp.
|
noexcept |
Returns a constant iterator referring to the past-the-end element in the raw container.
Definition at line 1756 of file piercedStorage.tpp.
|
noexcept |
Returns an iterator referring to the past-the-end element in the raw container.
Definition at line 1730 of file piercedStorage.tpp.
|
protected |
Erase the specified number of elements from the storage
pos | is the position of the first element that will be deleted |
n | is the number of elements that will be deleted |
Definition at line 904 of file piercedStorage.tpp.
|
noexcept |
Gets a constant iterator pointing to the specified position.
pos | is the requested position |
Definition at line 1637 of file piercedStorage.tpp.
|
noexcept |
Gets an iterator pointing to the specified position.
pos | is the requested position |
Definition at line 1625 of file piercedStorage.tpp.
|
protected |
Initialize an element.
pos | is the position of the element to initialize |
args | are the arguments forwarded to initialize the new element |
Definition at line 1007 of file piercedStorage.tpp.
|
protected |
Initialize the specified field of an element.
pos | is the position of the element to initialize |
k | is the index of the field to initialize |
args | are the arguments forwarded to initialize the new element |
Definition at line 1023 of file piercedStorage.tpp.
|
protected |
Insert the specified number of elements in the storage
pos | is the position where the new elements will be inserted |
n | is the number of new elements that will be inserted |
value | is the value to be copied (or moved) to the inserted elements |
Definition at line 1036 of file piercedStorage.tpp.
|
protected |
Adds a new element at the end of the storage, after its current last element.
value | is the value to be copied (or moved) to the inserted elements |
Definition at line 1047 of file piercedStorage.tpp.
|
protected |
Reorder the storage according to the specified permutations.
permutations | are the permutations that wil be applied |
Definition at line 967 of file piercedStorage.tpp.
|
protected |
Requests that the storage capacity be at least enough to contain n elements.
n | is the minimum capacity requested for the vector, expressed in number of elements |
Definition at line 860 of file piercedStorage.tpp.
|
protected |
Resizes the container so that it contains n elements.
n | is the new container size, expressed in number of elements |
value | is the value to be copied (or moved) to the newly created elements |
Definition at line 994 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawSet | ( | std::size_t | pos, |
const value_t & | value ) |
Set all the fields of the item at the specified raw position.
pos | is the raw position of the item |
value | is the value that will be set |
Definition at line 1541 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawSet | ( | std::size_t | pos, |
const value_t * | values ) |
Set all the fields of the item at the specified raw position.
pos | is the raw position of the item |
values | is a pointer to the values that will be set |
Definition at line 1568 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawSet | ( | std::size_t | pos, |
std::size_t | k, | ||
const value_t & | value ) |
Set the requested field of the item at the specified raw position.
pos | is the raw position of the item |
k | is the index of the requested field |
value | is the value that will be set |
Definition at line 1556 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::rawSet | ( | std::size_t | pos, |
std::size_t | nFields, | ||
std::size_t | offset, | ||
const value_t * | values ) |
Set the requested fields of the item at the specified raw position.
pos | is the raw position of the item |
nFields | is the number of fields that will be set |
offset | is the offset used for setting the fields |
values | is a pointer to the values that will be set |
Definition at line 1582 of file piercedStorage.tpp.
|
protected |
Requests the storage to reduce its capacity to fit its size.
The request is non-binding, and the function can leave the storage 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 875 of file piercedStorage.tpp.
|
protected |
Returns the number of raw positions in the storage.
This is the number of raw positions in the storage, which is not necessarily equal the number of actual objects held in the storage nor to its capacity. If the storage is not synchronized with its kernel, the raw size of the storage may differ from the raw size of the kernel.
Definition at line 723 of file piercedStorage.tpp.
|
protected |
Swaps two elements.
This template is used for all types of values with the exception of boolean values.
pos_first | is the position of the first element that will be swapped |
pos_second | is the position of the second element that will be swapped |
Swaps two elements.
This template is used when the container stores boolean values.
pos_first | is the position of the first element that will be swapped |
pos_second | is the position of the second element that will be swapped |
Definition at line 923 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::restore | ( | std::istream & | stream | ) |
Restore the storage.
stream | is the stream data should be read from |
Definition at line 1792 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
const value_t & | value ) |
Set all the fields of the specified item.
id | is the id of the item |
value | is the value that will be set |
Definition at line 1423 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
const value_t * | values ) |
Set all the fields of the specified item.
id | is the id of the item |
values | is a pointer to the values that will be set |
Definition at line 1452 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
std::size_t | k, | ||
const value_t & | value ) |
Set the requested field of the specified item.
id | is the id of the item |
k | is the index of the requested field |
value | is the value that will be set |
Definition at line 1438 of file piercedStorage.tpp.
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
std::size_t | nFields, | ||
std::size_t | offset, | ||
const value_t * | values ) |
Set the requested fields of the specified item.
id | is the id of the item |
nFields | is the number of fields that will be set |
offset | is the offset used for setting the fields |
values | is a pointer to the values that will be set |
Definition at line 1468 of file piercedStorage.tpp.
|
noexcept |
Exchanges the content of the storage by the content of x, which is another storage object of the same type. Sizes may differ but the number of fields has to be the same.
After the call to this member function, the elements in this storage 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 storage of the same type (i.e., instantiated with the same template parameters) whose content is swapped with that of this storage. |
Definition at line 1146 of file piercedStorage.tpp.
|
friend |
Definition at line 150 of file piercedStorage.hpp.