Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
bitpit::PiercedStorage< value_t, id_t > Class Template Reference

Metafunction for generating a pierced storage. More...

#include <piercedStorage.hpp>

Inheritance diagram for bitpit::PiercedStorage< value_t, id_t >:
Inheritance graph
[legend]
Collaboration diagram for bitpit::PiercedStorage< value_t, id_t >:
Collaboration graph
[legend]

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
 
PiercedStorageoperator= (const PiercedStorage &other)
 
PiercedStorageoperator= (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
 

Detailed Description

template<typename value_t, typename id_t = long>
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_tis the type of the elements stored in the storage
id_tis the type of the ids associated to the elements
Examples
POD_example_00002.cpp, POD_example_00005.cpp, and voloctree_adaptation_example_00001.cpp.

Definition at line 146 of file piercedStorage.hpp.

Member Typedef Documentation

◆ const_iterator

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
typedef std::vector<value_t> bitpit::PiercedStorage< value_t, id_t >::container_t

Container

Definition at line 258 of file piercedStorage.hpp.

◆ EnableIfHasInitialize

template<typename value_t , typename id_t = long>
template<typename... Args>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
typedef PiercedStorageIterator<value_t, id_t> bitpit::PiercedStorage< value_t, id_t >::iterator

Iterator

Definition at line 283 of file piercedStorage.hpp.

◆ Kernel

template<typename value_t , typename id_t = long>
template<typename PK_id_t >
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

template<typename value_t , typename id_t = long>
typedef Kernel<id_t> bitpit::PiercedStorage< value_t, id_t >::kernel_t

Kernel

Definition at line 248 of file piercedStorage.hpp.

◆ KernelType

template<typename value_t , typename id_t = long>
typedef PiercedStorageSyncSlave<id_t>::KernelType bitpit::PiercedStorage< value_t, id_t >::KernelType

Kernel type

Definition at line 253 of file piercedStorage.hpp.

◆ pointer

template<typename value_t , typename id_t = long>
typedef container_t::pointer bitpit::PiercedStorage< value_t, id_t >::pointer

Pointer

Definition at line 273 of file piercedStorage.hpp.

◆ range

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
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

template<typename value_t , typename id_t = long>
typedef container_t::reference bitpit::PiercedStorage< value_t, id_t >::reference

Reference

Definition at line 263 of file piercedStorage.hpp.

◆ value_type

template<typename value_t , typename id_t = long>
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]

template<typename value_t , typename id_t >
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage ( )

Constructor.

Definition at line 417 of file piercedStorage.tpp.

◆ PiercedStorage() [2/10]

template<typename value_t , typename id_t >
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage ( std::size_t nFields)

Constructor.

Parameters
nFieldsis the number of fields in the storage

Definition at line 428 of file piercedStorage.tpp.

◆ PiercedStorage() [3/10]

template<typename value_t , typename id_t >
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage ( std::size_t nFields,
const PiercedKernel< id_t > * kernel )

Constructor.

Parameters
nFieldsis the number of fields in the storage
kernelis the kernel that will be set

Definition at line 440 of file piercedStorage.tpp.

◆ PiercedStorage() [4/10]

template<typename value_t , typename id_t >
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage ( std::size_t nFields,
const PiercedKernel< id_t > * kernel,
PiercedSyncMaster::SyncMode syncMode )

Constructor.

Parameters
nFieldsis the number of fields in the storage
kernelis the kernel that will be set
syncModeis the synchronization mode that will be used for the storage

Definition at line 455 of file piercedStorage.tpp.

◆ PiercedStorage() [5/10]

template<typename value_t , typename id_t >
bitpit::PiercedStorage< value_t, id_t >::PiercedStorage ( const PiercedStorage< value_t, id_t > & other)

Constructor.

Parameters
otheris 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]

template<typename value_t , typename id_t >
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
otheris another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container
kernelis the kernel that will be set

Definition at line 496 of file piercedStorage.tpp.

◆ PiercedStorage() [7/10]

template<typename value_t , typename id_t >
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
otheris another container of the same type (i.e., instantiated with the same template parameters) whose content is copied in this container
kernelis the kernel that will be set
syncModeis the synchronization mode that will be used for the storage

Definition at line 518 of file piercedStorage.tpp.

◆ PiercedStorage() [8/10]

template<typename value_t , typename id_t >
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
otheris 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]

template<typename value_t , typename id_t >
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
otheris another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container
kernelis the kernel that will be set

Definition at line 580 of file piercedStorage.tpp.

◆ PiercedStorage() [10/10]

