KaMPIng 0.1.0
(Near) zero-overhead C++ MPI bindings.
Loading...
Searching...
No Matches
kamping::internal::ParameterObjectBase Class Reference

Base object for parameter objects which deletes copy constructor and assignment operator and enables move. More...

#include <data_buffer.hpp>

Inheritance diagram for kamping::internal::ParameterObjectBase:
kamping::internal::DataBuffer< size_t, ParameterType, type, BufferModifiability::modifiable, BufferOwnership::owning, BufferType::in_buffer, BufferResizePolicy::no_resize, BufferAllocation::user_allocated > kamping::internal::DataBuffer< MemberType, TParameterType, parameter_type_param, modifiability, ownership, buffer_type_param, buffer_resize_policy_param, allocation, ValueType > kamping::internal::GenericDataBuffer< MemberType, TParameterType, parameter_type_param, modifiability, ownership, buffer_type_param > kamping::internal::RankDataBuffer< RankType::any, type > kamping::internal::RankDataBuffer< RankType::null, type > kamping::internal::SendModeParameter< SendModeTag > kamping::internal::TagParam< TagType::any > kamping::internal::TagParam< TagType::value >

Protected Member Functions

 ParameterObjectBase (ParameterObjectBase const &)=delete
 Copy constructor is deleted as buffers should only be moved.
 
ParameterObjectBaseoperator= (ParameterObjectBase const &)=delete
 Copy assignment operator is deleted as buffers should only be moved.
 
 ParameterObjectBase (ParameterObjectBase &&)=default
 Move constructor.
 
ParameterObjectBaseoperator= (ParameterObjectBase &&)=default
 Move assignment operator.
 
void set_extracted ()
 Set the extracted flag to indicate that the status stored in this buffer has been moved out.
 
void kassert_not_extracted (std::string const message) const
 Throws an assertion if the extracted flag is set, i.e. the underlying status has been moved out.
 

Detailed Description

Base object for parameter objects which deletes copy constructor and assignment operator and enables move.

You can inherit from this class privately. While constructors are never inherited, the derived class still has no copy constructor (assignment), because it can not be default constructed, due to the missing implementation in the base class. Because we provide a (default) implementation for the move constructor (assignment) in the base class, the derived class can construct default implementations.

Member Function Documentation

◆ kassert_not_extracted()

void kamping::internal::ParameterObjectBase::kassert_not_extracted ( std::string const message) const
inlineprotected

Throws an assertion if the extracted flag is set, i.e. the underlying status has been moved out.

Parameters
messageThe message for the assertion.

The documentation for this class was generated from the following file: