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 |
![]() | |
typedef Kernel< long >::id_type | id_type |
using | Kernel |
typedef Kernel< long > | kernel_t |
enum | KernelType |
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 |
![]() | |
virtual | ~PiercedStorageSyncSlave () |
const PiercedKernel< long > * | getKernel () const |
KernelType | getKernelType () const |
PiercedSyncMaster::SyncMode | getSyncMode () const |
void | setDynamicKernel (const PiercedKernel< long > *kernel, PiercedSyncMaster::SyncMode syncMode) |
void | setStaticKernel (const PiercedKernel< long > *kernel) |
void | swap (PiercedStorageSyncSlave< long > &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) |
![]() | |
PiercedStorageSyncSlave () | |
PiercedStorageSyncSlave (const PiercedKernel< long > *kernel) | |
PiercedStorageSyncSlave (const PiercedKernel< long > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< long > &other) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< long > &other, const PiercedKernel< long > *kernel) | |
PiercedStorageSyncSlave (const PiercedStorageSyncSlave< long > &other, const PiercedKernel< long > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< long > &&other) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< long > &&other, const PiercedKernel< long > *kernel) | |
PiercedStorageSyncSlave (PiercedStorageSyncSlave< long > &&other, const PiercedKernel< long > *kernel, PiercedSyncMaster::SyncMode syncMode) | |
void | detachKernel () |
![]() | |
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 | |
![]() | |
const PiercedKernel< long > * | m_kernel |
KernelType | m_kernelType |
Detailed Description
class bitpit::PiercedStorage< value_t, id_t >
Metafunction for generating a pierced storage.
Usage: use PiercedStorage<value_t, id_t>
to declare a pierced storage.
- Template Parameters
-
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.
Member Typedef Documentation
◆ const_iterator
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.
◆ const_pointer
typedef container_t::const_pointer bitpit::PiercedStorage< value_t, id_t >::const_pointer |
Constant pointer
Definition at line 278 of file piercedStorage.hpp.
◆ const_range
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.
◆ const_reference
typedef container_t::const_reference bitpit::PiercedStorage< value_t, id_t >::const_reference |
Constant reference
Definition at line 268 of file piercedStorage.hpp.
◆ container_t
typedef std::vector<value_t> bitpit::PiercedStorage< value_t, id_t >::container_t |
Container
Definition at line 258 of file piercedStorage.hpp.
◆ EnableIfHasInitialize
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.
◆ id_type
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.
◆ iterator
typedef PiercedStorageIterator<value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::iterator |
Iterator
Definition at line 283 of file piercedStorage.hpp.
◆ Kernel
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.
◆ kernel_t
typedef Kernel<id_t> bitpit::PiercedStorage< value_t, id_t >::kernel_t |
Definition at line 248 of file piercedStorage.hpp.
◆ KernelType
typedef PiercedStorageSyncSlave<id_t>::KernelType bitpit::PiercedStorage< value_t, id_t >::KernelType |
Kernel type
Definition at line 253 of file piercedStorage.hpp.
◆ pointer
typedef container_t::pointer bitpit::PiercedStorage< value_t, id_t >::pointer |
Pointer
Definition at line 273 of file piercedStorage.hpp.
◆ range
typedef PiercedStorageRange<value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::range |
Range
Definition at line 303 of file piercedStorage.hpp.
◆ raw_const_iterator
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.
◆ raw_iterator
typedef std::vector<value_t>::iterator bitpit::PiercedStorage< value_t, id_t >::raw_iterator |
Raw iterator
Definition at line 293 of file piercedStorage.hpp.
◆ reference
typedef container_t::reference bitpit::PiercedStorage< value_t, id_t >::reference |
Reference
Definition at line 263 of file piercedStorage.hpp.
◆ value_type
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.
Constructor & Destructor Documentation
◆ PiercedStorage() [1/10]
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | ) |
Constructor.
Definition at line 417 of file piercedStorage.tpp.
◆ PiercedStorage() [2/10]
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields | ) |
Constructor.
- Parameters
-
nFields is the number of fields in the storage
Definition at line 428 of file piercedStorage.tpp.
◆ PiercedStorage() [3/10]
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields, |
const PiercedKernel< id_t > * | kernel ) |
Constructor.
- Parameters
-
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.
◆ PiercedStorage() [4/10]
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | std::size_t | nFields, |
const PiercedKernel< id_t > * | kernel, | ||
PiercedSyncMaster::SyncMode | syncMode ) |
Constructor.
- Parameters
-
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.
◆ PiercedStorage() [5/10]
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage | ( | const PiercedStorage< value_t, id_t > & | other | ) |
Constructor.
- Parameters
-
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.
◆ PiercedStorage() [6/10]
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.
- Parameters
-
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.
◆ PiercedStorage() [7/10]
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.
- Parameters
-
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.
◆ PiercedStorage() [8/10]
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.
- Parameters
-
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.
◆ PiercedStorage() [9/10]
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.
- Parameters
-
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.
◆ PiercedStorage() [10/10]
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.
- Parameters
-
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.
Member Function Documentation
◆ _postSetDynamicKernel()
|
overrideprotectedvirtual |
Internal function that will be called after setting a dynamic kernel.
The storage will dynamically synchronized with the kernel.
Reimplemented from bitpit::PiercedStorageSyncSlave< long >.
Definition at line 693 of file piercedStorage.tpp.
◆ _postSetStaticKernel()
|
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.
- Parameters
-
kernel is the kernel that will be set
Reimplemented from bitpit::PiercedStorageSyncSlave< long >.
Definition at line 680 of file piercedStorage.tpp.
◆ _postUnsetKernel()
|
overrideprotectedvirtual |
Internal function that will be called after unsetting the kernel.
- Parameters
-
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< long >.
Definition at line 706 of file piercedStorage.tpp.
◆ at() [1/2]
__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.
- Parameters
-
id is the id of the item k is the index of the requested field
- Returns
- A reference to the requested field of the specfied item.
- Examples
- POD_example_00002.cpp, and voloctree_adaptation_example_00001.cpp.
Definition at line 1360 of file piercedStorage.tpp.
◆ at() [2/2]
__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.
- Parameters
-
id is the id of the item k is the index of the requested field
- Returns
- A constant reference to the requested field of the specfied item.
Definition at line 1375 of file piercedStorage.tpp.
◆ back() [1/2]
__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.
- Parameters
-
k is the index of the requested field
- Returns
- A reference to the last element of the container.
Definition at line 1324 of file piercedStorage.tpp.
◆ back() [2/2]
__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.
- Parameters
-
k is the index of the requested field
- Returns
- A constant reference to the last element of the container.
Definition at line 1342 of file piercedStorage.tpp.
◆ begin() [1/2]
|
noexcept |
Returns a constant iterator pointing to the first element in the vector.
- Returns
- A constant iterator pointing to the first element in the vector.
Definition at line 1690 of file piercedStorage.tpp.
◆ begin() [2/2]
|
noexcept |
Returns an iterator pointing to the first element in the vector.
- Returns
- An iterator pointing to the first element in the vector.
Definition at line 1668 of file piercedStorage.tpp.
◆ cbegin()
|
noexcept |
Returns an conts_iterator pointing to the first element in the vector.
- Returns
- A const_iterator pointing to the first element in the vector.
Definition at line 1714 of file piercedStorage.tpp.
◆ cend()
|
noexcept |
Returns an const_iterator referring to the past-the-end element in the vector.
- Returns
- A const_iterator referring to the past-the-end element in the vector.
Definition at line 1726 of file piercedStorage.tpp.
◆ commitSyncAction()
|
overrideprotectedvirtual |
Commit the specified synchronization action.
Is the action requires new elements to be inserted in the storage, empty elements will be inserted.
- Parameters
-
action is the synchronization action that will be commited
Implements bitpit::PiercedSyncSlave.
Definition at line 737 of file piercedStorage.tpp.
◆ copy() [1/2]
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.
- Parameters
-
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 1429 of file piercedStorage.tpp.
◆ copy() [2/2]
void bitpit::PiercedStorage< value_t, id_t >::copy | ( | id_t | id, |
value_t * | values ) const |
Copy all the fields of the specified item.
- Parameters
-
id is the id of the item values is a pointer to the destination
Definition at line 1413 of file piercedStorage.tpp.
◆ data() [1/4]
__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.
- Returns
- A pointer to the memory array used internally by the vector to store its owned elements.
Definition at line 1214 of file piercedStorage.tpp.
◆ data() [2/4]
__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.
- Returns
- A constant pointer to the memory array used internally by the vector to store its owned elements.
Definition at line 1201 of file piercedStorage.tpp.
◆ data() [3/4]
__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.
- Parameters
-
id the id of the item offset is the offset relative to the first field
- Returns
- A pointer to the data of the specfied item.
Definition at line 1227 of file piercedStorage.tpp.
◆ data() [4/4]
__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.
- Parameters
-
id the id of the item offset is the offset relative to the first field
- Returns
- A constant pointer to the data of the specfied item.
Definition at line 1242 of file piercedStorage.tpp.
◆ dump()
void bitpit::PiercedStorage< value_t, id_t >::dump | ( | std::ostream & | stream | ) | const |
Dump the storage.
- Parameters
-
stream is the stream data should be written to
Definition at line 1873 of file piercedStorage.tpp.
◆ end() [1/2]
|
noexcept |
Returns a constant iterator referring to the past-the-end element in the vector.
- Returns
- A constant iterator referring to the past-the-end element in the vector.
Definition at line 1703 of file piercedStorage.tpp.
◆ end() [2/2]
|
noexcept |
Returns an iterator referring to the past-the-end element in the vector.
- Returns
- An iterator referring to the past-the-end element in the vector.
Definition at line 1679 of file piercedStorage.tpp.
◆ fill()
void bitpit::PiercedStorage< value_t, id_t >::fill | ( | const value_t & | value | ) |
Assigns the given value to all the elements in the storage.
- Parameters
-
value is the value to be assigned
Definition at line 1188 of file piercedStorage.tpp.
◆ find() [1/2]
|
noexcept |
Gets a constant iterator pointing to the specified element.
- Parameters
-
id is the id of the specified iterator.
- Returns
- A constant iterator pointing to the specified element.
Definition at line 1631 of file piercedStorage.tpp.
◆ find() [2/2]
|
noexcept |
Gets an iterator pointing to the specified element.
- Parameters
-
id is the id of the specified iterator.
- Returns
- An iterator pointing to the specified element.
Definition at line 1617 of file piercedStorage.tpp.
◆ front() [1/2]
__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.
- Parameters
-
k is the index of the requested field
- Returns
- A reference to the first element of the container.
Definition at line 1288 of file piercedStorage.tpp.
◆ front() [2/2]
__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.
- Parameters
-
k is the index of the requested field
- Returns
- A constant reference to the first element of the container.
Definition at line 1306 of file piercedStorage.tpp.
◆ getFieldCount()
std::size_t bitpit::PiercedStorage< value_t, id_t >::getFieldCount | ( | ) | const |
Gets the number of fields in the storage.
- Returns
- The number of fields in the storage.
Definition at line 665 of file piercedStorage.tpp.
◆ has_dump()
|
inlinestaticconstexpr |
Checks if the storage has the 'dump' capability
Definition at line 321 of file piercedStorage.hpp.
◆ has_initialize()
|
inlinestaticconstexpr |
Checks if the storage has the 'initialize' capability
Definition at line 330 of file piercedStorage.hpp.
◆ has_restore()
|
inlinestaticconstexpr |
Checks if the storage has the 'restore' capability
Definition at line 313 of file piercedStorage.hpp.
◆ operator=() [1/2]
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= | ( | const PiercedStorage< value_t, id_t > & | other | ) |
Copy assignment operator.
- Parameters
-
other is another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container
- Returns
- A reference to the pierced storage.
Definition at line 635 of file piercedStorage.tpp.
◆ operator=() [2/2]
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= | ( | PiercedStorage< value_t, id_t > && | other | ) |
Move assignment operator.
- Parameters
-
other is another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container
- Returns
- A reference to the pierced storage.
Definition at line 651 of file piercedStorage.tpp.
◆ operator[]() [1/2]
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::operator[] | ( | id_t | id | ) |
Gets a reference to the first field of the specfied item.
- Parameters
-
id is the id of the item
- Returns
- A reference to the requested field of the specfied item.
Definition at line 1389 of file piercedStorage.tpp.
◆ operator[]() [2/2]
__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.
- Parameters
-
id is the id of the item
- Returns
- A constant reference to the requested field of the specfied item.
Definition at line 1401 of file piercedStorage.tpp.
◆ rawAt() [1/2]
__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.
- Parameters
-
pos is the raw position of the item k is the index of the requested field
- Returns
- A reference to the requested field of the item at the specified raw position.
Definition at line 1505 of file piercedStorage.tpp.
◆ rawAt() [2/2]
__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.
- Parameters
-
pos is the raw position of the item k is the index of the requested field
- Returns
- A constant reference to the requested field of the item at the specified raw position.
Definition at line 1520 of file piercedStorage.tpp.
◆ rawBegin() [1/2]
|
noexcept |
Returns a constant iterator pointing to the first element in the raw container.
- Returns
- A constant iterator pointing to the first element in the raw container.
Definition at line 1763 of file piercedStorage.tpp.
◆ rawBegin() [2/2]
|
noexcept |
Returns an iterator pointing to the first element in the raw container.
- Returns
- An iterator pointing to the first element in the raw container.
Definition at line 1737 of file piercedStorage.tpp.
◆ rawCbegin()
|
noexcept |
Returns an conts_iterator pointing to the first element in the raw container.
- Returns
- A const_iterator pointing to the first element in the raw container.
Definition at line 1787 of file piercedStorage.tpp.
◆ rawCend()
|
noexcept |
Returns an const_iterator referring to the past-the-end element in raw container.
- Returns
- A const_iterator referring to the past-the-end element in raw container.
Definition at line 1800 of file piercedStorage.tpp.
◆ rawClear()
|
protected |
Clears the contents of the storage.
- Parameters
-
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.
◆ rawCopy() [1/2]
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.
- Parameters
-
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 1546 of file piercedStorage.tpp.
◆ rawCopy() [2/2]
void bitpit::PiercedStorage< value_t, id_t >::rawCopy | ( | std::size_t | pos, |
value_t * | values ) const |
Copy all the fields of the specified item.
- Parameters
-
pos is the raw position of the item values is a pointer to the destination
Definition at line 1532 of file piercedStorage.tpp.
◆ rawData() [1/2]
__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.
- Parameters
-
pos is the raw position of the item offset is the offset relative to the first field
- Returns
- A constant pointer to the data of the item at the specified raw position.
Definition at line 1259 of file piercedStorage.tpp.
◆ rawData() [2/2]
__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.
- Parameters
-
pos is the raw position of the item offset is the offset relative to the first field
- Returns
- A pointer to the data of the item at the specified raw position.
Definition at line 1274 of file piercedStorage.tpp.
◆ rawEmplace() [1/2]
|
protected |
Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.
- Parameters
-
pos is the position where the new element will be inserted args are the arguments forwarded to construct the new element
Definition at line 1068 of file piercedStorage.tpp.
◆ rawEmplace() [2/2]
|
protected |
Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.
- Parameters
-
pos is the position where the new element will be inserted value is the value assigned to the new element
Definition at line 1089 of file piercedStorage.tpp.
◆ rawEmplaceBack() [1/2]
|
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.
- Parameters
-
args are the arguments forwarded to construct the new element
Definition at line 1103 of file piercedStorage.tpp.
◆ rawEmplaceBack() [2/2]
|
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.
- Parameters
-
value is the value assigned to the new element
Definition at line 1124 of file piercedStorage.tpp.
◆ rawEmreplace()
|
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.
- Parameters
-
pos is the position where the new element will be inserted args are the arguments forwarded to construct the new element
Definition at line 1139 of file piercedStorage.tpp.
◆ rawEnd() [1/2]
|
noexcept |
Returns a constant iterator referring to the past-the-end element in the raw container.
- Returns
- A constant iterator referring to the past-the-end element in the raw container.
Definition at line 1776 of file piercedStorage.tpp.
◆ rawEnd() [2/2]
|
noexcept |
Returns an iterator referring to the past-the-end element in the raw container.
- Returns
- An iterator referring to the past-the-end element in the raw container.
Definition at line 1750 of file piercedStorage.tpp.
◆ rawErase()
|
protected |
Erase the specified number of elements from the storage
- Parameters
-
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.
◆ rawFind() [1/2]
|
noexcept |
Gets a constant iterator pointing to the specified position.
- Parameters
-
pos is the requested position
- Returns
- A constant iterator pointing to the specified position.
Definition at line 1657 of file piercedStorage.tpp.
◆ rawFind() [2/2]
|
noexcept |
Gets an iterator pointing to the specified position.
- Parameters
-
pos is the requested position
- Returns
- An iterator pointing to the specified position.
Definition at line 1645 of file piercedStorage.tpp.
◆ rawInitialize() [1/2]
|
protected |
Initialize an element.
- Parameters
-
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.
◆ rawInitialize() [2/2]
|
protected |
Initialize the specified field of an element.
- Parameters
-
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 1028 of file piercedStorage.tpp.
◆ rawInsert()
|
protected |
Insert the specified number of elements in the storage
- Parameters
-
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 1041 of file piercedStorage.tpp.
◆ rawPushBack()
|
protected |
Adds a new element at the end of the storage, after its current last element.
- Parameters
-
value is the value to be copied (or moved) to the inserted elements
Definition at line 1052 of file piercedStorage.tpp.
◆ rawReorder()
|
protected |
Reorder the storage according to the specified permutations.
- Parameters
-
permutations are the permutations that wil be applied
Definition at line 967 of file piercedStorage.tpp.
◆ rawReserve()
|
protected |
Requests that the storage capacity be at least enough to contain n elements.
- Parameters
-
n is the minimum capacity requested for the vector, expressed in number of elements
Definition at line 860 of file piercedStorage.tpp.
◆ rawResize()
|
protected |
Resizes the container so that it contains n elements.
- Parameters
-
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.
◆ rawSet() [1/4]
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.
- Parameters
-
pos is the raw position of the item value is the value that will be set
Definition at line 1561 of file piercedStorage.tpp.
◆ rawSet() [2/4]
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.
- Parameters
-
pos is the raw position of the item values is a pointer to the values that will be set
Definition at line 1588 of file piercedStorage.tpp.
◆ rawSet() [3/4]
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.
- Parameters
-
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 1576 of file piercedStorage.tpp.
◆ rawSet() [4/4]
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.
- Parameters
-
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 1602 of file piercedStorage.tpp.
◆ rawShrinkToFit()
|
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.
◆ rawSize()
|
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.
- Returns
- The number of raw positions in the storage.
Definition at line 723 of file piercedStorage.tpp.
◆ rawSwap()
|
protected |
Swaps two elements.
This template is used for all types of values with the exception of boolean values.
- Parameters
-
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.
- Parameters
-
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.
◆ restore()
void bitpit::PiercedStorage< value_t, id_t >::restore | ( | std::istream & | stream | ) |
Restore the storage.
- Parameters
-
stream is the stream data should be read from
Definition at line 1812 of file piercedStorage.tpp.
◆ set() [1/4]
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
const value_t & | value ) |
Set all the fields of the specified item.
- Parameters
-
id is the id of the item value is the value that will be set
Definition at line 1443 of file piercedStorage.tpp.
◆ set() [2/4]
void bitpit::PiercedStorage< value_t, id_t >::set | ( | id_t | id, |
const value_t * | values ) |
Set all the fields of the specified item.
- Parameters
-
id is the id of the item values is a pointer to the values that will be set
Definition at line 1472 of file piercedStorage.tpp.
◆ set() [3/4]
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.
- Parameters
-
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 1458 of file piercedStorage.tpp.
◆ set() [4/4]
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.
- Parameters
-
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 1488 of file piercedStorage.tpp.
◆ swap()
|
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.
- Parameters
-
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 1166 of file piercedStorage.tpp.
Friends And Related Symbol Documentation
◆ PiercedStorageIterator
|
friend |
Definition at line 150 of file piercedStorage.hpp.
The documentation for this class was generated from the following files:
- src/containers/piercedStorage.hpp
- src/containers/piercedStorage.tpp