template<typename value_t , typename id_t >
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
otheris another container of the same type (i.e., instantiated with the same template parameters) whose content is moved in this container
kernelis the kernel that will be set
syncModeis the synchronization mode that will be used for the storage

Definition at line 612 of file piercedStorage.tpp.

Member Function Documentation

◆ _postSetDynamicKernel()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::_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< id_t >.

Definition at line 693 of file piercedStorage.tpp.

◆ _postSetStaticKernel()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::_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
kernelis the kernel that will be set

Reimplemented from bitpit::PiercedStorageSyncSlave< id_t >.

Definition at line 680 of file piercedStorage.tpp.

◆ _postUnsetKernel()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::_postUnsetKernel ( bool release = true)
overrideprotectedvirtual

Internal function that will be called after unsetting the kernel.

Parameters
releaseif 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.

◆ at() [1/2]

template<typename value_t , typename id_t >
__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
idis the id of the item
kis 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 1340 of file piercedStorage.tpp.

◆ at() [2/2]

template<typename value_t , typename id_t >
__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
idis the id of the item
kis the index of the requested field
Returns
A constant reference to the requested field of the specfied item.

Definition at line 1355 of file piercedStorage.tpp.

◆ back() [1/2]

template<typename value_t , typename id_t >
__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
kis the index of the requested field
Returns
A reference to the last element of the container.

Definition at line 1304 of file piercedStorage.tpp.

◆ back() [2/2]

template<typename value_t , typename id_t >
__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
kis the index of the requested field
Returns
A constant reference to the last element of the container.

Definition at line 1322 of file piercedStorage.tpp.

◆ begin() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::begin ( ) const
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 1670 of file piercedStorage.tpp.

◆ begin() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::iterator bitpit::PiercedStorage< value_t, id_t >::begin ( )
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 1648 of file piercedStorage.tpp.

◆ cbegin()

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::cbegin ( ) const
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 1694 of file piercedStorage.tpp.

◆ cend()

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::cend ( ) const
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 1706 of file piercedStorage.tpp.

◆ commitSyncAction()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::commitSyncAction ( const PiercedSyncAction & action)
overrideprotectedvirtual

Commit the specified synchronization action.

Is the action requires new elements to be inserted in the storage, empty elements will be inserted.

Parameters
actionis the synchronization action that will be commited

Implements bitpit::PiercedSyncSlave.

Definition at line 737 of file piercedStorage.tpp.

◆ copy() [1/2]

template<typename value_t , typename id_t >
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
idis the id of the item
nFieldsis the number of fields that will be copied
offsetis the offset used for setting the fields
valuesis a pointer to the destination

Definition at line 1409 of file piercedStorage.tpp.

◆ copy() [2/2]

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::copy ( id_t id,
value_t * values ) const

Copy all the fields of the specified item.

Parameters
idis the id of the item
valuesis a pointer to the destination

Definition at line 1393 of file piercedStorage.tpp.

◆ data() [1/4]

template<typename value_t , typename id_t >
__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 1194 of file piercedStorage.tpp.

◆ data() [2/4]

template<typename value_t , typename id_t >
__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 1181 of file piercedStorage.tpp.

◆ data() [3/4]

template<typename value_t , typename id_t >
__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
idthe id of the item
offsetis the offset relative to the first field
Returns
A pointer to the data of the specfied item.

Definition at line 1207 of file piercedStorage.tpp.

◆ data() [4/4]

template<typename value_t , typename id_t >
__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
idthe id of the item
offsetis the offset relative to the first field
Returns
A constant pointer to the data of the specfied item.

Definition at line 1222 of file piercedStorage.tpp.

◆ dump()

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if< std::is_pod< T >::value||PiercedStorage< T, id_t >::has_dump()>::type * >
void bitpit::PiercedStorage< value_t, id_t >::dump ( std::ostream & stream) const

Dump the storage.

Parameters
streamis the stream data should be written to

Definition at line 1853 of file piercedStorage.tpp.

◆ end() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::end ( ) const
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 1683 of file piercedStorage.tpp.

◆ end() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::iterator bitpit::PiercedStorage< value_t, id_t >::end ( )
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 1659 of file piercedStorage.tpp.

◆ fill()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::fill ( const value_t & value)

Assigns the given value to all the elements in the storage.

Parameters
valueis the value to be assigned

Definition at line 1168 of file piercedStorage.tpp.

◆ find() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::find ( const id_t & id) const
noexcept

Gets a constant iterator pointing to the specified element.

Parameters
idis the id of the specified iterator.
Returns
A constant iterator pointing to the specified element.

