Base class for defining storages that acts like a slave in pierced synchronization. More...
#include <piercedStorage.hpp>


Public Types | |
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 | |
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) |
Protected Attributes | |
const PiercedKernel< id_t > * | m_kernel |
KernelType | m_kernelType |
Detailed Description
class bitpit::PiercedStorageSyncSlave< id_t >
Base class for defining storages that acts like a slave in pierced synchronization.
Definition at line 66 of file piercedStorage.hpp.
Member Typedef Documentation
◆ id_type
typedef Kernel<id_t>::id_type bitpit::PiercedStorageSyncSlave< id_t >::id_type |
Type of ids stored in the container
Definition at line 82 of file piercedStorage.hpp.
◆ Kernel
using bitpit::PiercedStorageSyncSlave< id_t >::Kernel = PiercedKernel<PK_id_t> |
Kernel template
Definition at line 75 of file piercedStorage.hpp.
◆ kernel_t
typedef Kernel<id_t> bitpit::PiercedStorageSyncSlave< id_t >::kernel_t |
Definition at line 87 of file piercedStorage.hpp.
Member Enumeration Documentation
◆ KernelType
enum bitpit::PiercedStorageSyncSlave::KernelType |
Definition at line 90 of file piercedStorage.hpp.
Constructor & Destructor Documentation
◆ ~PiercedStorageSyncSlave()
|
virtual |
Destructor
Definition at line 220 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [1/9]
|
protected |
Constructor.
Definition at line 34 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [2/9]
|
protected |
Constructor.
- Parameters
-
kernel is the kernel that will be set
Definition at line 45 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [3/9]
|
protected |
Constructor.
- Parameters
-
kernel is the kernel that will be set syncMode is the synchronization mode that will be used for the storage
Definition at line 58 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [4/9]
|
protected |
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 71 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [5/9]
|
protected |
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 108 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [6/9]
|
protected |
Constructor.
The newly created pierced sync slave will be associated with the given dynamic kernel and will use the specified 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 128 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [7/9]
|
protected |
Constructor.
- 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 143 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [8/9]
|
protected |
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 moved in this container kernel is the kernel that will be set
Definition at line 184 of file piercedStorage.tpp.
◆ PiercedStorageSyncSlave() [9/9]
|
protected |
Constructor.
The newly created pierced sync slave 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 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 206 of file piercedStorage.tpp.
Member Function Documentation
◆ _postSetDynamicKernel()
|
protectedvirtual |
Internal function that will be called after setting a dynamic kernel.
Reimplemented in bitpit::PiercedStorage< value_t, id_t >, bitpit::PiercedStorage< bitpit::Cell, long >, bitpit::PiercedStorage< bitpit::Interface, long >, bitpit::PiercedStorage< bitpit::mapping::Info >, bitpit::PiercedStorage< bitpit::Vertex, long >, bitpit::PiercedStorage< bool >, bitpit::PiercedStorage< bool, key_t >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double, long >, bitpit::PiercedStorage< long, long >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::size_t >, bitpit::PiercedStorage< stencil_t >, bitpit::PiercedStorage< value_t, key_t >, bitpit::PiercedStorage< value_t, long >, and bitpit::PiercedStorage< value_t, long >.
Definition at line 297 of file piercedStorage.tpp.
◆ _postSetStaticKernel()
|
protectedvirtual |
Internal function that will be called after setting a static kernel.
- Parameters
-
kernel is the kernel that will be set
Reimplemented in bitpit::PiercedStorage< value_t, id_t >, bitpit::PiercedStorage< bitpit::Cell, long >, bitpit::PiercedStorage< bitpit::Interface, long >, bitpit::PiercedStorage< bitpit::mapping::Info >, bitpit::PiercedStorage< bitpit::Vertex, long >, bitpit::PiercedStorage< bool >, bitpit::PiercedStorage< bool, key_t >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double, long >, bitpit::PiercedStorage< long, long >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::size_t >, bitpit::PiercedStorage< stencil_t >, bitpit::PiercedStorage< value_t, key_t >, bitpit::PiercedStorage< value_t, long >, and bitpit::PiercedStorage< value_t, long >.
Definition at line 260 of file piercedStorage.tpp.
◆ _postUnsetKernel()
|
protectedvirtual |
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 in bitpit::PiercedStorage< value_t, id_t >, bitpit::PiercedStorage< bitpit::Cell, long >, bitpit::PiercedStorage< bitpit::Interface, long >, bitpit::PiercedStorage< bitpit::mapping::Info >, bitpit::PiercedStorage< bitpit::Vertex, long >, bitpit::PiercedStorage< bool >, bitpit::PiercedStorage< bool, key_t >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double >, bitpit::PiercedStorage< double, long >, bitpit::PiercedStorage< long, long >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< PS_value_t, PS_id_t >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 > >, bitpit::PiercedStorage< std::array< double, 3 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::array< std::array< double, 3 >, 2 >, long >, bitpit::PiercedStorage< std::size_t >, bitpit::PiercedStorage< stencil_t >, bitpit::PiercedStorage< value_t, key_t >, bitpit::PiercedStorage< value_t, long >, and bitpit::PiercedStorage< value_t, long >.
Definition at line 327 of file piercedStorage.tpp.
◆ detachKernel()
|
protected |
Detach the kernel without clearing the container.
Definition at line 338 of file piercedStorage.tpp.
◆ getKernel()
const PiercedKernel< id_t > * bitpit::PiercedStorageSyncSlave< 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 360 of file piercedStorage.tpp.
◆ getKernelType()
PiercedStorageSyncSlave< id_t >::KernelType bitpit::PiercedStorageSyncSlave< id_t >::getKernelType | ( | ) | const |
Get the type of kernel set for the storage.
- Returns
- The type of kernel set for the storage.
Definition at line 371 of file piercedStorage.tpp.
◆ getSyncMode()
PiercedSyncMaster::SyncMode bitpit::PiercedStorageSyncSlave< id_t >::getSyncMode | ( | ) | const |
Gets the syncronization mode of the storage.
- Returns
- The synchronization mode of the storage.
Definition at line 382 of file piercedStorage.tpp.
◆ setDynamicKernel()
void bitpit::PiercedStorageSyncSlave< id_t >::setDynamicKernel | ( | const PiercedKernel< id_t > * | kernel, |
PiercedSyncMaster::SyncMode | syncMode ) |
Sets the kernel that will be used by the storage.
The storage will dynamically synchronized with the kernel.
If a kernel has already been set for the storage, it is mandatory to unset it before setting a new one. Calling this function when the kernel is already associated with a kernel will lead to an exception being thrown.
- Parameters
-
kernel is the kernel that will be set syncMode is the synchronization mode that will be used for the storage
Definition at line 278 of file piercedStorage.tpp.
◆ setStaticKernel()
void bitpit::PiercedStorageSyncSlave< id_t >::setStaticKernel | ( | const PiercedKernel< 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.
If a kernel has already been set for the storage, it is mandatory to unset it before setting a new one. Calling this function when the kernel is already associated with a kernel will lead to an exception being thrown.
- Parameters
-
kernel is the kernel that will be set
Definition at line 238 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 406 of file piercedStorage.tpp.
◆ unsetKernel()
void bitpit::PiercedStorageSyncSlave< id_t >::unsetKernel | ( | bool | release = true | ) |
Unsets 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
Definition at line 310 of file piercedStorage.tpp.
Member Data Documentation
◆ m_kernel
|
protected |
Definition at line 111 of file piercedStorage.hpp.
◆ m_kernelType
|
protected |
Definition at line 112 of file piercedStorage.hpp.
The documentation for this class was generated from the following files:
- src/containers/piercedKernel.hpp
- src/containers/piercedStorage.hpp
- src/containers/piercedStorage.tpp
