|
gem5
v19.0.0.0
|
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 173 of file serialize.hh.
|
inline |
Definition at line 176 of file serialize.hh.
|
inline |
Definition at line 182 of file serialize.hh.
References name().
| Serializable::ScopedCheckpointSection::~ScopedCheckpointSection | ( | ) |
Definition at line 217 of file serialize.cc.
References DPRINTF.
|
delete |
|
delete |
|
private |
Definition at line 236 of file serialize.cc.
References Serializable::currentSection(), and DPRINTF.
|
inlineprivate |
Definition at line 199 of file serialize.hh.
References name(), serialize(), and unserialize().
|
delete |
|
delete |
|
private |
Definition at line 225 of file serialize.cc.
References csprintf(), and DPRINTF.