memento.h
Go to the documentation of this file.
1 
13 #ifndef MEMENTO_H
14 #define MEMENTO_H
15 
16 namespace argos {
17  class CMemento;
18 }
19 
20 #include <argos3/core/utility/datatypes/byte_array.h>
21 
22 namespace argos {
23 
27  class CMemento {
28 
29  public:
30 
34  virtual ~CMemento() {}
35 
41  virtual void SaveState(CByteArray& c_buffer) = 0;
42 
48  virtual void LoadState(CByteArray& c_buffer) = 0;
49 
50  };
51 
52 }
53 
54 #endif
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
The interface inherited by all classes whose state must be saved and restored.
Definition: memento.h:27
virtual void SaveState(CByteArray &c_buffer)=0
Saves the state of the object to the given buffer.
virtual void LoadState(CByteArray &c_buffer)=0
Restores the state of the object from the given buffer.
virtual ~CMemento()
Class destructor.
Definition: memento.h:34
Byte array utility class.
Definition: byte_array.h:28