gem5
|
Scoped checkpoint section helper class. More...
#include <serialize.hh>
Public Member Functions | |
template<class CP > | |
ScopedCheckpointSection (CP &cp, const char *name) | |
template<class CP > | |
ScopedCheckpointSection (CP &cp, const std::string &name) | |
~ScopedCheckpointSection () | |
ScopedCheckpointSection ()=delete | |
ScopedCheckpointSection (const ScopedCheckpointSection &)=delete | |
ScopedCheckpointSection & | operator= (const ScopedCheckpointSection &)=delete |
ScopedCheckpointSection & | operator= (ScopedCheckpointSection &&)=delete |
Private Member Functions | |
void | pushName (const char *name) |
void | nameOut (CheckpointOut &cp) |
void | nameOut (CheckpointIn &cp) |
Scoped checkpoint section helper class.
This helper class creates a section within a checkpoint without the need for a separate serializeable object. It is mainly used within the Serializable class when serializing or unserializing section (see serializeSection() and unserializeSection()). It can also be used to maintain backwards compatibility in existing code that serializes structs that are not inheriting from Serializable into subsections.
When the class is instantiated, it appends a name to the active path in a checkpoint. The old path is later restored when the instance is destroyed. For example, serializeSection() could be implemented by instantiating a ScopedCheckpointSection and then calling serialize() on an object.
Definition at line 240 of file serialize.hh.
|
inline |
Definition at line 243 of file serialize.hh.
References nameOut(), and pushName().
|
inline |
Definition at line 249 of file serialize.hh.
References nameOut(), and pushName().
Serializable::ScopedCheckpointSection::~ScopedCheckpointSection | ( | ) |
Definition at line 619 of file serialize.cc.
References DPRINTF.
|
delete |
|
delete |
|
private |
Definition at line 638 of file serialize.cc.
References Serializable::currentSection(), and DPRINTF.
Referenced by ScopedCheckpointSection().
|
inlineprivate |
Definition at line 266 of file serialize.hh.
|
delete |
|
delete |
|
private |
Definition at line 627 of file serialize.cc.
References csprintf(), and DPRINTF.
Referenced by ScopedCheckpointSection().