openMSX
memory
TrackedRam.cc
Go to the documentation of this file.
1
#include "
TrackedRam.hh
"
2
#include "
serialize.hh
"
3
4
namespace
openmsx
{
5
6
template
<
typename
Archive>
7
void
TrackedRam::serialize
(Archive& ar,
unsigned
/*version*/
)
8
{
9
// Note: This is the exact same serialization format as the Ram class.
10
// This allows to change from Ram to TrackedRam without having to
11
// increase the class serialization version (of the user).
12
bool
diff = writeSinceLastReverseSnapshot || !ar.isReverseSnapshot();
13
//ar.serialize_blob("ram", std::span{ram}, diff); // TODO error with clang-15/libc++
14
ar.serialize_blob(
"ram"
, std::span{ram.
begin
(), ram.
end
()}, diff);
15
if
(ar.isReverseSnapshot()) writeSinceLastReverseSnapshot =
false
;
16
}
17
INSTANTIATE_SERIALIZE_METHODS
(
TrackedRam
);
18
19
}
// namespace openmsx
TrackedRam.hh
openmsx::Ram::end
auto end()
Definition
Ram.hh:49
openmsx::Ram::begin
auto begin()
Definition
Ram.hh:47
openmsx::TrackedRam
Definition
TrackedRam.hh:10
openmsx::TrackedRam::serialize
void serialize(Archive &ar, unsigned version)
Definition
TrackedRam.cc:7
openmsx
This file implemented 3 utility functions:
Definition
Autofire.cc:11
serialize.hh
INSTANTIATE_SERIALIZE_METHODS
#define INSTANTIATE_SERIALIZE_METHODS(CLASS)
Definition
serialize.hh:1007
Generated on Mon Oct 7 2024 21:13:40 for openMSX by
1.9.8