PetaVision
Alpha
Main Page
Data Structures
CheckpointingMessages.hpp
1
#include "observerpattern/BaseMessage.hpp"
2
3
namespace
PV
{
4
5
template
<
typename
T>
// In practice, T is always Checkpointer.
6
// Templated to avoid including Checkpointer.hpp in this file.
7
class
RegisterDataMessage
:
public
BaseMessage
{
8
public
:
9
RegisterDataMessage
(T *dataRegistry) {
10
setMessageType(
"RegisterCheckpointDataMessage"
);
11
mDataRegistry = dataRegistry;
12
}
13
T *mDataRegistry;
14
};
15
16
17
template
<
typename
T>
// In practice, T is always Checkpointer.
18
class
ReadStateFromCheckpointMessage
:
public
BaseMessage
{
19
public
:
20
ReadStateFromCheckpointMessage
(T *dataRegistry) {
21
setMessageType(
"ReadStateFromCheckpoint"
);
22
mDataRegistry = dataRegistry;
23
}
24
T *mDataRegistry;
25
};
26
27
class
ProcessCheckpointReadMessage
:
public
BaseMessage
{
28
public
:
29
ProcessCheckpointReadMessage
(std::string
const
&directory) : mDirectory(directory) {
30
setMessageType(
"ProcessCheckpointReadMessage"
);
31
}
32
std::string mDirectory;
33
};
34
35
class
PrepareCheckpointWriteMessage
:
public
BaseMessage
{
36
public
:
37
PrepareCheckpointWriteMessage
(std::string
const
&directory) : mDirectory(directory) {
38
setMessageType(
"ProcessCheckpointWriteMessage"
);
39
}
40
std::string mDirectory;
41
};
42
43
}
// end namespace PV
PV::BaseMessage
Definition:
BaseMessage.hpp:18
PV::PrepareCheckpointWriteMessage
Definition:
CheckpointingMessages.hpp:35
PV::ReadStateFromCheckpointMessage
Definition:
CheckpointingMessages.hpp:18
PV::ProcessCheckpointReadMessage
Definition:
CheckpointingMessages.hpp:27
PV::RegisterDataMessage
Definition:
CheckpointingMessages.hpp:7
PV
Definition:
CheckpointableFileStream.cpp:3
OpenPV
src
checkpointing
CheckpointingMessages.hpp
Generated by
1.8.11