https://mooseframework.inl.gov
Functions
Backup.C File Reference

Go to the source code of this file.

Functions

void dataStore (std::ostream &stream, Backup &backup, void *context)
 
void dataLoad (std::istream &stream, Backup &backup, void *context)
 
void dataStore (std::ostream &stream, std::unique_ptr< Backup > &backup, void *context)
 
void dataLoad (std::istream &stream, std::unique_ptr< Backup > &backup, void *context)
 

Function Documentation

◆ dataLoad() [1/2]

void dataLoad ( std::istream &  stream,
Backup backup,
void context 
)

Definition at line 26 of file Backup.C.

Referenced by dataLoad().

27 {
28  mooseAssert(backup.header, "Not set");
29  mooseAssert(backup.data, "Not set");
30 
31  dataLoad(stream, *backup.header, context);
32  dataLoad(stream, *backup.data, context);
33  dataLoad(stream, backup.mesh_files, context);
34 }
std::unique_ptr< std::stringstream > data
Restartable data payload stream.
Definition: Backup.h:30
void dataLoad(std::istream &stream, Backup &backup, void *context)
Definition: Backup.C:26
std::vector< std::pair< std::string, std::string > > mesh_files
Pairs of checkpoint-relative entry names and binary payloads.
Definition: Backup.h:32
std::unique_ptr< std::stringstream > header
Restartable data header stream.
Definition: Backup.h:28

◆ dataLoad() [2/2]

void dataLoad ( std::istream &  stream,
std::unique_ptr< Backup > &  backup,
void context 
)

Definition at line 46 of file Backup.C.

47 {
48  bool has_value;
49  dataLoad(stream, has_value, nullptr);
50  if (has_value)
51  {
52  backup = std::make_unique<Backup>();
53  dataLoad(stream, *backup, context);
54  }
55 }
void dataLoad(std::istream &stream, Backup &backup, void *context)
Definition: Backup.C:26

◆ dataStore() [1/2]

void dataStore ( std::ostream &  stream,
Backup backup,
void context 
)

Definition at line 15 of file Backup.C.

Referenced by dataStore().

16 {
17  mooseAssert(backup.header, "Not set");
18  mooseAssert(backup.data, "Not set");
19 
20  dataStore(stream, *backup.header, context);
21  dataStore(stream, *backup.data, context);
22  dataStore(stream, backup.mesh_files, context);
23 }
void dataStore(std::ostream &stream, Backup &backup, void *context)
Definition: Backup.C:15
std::unique_ptr< std::stringstream > data
Restartable data payload stream.
Definition: Backup.h:30
std::vector< std::pair< std::string, std::string > > mesh_files
Pairs of checkpoint-relative entry names and binary payloads.
Definition: Backup.h:32
std::unique_ptr< std::stringstream > header
Restartable data header stream.
Definition: Backup.h:28

◆ dataStore() [2/2]

void dataStore ( std::ostream &  stream,
std::unique_ptr< Backup > &  backup,
void context 
)

Definition at line 37 of file Backup.C.

38 {
39  bool has_value = backup != nullptr;
40  dataStore(stream, has_value, nullptr);
41  if (has_value)
42  dataStore(stream, *backup, context);
43 }
void dataStore(std::ostream &stream, Backup &backup, void *context)
Definition: Backup.C:15