Definition at line 1611 of file piercedStorage.tpp.

◆ find() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::iterator bitpit::PiercedStorage< value_t, id_t >::find ( const id_t & id)
noexcept

Gets an iterator pointing to the specified element.

Parameters
idis the id of the specified iterator.
Returns
An iterator pointing to the specified element.

Definition at line 1597 of file piercedStorage.tpp.

◆ front() [1/2]

template<typename value_t , typename id_t >
__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
kis the index of the requested field
Returns
A reference to the first element of the container.

Definition at line 1268 of file piercedStorage.tpp.

◆ front() [2/2]

template<typename value_t , typename id_t >
__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
kis the index of the requested field
Returns
A constant reference to the first element of the container.

Definition at line 1286 of file piercedStorage.tpp.

◆ getFieldCount()

template<typename value_t , typename id_t >
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()

template<typename value_t , typename id_t = long>
static constexpr bool bitpit::PiercedStorage< value_t, id_t >::has_dump ( )
inlinestaticconstexpr

Checks if the storage has the 'dump' capability

Definition at line 321 of file piercedStorage.hpp.

◆ has_initialize()

template<typename value_t , typename id_t = long>
template<typename... Args>
static constexpr bool bitpit::PiercedStorage< value_t, id_t >::has_initialize ( )
inlinestaticconstexpr

Checks if the storage has the 'initialize' capability

Definition at line 330 of file piercedStorage.hpp.

◆ has_restore()

template<typename value_t , typename id_t = long>
static constexpr bool bitpit::PiercedStorage< value_t, id_t >::has_restore ( )
inlinestaticconstexpr

Checks if the storage has the 'restore' capability

Definition at line 313 of file piercedStorage.hpp.

◆ operator=() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= ( const PiercedStorage< value_t, id_t > & other)

Copy assignment operator.

Parameters
otheris 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]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t > & bitpit::PiercedStorage< value_t, id_t >::operator= ( PiercedStorage< value_t, id_t > && other)

Move assignment operator.

Parameters
otheris 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]

template<typename value_t , typename id_t >
__PS_REFERENCE__ bitpit::PiercedStorage< value_t, id_t >::operator[] ( id_t id)

Gets a reference to the first field of the specfied item.

Parameters
idis the id of the item
Returns
A reference to the requested field of the specfied item.

Definition at line 1369 of file piercedStorage.tpp.

◆ operator[]() [2/2]

template<typename value_t , typename id_t >
__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
idis the id of the item
Returns
A constant reference to the requested field of the specfied item.

Definition at line 1381 of file piercedStorage.tpp.

◆ rawAt() [1/2]

template<typename value_t , typename id_t >
__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
posis the raw position of the item
kis the index of the requested field
Returns
A reference to the requested field of the item at the specified raw position.

Definition at line 1485 of file piercedStorage.tpp.

◆ rawAt() [2/2]

template<typename value_t , typename id_t >
__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
posis the raw position of the item
kis 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 1500 of file piercedStorage.tpp.

◆ rawBegin() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_const_iterator bitpit::PiercedStorage< value_t, id_t >::rawBegin ( ) const
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 1743 of file piercedStorage.tpp.

◆ rawBegin() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_iterator bitpit::PiercedStorage< value_t, id_t >::rawBegin ( )
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 1717 of file piercedStorage.tpp.

◆ rawCbegin()

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_const_iterator bitpit::PiercedStorage< value_t, id_t >::rawCbegin ( ) const
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 1767 of file piercedStorage.tpp.

◆ rawCend()

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_const_iterator bitpit::PiercedStorage< value_t, id_t >::rawCend ( ) const
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 1780 of file piercedStorage.tpp.

◆ rawClear()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawClear ( bool release)
protected

Clears the contents of the storage.

Parameters
releaseif 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]

template<typename value_t , typename id_t >
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
posis the raw position of the item
nFieldsis the number of fields that will be copied
offsetis the offset used for setting the fields
valuesis a pointer to the destination

Definition at line 1526 of file piercedStorage.tpp.

◆ rawCopy() [2/2]

template<typename value_t , typename id_t >
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
posis the raw position of the item
valuesis a pointer to the destination

Definition at line 1512 of file piercedStorage.tpp.

◆ rawData() [1/2]

template<typename value_t , typename id_t >
__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
posis the raw position of the item
offsetis 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 1239 of file piercedStorage.tpp.

◆ rawData() [2/2]

