FEAT 3
Finite Element Analysis Toolbox
Loading...
Searching...
No Matches
FEAT::Control::CheckpointableWrapper< Object_ > Class Template Reference

Wrapper class for checkpointable objects. More...

#include <checkpoint_control.hpp>

Inheritance diagram for FEAT::Control::CheckpointableWrapper< Object_ >:
FEAT::Control::Checkpointable

Public Member Functions

 CheckpointableWrapper (Object_ &obj)
 Contructor. More...
 
virtual std::uint64_t get_checkpoint_size (LAFEM::SerialConfig &config) override
 Calculate size. More...
 
virtual void restore_from_checkpoint_data (std::vector< char > &data) override
 Extract object from checkpoint. More...
 
virtual std::uint64_t set_checkpoint_data (std::vector< char > &data, LAFEM::SerialConfig &config) override
 Collect checkpoint data from object. More...
 

Private Attributes

Object_ & _object
 

Detailed Description

template<typename Object_>
class FEAT::Control::CheckpointableWrapper< Object_ >

Wrapper class for checkpointable objects.

Any class that implements the Checkpointable interface can be wrapped by CheckpointableWrapper and then be used with CheckpointControl.

Definition at line 76 of file checkpoint_control.hpp.

Constructor & Destructor Documentation

◆ CheckpointableWrapper()

template<typename Object_ >
FEAT::Control::CheckpointableWrapper< Object_ >::CheckpointableWrapper ( Object_ &  obj)
inlineexplicit

Contructor.

Definition at line 83 of file checkpoint_control.hpp.

Member Function Documentation

◆ get_checkpoint_size()

template<typename Object_ >
virtual std::uint64_t FEAT::Control::CheckpointableWrapper< Object_ >::get_checkpoint_size ( LAFEM::SerialConfig config)
inlineoverridevirtual

Calculate size.

Calculate size of complete object as it is stored in the checkpoint

Returns
size of object

Implements FEAT::Control::Checkpointable.

Definition at line 94 of file checkpoint_control.hpp.

◆ restore_from_checkpoint_data()

template<typename Object_ >
virtual void FEAT::Control::CheckpointableWrapper< Object_ >::restore_from_checkpoint_data ( std::vector< char > &  data)
inlineoverridevirtual

Extract object from checkpoint.

Restores complete object with all its contents from checkpoint data

Parameters
[out]dataobject as bytestrem

Implements FEAT::Control::Checkpointable.

Definition at line 107 of file checkpoint_control.hpp.

◆ set_checkpoint_data()

template<typename Object_ >
virtual std::uint64_t FEAT::Control::CheckpointableWrapper< Object_ >::set_checkpoint_data ( std::vector< char > &  data,
LAFEM::SerialConfig config 
)
inlineoverridevirtual

Collect checkpoint data from object.

Adds the condensed complete object with all its contents to the end of the checkpoint buffer

Parameters
[out]dataobject as bytestream

Implements FEAT::Control::Checkpointable.

Definition at line 120 of file checkpoint_control.hpp.

Member Data Documentation

◆ _object

template<typename Object_ >
Object_& FEAT::Control::CheckpointableWrapper< Object_ >::_object
private

Definition at line 79 of file checkpoint_control.hpp.


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