Loading...
Searching...
No Matches
Public Member Functions | List of all members
bitpit::PiercedVectorStorage< value_t, id_t > Class Template Reference

Kernel of the pierced vector. More...

#include <piercedVectorStorage.hpp>

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

Public Member Functions

__PVS_REFERENCE__ at (id_t id)
 
__PVS_CONST_REFERENCE__ at (id_t id) const
 
__PVS_REFERENCE__ back ()
 
__PVS_CONST_REFERENCE__ back () const
 
__PVS_REFERENCE__ front ()
 
__PVS_CONST_REFERENCE__ front () const
 
const PiercedVectorKernel< id_t > * getKernel () const
 
__PVS_REFERENCE__ operator[] (id_t id)
 
__PVS_CONST_REFERENCE__ operator[] (id_t id) const
 
__PVS_REFERENCE__ rawAt (std::size_t pos)
 
__PVS_CONST_REFERENCE__ rawAt (std::size_t pos) const
 
void setDynamicKernel (const PiercedVectorKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
void setStaticKernel (const PiercedVectorKernel< id_t > *kernel)
 
- Public Member Functions inherited from bitpit::PiercedStorage< value_t, id_t >
 PiercedStorage ()
 
 PiercedStorage (const PiercedStorage< value_t, id_t > &other)
 
 PiercedStorage (const PiercedStorage< value_t, id_t > &other, const PiercedKernel< id_t > *kernel)
 
 PiercedStorage (const PiercedStorage< value_t, id_t > &other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
 PiercedStorage (PiercedStorage< value_t, id_t > &&other)
 
 PiercedStorage (PiercedStorage< value_t, id_t > &&other, const PiercedKernel< id_t > *kernel)
 
 PiercedStorage (PiercedStorage< value_t, id_t > &&other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
 PiercedStorage (std::size_t nFields)
 
 PiercedStorage (std::size_t nFields, const PiercedKernel< id_t > *kernel)
 
 PiercedStorage (std::size_t nFields, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
__PS_REFERENCE__ at (id_t id, std::size_t k=0)
 
__PS_CONST_REFERENCE__ at (id_t id, std::size_t k=0) const
 
__PS_REFERENCE__ back (std::size_t k=0)
 
__PS_CONST_REFERENCE__ back (std::size_t k=0) const
 
const_iterator begin () const noexcept
 
iterator begin () noexcept
 
const_iterator cbegin () const noexcept
 
const_iterator cend () const noexcept
 
void copy (id_t id, std::size_t nFields, std::size_t offset, value_t *values) const
 
void copy (id_t id, value_t *values) const
 
__PS_POINTER__ data ()
 
__PS_CONST_POINTER__ data () const
 
__PS_POINTER__ data (id_t id, std::size_t offset=0)
 
__PS_CONST_POINTER__ data (id_t id, std::size_t offset=0) const
 
template<typename T = value_t, typename std::enable_if< std::is_pod< T >::value||PiercedStorage< T, id_t >::has_dump()>::type * = nullptr>
void dump (std::ostream &stream) const
 
const_iterator end () const noexcept
 
iterator end () noexcept
 
void fill (const value_t &value)
 
const_iterator find (const id_t &id) const noexcept
 
iterator find (const id_t &id) noexcept
 
__PS_REFERENCE__ front (std::size_t k=0)
 
__PS_CONST_REFERENCE__ front (std::size_t k=0) const
 
std::size_t getFieldCount () const
 
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)
 

Additional Inherited Members

- Public Types inherited from bitpit::PiercedStorage< value_t, id_t >
typedef PiercedStorageIterator< const value_t, id_t > const_iterator
 
typedef container_t::const_pointer const_pointer
 
typedef PiercedStorageRange< const value_t, id_t > const_range
 
typedef container_t::const_reference const_reference
 
typedef std::vector< value_t > container_t
 
template<typename... Args>
using EnableIfHasInitialize = typename std::enable_if<PiercedStorage<value_t, id_t>::template has_initialize<Args...>()>::type
 
typedef Kernel< id_t >::id_type id_type
 
typedef PiercedStorageIterator< value_t, id_t > iterator
 
template<typename PK_id_t >
using Kernel = typename PiercedStorageSyncSlave<id_t>::template Kernel<PK_id_t>
 
typedef Kernel< id_t > kernel_t
 
typedef PiercedStorageSyncSlave< id_t >::KernelType KernelType
 
typedef container_t::pointer pointer
 
typedef PiercedStorageRange< value_t, id_t > range
 
typedef std::vector< value_t >::const_iterator raw_const_iterator
 
typedef std::vector< value_t >::iterator raw_iterator
 
typedef container_t::reference reference
 
typedef value_t value_type
 
- Public Types inherited from bitpit::PiercedStorageSyncSlave< id_t >
typedef Kernel< id_t >::id_type id_type
 
template<typename PK_id_t >
using Kernel = PiercedKernel<PK_id_t>
 
typedef Kernel< id_t > kernel_t
 
enum  KernelType { KERNEL_NONE = -1 , KERNEL_STATIC = 0 , KERNEL_DYNAMIC = 1 }
 
- Static Public Member Functions inherited from bitpit::PiercedStorage< value_t, id_t >
static constexpr bool has_dump ()
 
template<typename... Args>
static constexpr bool has_initialize ()
 
static constexpr bool has_restore ()
 
- Protected Member Functions inherited from bitpit::PiercedStorage< value_t, id_t >
void _postSetDynamicKernel () override
 
void _postSetStaticKernel () override
 
void _postUnsetKernel (bool release=true) override
 
void commitSyncAction (const PiercedSyncAction &action) override
 
void rawClear (bool release)
 
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr, typename... Args>
void rawEmplace (std::size_t pos, Args &&... args)
 
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr>
void rawEmplace (std::size_t pos, bool value=false)
 
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr, typename... Args>
void rawEmplaceBack (Args &&... args)
 
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr>
void rawEmplaceBack (bool value=false)
 
template<typename... Args>
void rawEmreplace (std::size_t pos, Args &&... args)
 
void rawErase (std::size_t pos, std::size_t n)
 
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * = nullptr>
void rawInitialize (std::size_t pos, Args &&... args)
 
template<typename... Args, typename PiercedStorage< value_t >::template EnableIfHasInitialize< Args... > * = nullptr>
void rawInitialize (std::size_t pos, std::size_t k, Args &&... args)
 
void rawInsert (std::size_t pos, std::size_t n, const value_t &value)
 
void rawPushBack (const value_t &value)
 
void rawReorder (const std::vector< std::size_t > &permutations)
 
void rawReserve (std::size_t n)
 
void rawResize (std::size_t n, const value_t &value=value_t())
 
void rawShrinkToFit ()
 
std::size_t rawSize () const
 
template<typename T = value_t, typename std::enable_if<!std::is_same< T, bool >::value >::type * = nullptr>
void rawSwap (std::size_t pos_first, std::size_t pos_second)
 
template<typename T = value_t, typename std::enable_if< std::is_same< T, bool >::value >::type * = nullptr>
void rawSwap (std::size_t pos_first, std::size_t pos_second)
 
- Protected Member Functions inherited from bitpit::PiercedStorageSyncSlave< id_t >
 PiercedStorageSyncSlave ()
 
 PiercedStorageSyncSlave (const PiercedKernel< id_t > *kernel)
 
 PiercedStorageSyncSlave (const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
 PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other)
 
 PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other, const PiercedKernel< id_t > *kernel)
 
 PiercedStorageSyncSlave (const PiercedStorageSyncSlave< id_t > &other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
 PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other)
 
 PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other, const PiercedKernel< id_t > *kernel)
 
 PiercedStorageSyncSlave (PiercedStorageSyncSlave< id_t > &&other, const PiercedKernel< id_t > *kernel, PiercedSyncMaster::SyncMode syncMode)
 
void detachKernel ()
 
- Protected Member Functions inherited from bitpit::PiercedSyncSlave
 PiercedSyncSlave ()
 
void swap (PiercedSyncSlave &other) noexcept
 
- Protected Attributes inherited from bitpit::PiercedStorageSyncSlave< id_t >
const PiercedKernel< id_t > * m_kernel
 
KernelType m_kernelType
 

Detailed Description

template<typename value_t, typename id_t = long>
class bitpit::PiercedVectorStorage< value_t, id_t >

Kernel of the pierced vector.

Definition at line 56 of file piercedVectorStorage.hpp.

Member Function Documentation

◆ at() [1/2]

template<typename value_t , typename id_t >
__PVS_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::at ( id_t id)

Returns a reference to the element with the specified id.

If there is no element with the specified id, an exception is thrown.

Parameters
idis the id of the element
Returns
A reference to the element with the specified id.
Examples
voloctree_adaptation_example_00001.cpp.

Definition at line 91 of file piercedVectorStorage.tpp.

◆ at() [2/2]

template<typename value_t , typename id_t >
__PVS_CONST_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::at ( id_t id) const

Returns a constant reference to the element with the specified id.

If there is no element with the specified id, an exception is thrown.

Parameters
idis the id of the element
Returns
A constant reference to the element with the specified id.

Definition at line 105 of file piercedVectorStorage.tpp.

◆ back() [1/2]

template<typename value_t , typename id_t >
__PVS_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::back ( )

Returns a reference to the last element of the container.

If the container is empty, an exception is thrown.

Returns
A reference to the last element of the container.

Definition at line 64 of file piercedVectorStorage.tpp.

◆ back() [2/2]

template<typename value_t , typename id_t >
__PVS_CONST_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::back ( ) const

Returns a constant reference to the last element of the container.

If the container is empty, an exception is thrown.

Returns
A constant reference to the last element of the container.

Definition at line 77 of file piercedVectorStorage.tpp.

◆ front() [1/2]

template<typename value_t , typename id_t >
__PVS_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::front ( )

Returns a reference to the first element of the container.

If the container is empty, an exception is thrown.

Returns
A reference to the first element of the container.

Definition at line 38 of file piercedVectorStorage.tpp.

◆ front() [2/2]

template<typename value_t , typename id_t >
__PVS_CONST_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::front ( ) const

Returns a constant reference to the first element of the container.

If the container is empty, an exception is thrown.

Returns
A constant reference to the first element of the container.

Definition at line 51 of file piercedVectorStorage.tpp.

◆ getKernel()

template<typename value_t , typename id_t >
const PiercedVectorKernel< id_t > * bitpit::PiercedVectorStorage< value_t, id_t >::getKernel ( ) const

Gets a constant reference to the kernel of the storage

Returns
A constant reference to the kernel of the storage.

Definition at line 196 of file piercedVectorStorage.tpp.

◆ operator[]() [1/2]

template<typename value_t , typename id_t >
__PVS_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::operator[] ( id_t id)

Returns a reference to the element with the specified id.

If there is no element with the specified id, an exception is thrown.

Parameters
idis the id of the element
Returns
A reference to the element with the specified id.

Definition at line 157 of file piercedVectorStorage.tpp.

◆ operator[]() [2/2]

template<typename value_t , typename id_t >
__PVS_CONST_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::operator[] ( id_t id) const

Returns a constant reference to the element with the specified id.

If there is no element with the specified id, an exception is thrown.

Parameters
idis the id of the element
Returns
A constant reference to the element with the specified id.

Definition at line 143 of file piercedVectorStorage.tpp.

◆ rawAt() [1/2]

template<typename value_t , typename id_t >
__PVS_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::rawAt ( std::size_t pos)

Returns a reference to the element at the specified position.

Parameters
posthe position of the element
Returns
A reference to the element in the specified position.

Definition at line 117 of file piercedVectorStorage.tpp.

◆ rawAt() [2/2]

template<typename value_t , typename id_t >
__PVS_CONST_REFERENCE__ bitpit::PiercedVectorStorage< value_t, id_t >::rawAt ( std::size_t pos) const

Returns a constant reference to the element at the specified position.

Parameters
posthe position of the element
Returns
A constant reference to the element in the specified position.

Definition at line 129 of file piercedVectorStorage.tpp.

◆ setDynamicKernel()

template<typename value_t , typename id_t >
void bitpit::PiercedVectorStorage< value_t, id_t >::setDynamicKernel ( const PiercedVectorKernel< id_t > * kernel,
PiercedSyncMaster::SyncMode syncMode )

Sets the kernel that will be used by the storage.

The storage will dynamically synchronized with the kernel.

Parameters
kernelis the kernel that will be set
syncModeis the synchronization mode that will be used for the storage

Definition at line 185 of file piercedVectorStorage.tpp.

◆ setStaticKernel()

template<typename value_t , typename id_t >
void bitpit::PiercedVectorStorage< value_t, id_t >::setStaticKernel ( const PiercedVectorKernel< id_t > * kernel)

Sets the kernel that will be used by the storage

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

Definition at line 171 of file piercedVectorStorage.tpp.


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