template<typename value_t , typename id_t >
__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
posis the raw position of the item
offsetis the offset relative to the first field
Returns
A pointer to the data of the item at the specified raw position.

Definition at line 1254 of file piercedStorage.tpp.

◆ rawEmplace() [1/2]

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if<!std::is_same< T, bool >::value >::type * , typename... Args>
void bitpit::PiercedStorage< value_t, id_t >::rawEmplace ( std::size_t pos,
Args &&... args )
protected

Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.

Parameters
posis the position where the new element will be inserted
argsare the arguments forwarded to construct the new element

Definition at line 1063 of file piercedStorage.tpp.

◆ rawEmplace() [2/2]

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if< std::is_same< T, bool >::value >::type * >
void bitpit::PiercedStorage< value_t, id_t >::rawEmplace ( std::size_t pos,
bool value = false )
protected

Create a new element in the storage. This new element is constructed in place using args as the arguments for its construction.

Parameters
posis the position where the new element will be inserted
valueis the value assigned to the new element

Definition at line 1079 of file piercedStorage.tpp.

◆ rawEmplaceBack() [1/2]

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if<!std::is_same< T, bool >::value >::type * , typename... Args>
void bitpit::PiercedStorage< value_t, id_t >::rawEmplaceBack ( Args &&... args)
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
argsare the arguments forwarded to construct the new element

Definition at line 1093 of file piercedStorage.tpp.

◆ rawEmplaceBack() [2/2]

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if< std::is_same< T, bool >::value >::type * >
void bitpit::PiercedStorage< value_t, id_t >::rawEmplaceBack ( bool value = false)
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
valueis the value assigned to the new element

Definition at line 1109 of file piercedStorage.tpp.

◆ rawEmreplace()

template<typename value_t , typename id_t >
template<typename... Args>
void bitpit::PiercedStorage< value_t, id_t >::rawEmreplace ( std::size_t pos,
Args &&... args )
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
posis the position where the new element will be inserted
argsare the arguments forwarded to construct the new element

Definition at line 1124 of file piercedStorage.tpp.

◆ rawEnd() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_const_iterator bitpit::PiercedStorage< value_t, id_t >::rawEnd ( ) const
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 1756 of file piercedStorage.tpp.

◆ rawEnd() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::raw_iterator bitpit::PiercedStorage< value_t, id_t >::rawEnd ( )
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 1730 of file piercedStorage.tpp.

◆ rawErase()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawErase ( std::size_t pos,
std::size_t n )
protected

Erase the specified number of elements from the storage

Parameters
posis the position of the first element that will be deleted
nis the number of elements that will be deleted

Definition at line 904 of file piercedStorage.tpp.

