OpenLB 1.7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
olb::MultiConcreteCommunicatable< COMMUNICATEE > Class Template Referencefinal

#include <communicatable.h>

+ Inheritance diagram for olb::MultiConcreteCommunicatable< COMMUNICATEE >:
+ Collaboration diagram for olb::MultiConcreteCommunicatable< COMMUNICATEE >:

Public Member Functions

 MultiConcreteCommunicatable (COMMUNICATEE &communicatee, const std::vector< std::type_index > &fields)
 
std::size_t size (ConstSpan< CellID > indices) const override
 Get serialized size for data at locations indices
 
std::size_t serialize (ConstSpan< CellID > indices, std::uint8_t *buffer) const override
 Serialize data at locations indices to buffer
 
std::size_t deserialize (ConstSpan< CellID > indices, const std::uint8_t *buffer) override
 Deserialize data at locations indices to buffer
 
- Public Member Functions inherited from olb::Communicatable
virtual ~Communicatable ()
 

Detailed Description

template<typename COMMUNICATEE>
class olb::MultiConcreteCommunicatable< COMMUNICATEE >

Definition at line 256 of file communicatable.h.

Constructor & Destructor Documentation

◆ MultiConcreteCommunicatable()

template<typename COMMUNICATEE >
olb::MultiConcreteCommunicatable< COMMUNICATEE >::MultiConcreteCommunicatable ( COMMUNICATEE & communicatee,
const std::vector< std::type_index > & fields )
inline

Definition at line 262 of file communicatable.h.

263 :
264 _communicatee{communicatee},
265 _fields{fields} { }

Member Function Documentation

◆ deserialize()

template<typename COMMUNICATEE >
std::size_t olb::MultiConcreteCommunicatable< COMMUNICATEE >::deserialize ( ConstSpan< CellID > indices,
const std::uint8_t * buffer )
inlineoverridevirtual

Deserialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 289 of file communicatable.h.

291 {
292 const std::uint8_t* curr = buffer;
293 for (auto& field : _fields) {
294 curr += _communicatee.getCommunicatable(field).deserialize(indices, curr);
295 }
296 return curr - buffer;
297 }
+ Here is the caller graph for this function:

◆ serialize()

template<typename COMMUNICATEE >
std::size_t olb::MultiConcreteCommunicatable< COMMUNICATEE >::serialize ( ConstSpan< CellID > indices,
std::uint8_t * buffer ) const
inlineoverridevirtual

Serialize data at locations indices to buffer

Implements olb::Communicatable.

Definition at line 278 of file communicatable.h.

280 {
281 std::uint8_t* curr = buffer;
282 for (auto& field : _fields) {
283 curr += _communicatee.getCommunicatable(field).serialize(indices, curr);
284 }
285 return curr - buffer;
286 }
+ Here is the caller graph for this function:

◆ size()

template<typename COMMUNICATEE >
std::size_t olb::MultiConcreteCommunicatable< COMMUNICATEE >::size ( ConstSpan< CellID > indices) const
inlineoverridevirtual

Get serialized size for data at locations indices

Implements olb::Communicatable.

Definition at line 268 of file communicatable.h.

269 {
270 std::size_t size = 0;
271 for (auto& field : _fields) {
272 size += _communicatee.getCommunicatable(field).size(indices);
273 }
274 return size;
275 }
std::size_t size(ConstSpan< CellID > indices) const override
Get serialized size for data at locations indices

References olb::MultiConcreteCommunicatable< COMMUNICATEE >::size().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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