gem5 v24.0.0.0
Loading...
Searching...
No Matches
SerializableType Class Reference
Inheritance diagram for SerializableType:
gem5::Serializable

Public Member Functions

 SerializableType ()
 
void serialize (CheckpointOut &cp) const override
 Serialize an object.
 
void unserialize (CheckpointIn &cp) override
 Unserialize an object.
 
bool checkAndResetSerialized ()
 Checks if serialize() has been called and then marks it as not called.
 
bool checkAndResetUnserialized ()
 Checks if unserialize() has been called and then marks it as not called.
 
- Public Member Functions inherited from gem5::Serializable
 Serializable ()
 
virtual ~Serializable ()
 
void serializeSection (CheckpointOut &cp, const char *name) const
 Serialize an object into a new section.
 
void serializeSection (CheckpointOut &cp, const std::string &name) const
 
void unserializeSection (CheckpointIn &cp, const char *name)
 Unserialize an a child object.
 
void unserializeSection (CheckpointIn &cp, const std::string &name)
 

Private Attributes

bool _serialized = false
 
bool _unserialized = false
 

Additional Inherited Members

- Static Public Member Functions inherited from gem5::Serializable
static const std::string & currentSection ()
 Gets the fully-qualified name of the active section.
 
static void generateCheckpointOut (const std::string &cpt_dir, std::ofstream &outstream)
 Generate a checkpoint file so that the serialization can be routed to it.
 

Detailed Description

Definition at line 490 of file serialize.test.cc.

Constructor & Destructor Documentation

◆ SerializableType()

SerializableType::SerializableType ( )
inline

Definition at line 497 of file serialize.test.cc.

Member Function Documentation

◆ checkAndResetSerialized()

bool SerializableType::checkAndResetSerialized ( )
inline

Checks if serialize() has been called and then marks it as not called.

Returns
True if serialize() has been called.

Definition at line 508 of file serialize.test.cc.

References _serialized.

Referenced by TEST_F().

◆ checkAndResetUnserialized()

bool SerializableType::checkAndResetUnserialized ( )
inline

Checks if unserialize() has been called and then marks it as not called.

Returns
True if unserialize() has been called.

Definition at line 521 of file serialize.test.cc.

References _unserialized.

Referenced by TEST_F().

◆ serialize()

void SerializableType::serialize ( CheckpointOut & cp) const
inlineoverridevirtual

Serialize an object.

Output an object's state into the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 499 of file serialize.test.cc.

References _serialized.

◆ unserialize()

void SerializableType::unserialize ( CheckpointIn & cp)
inlineoverridevirtual

Unserialize an object.

Read an object's state from the current checkpoint section.

Parameters
cpCheckpoint state

Implements gem5::Serializable.

Definition at line 500 of file serialize.test.cc.

References _unserialized.

Member Data Documentation

◆ _serialized

bool SerializableType::_serialized = false
mutableprivate

Definition at line 493 of file serialize.test.cc.

Referenced by checkAndResetSerialized(), and serialize().

◆ _unserialized

bool SerializableType::_unserialized = false
private

Definition at line 494 of file serialize.test.cc.

Referenced by checkAndResetUnserialized(), and unserialize().


The documentation for this class was generated from the following file:

Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0