◆ rawFind() [1/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::const_iterator bitpit::PiercedStorage< value_t, id_t >::rawFind ( std::size_t pos) const
noexcept

Gets a constant iterator pointing to the specified position.

Parameters
posis the requested position
Returns
A constant iterator pointing to the specified position.

Definition at line 1637 of file piercedStorage.tpp.

◆ rawFind() [2/2]

template<typename value_t , typename id_t >
PiercedStorage< value_t, id_t >::iterator bitpit::PiercedStorage< value_t, id_t >::rawFind ( std::size_t pos)
noexcept

Gets an iterator pointing to the specified position.

Parameters
posis the requested position
Returns
An iterator pointing to the specified position.

Definition at line 1625 of file piercedStorage.tpp.

◆ rawInitialize() [1/2]

template<typename value_t , typename id_t >
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * >
void bitpit::PiercedStorage< value_t, id_t >::rawInitialize ( std::size_t pos,
Args &&... args )
protected

Initialize an element.

Parameters
posis the position of the element to initialize
argsare the arguments forwarded to initialize the new element

Definition at line 1007 of file piercedStorage.tpp.

◆ rawInitialize() [2/2]

template<typename value_t , typename id_t >
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * >
void bitpit::PiercedStorage< value_t, id_t >::rawInitialize ( std::size_t pos,
std::size_t k,
Args &&... args )
protected

Initialize the specified field of an element.

Parameters
posis the position of the element to initialize
kis the index of the field to initialize
argsare the arguments forwarded to initialize the new element

Definition at line 1023 of file piercedStorage.tpp.

◆ rawInsert()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawInsert ( std::size_t pos,
std::size_t n,
const value_t & value )
protected

Insert the specified number of elements in the storage

Parameters
posis the position where the new elements will be inserted
nis the number of new elements that will be inserted
valueis the value to be copied (or moved) to the inserted elements

Definition at line 1036 of file piercedStorage.tpp.

◆ rawPushBack()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawPushBack ( const value_t & value)
protected

Adds a new element at the end of the storage, after its current last element.

Parameters
valueis the value to be copied (or moved) to the inserted elements

Definition at line 1047 of file piercedStorage.tpp.

◆ rawReorder()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawReorder ( const std::vector< std::size_t > & permutations)
protected

Reorder the storage according to the specified permutations.

Parameters
permutationsare the permutations that wil be applied

Definition at line 967 of file piercedStorage.tpp.

◆ rawReserve()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawReserve ( std::size_t n)
protected

Requests that the storage capacity be at least enough to contain n elements.

Parameters
nis the minimum capacity requested for the vector, expressed in number of elements

Definition at line 860 of file piercedStorage.tpp.

◆ rawResize()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::rawResize ( std::size_t n,
const value_t & value = value_t() )
protected

Resizes the container so that it contains n elements.

Parameters
nis the new container size, expressed in number of elements
valueis the value to be copied (or moved) to the newly created elements

Definition at line 994 of file piercedStorage.tpp.

◆ rawSet() [1/4]

template<typename value_t , typename id_t >
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
posis the raw position of the item
valueis the value that will be set

Definition at line 1541 of file piercedStorage.tpp.

◆ rawSet() [2/4]

template<typename value_t , typename id_t >
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
posis the raw position of the item
valuesis a pointer to the values that will be set

Definition at line 1568 of file piercedStorage.tpp.

◆ rawSet() [3/4]

template<typename value_t , typename id_t >
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
posis the raw position of the item
kis the index of the requested field
valueis the value that will be set

Definition at line 1556 of file piercedStorage.tpp.

◆ rawSet() [4/4]

template<typename value_t , typename id_t >
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
posis the raw position of the item
nFieldsis the number of fields that will be set
offsetis the offset used for setting the fields
valuesis a pointer to the values that will be set

Definition at line 1582 of file piercedStorage.tpp.

◆ rawShrinkToFit()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::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()

template<typename value_t , typename id_t >
std::size_t bitpit::PiercedStorage< value_t, id_t >::rawSize ( ) const
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()

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if< std::is_same< T, bool >::value >::type * >
void bitpit::PiercedStorage< value_t, id_t >::rawSwap ( std::size_t pos_first,
std::size_t pos_second )
protected

Swaps two elements.

This template is used for all types of values with the exception of boolean values.

Parameters
pos_firstis the position of the first element that will be swapped
pos_secondis 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_firstis the position of the first element that will be swapped
pos_secondis the position of the second element that will be swapped

Definition at line 923 of file piercedStorage.tpp.

◆ restore()

template<typename value_t , typename id_t >
template<typename T , typename std::enable_if< std::is_pod< T >::value||PiercedStorage< T, id_t >::has_restore()>::type * >
void bitpit::PiercedStorage< value_t, id_t >::restore ( std::istream & stream)

Restore the storage.

Parameters
streamis the stream data should be read from

Definition at line 1792 of file piercedStorage.tpp.

◆ set() [1/4]

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::set ( id_t id,
const value_t & value )

Set all the fields of the specified item.

Parameters
idis the id of the item
valueis the value that will be set
Examples
voloctree_adaptation_example_00001.cpp.

Definition at line 1423 of file piercedStorage.tpp.

◆ set() [2/4]

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::set ( id_t id,
const value_t * values )

Set all the fields of the specified item.

Parameters
idis the id of the item
valuesis a pointer to the values that will be set

Definition at line 1452 of file piercedStorage.tpp.

◆ set() [3/4]

template<typename value_t , typename id_t >
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
idis the id of the item
kis the index of the requested field
valueis the value that will be set

Definition at line 1438 of file piercedStorage.tpp.

◆ set() [4/4]

template<typename value_t , typename id_t >
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
idis the id of the item
nFieldsis the number of fields that will be set
offsetis the offset used for setting the fields
valuesis a pointer to the values that will be set

Definition at line 1468 of file piercedStorage.tpp.

◆ swap()

template<typename value_t , typename id_t >
void bitpit::PiercedStorage< value_t, id_t >::swap ( PiercedStorage< value_t, id_t > & other)
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
otheris 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.

Friends And Related Symbol Documentation

◆ PiercedStorageIterator

template<typename value_t , typename id_t = long>
template<typename PI_value_t , typename PI_id_t , typename PI_value_no_cv_t >
friend class PiercedStorageIterator
friend

Definition at line 150 of file piercedStorage.hpp.


The documentation for this class was generated from the following files:
--- layout: doxygen_footer ---