#include <state.h>
Inheritance diagram for SavableState
Public Methods | |
SavableState& | operator= (const SavableState &) |
virtual | ~SavableState () |
void | save_state (StateOut &) |
Save the state of the object as specified by the StateOut object. More... | |
void | save_object_state (StateOut &) |
This can be used for saving state when the exact type of the object is known for both the save and the restore. More... | |
virtual void | save_vbase_state (StateOut &) |
Save the virtual bases for the object. More... | |
virtual void | save_data_state (StateOut &) |
Save the base classes (with save_data_state) and the members in the same order that the StateIn CTOR initializes them. More... | |
Static Public Methods | |
void | save_state (SavableState *s, StateOut &) |
SavableState* | restore_state (StateIn &si) |
Restores objects saved with save_state. More... | |
SavableState* | key_restore_state (StateIn &si, const char *keyword) |
Like restore_state, but keyword is used to override values while restoring. | |
SavableState* | dir_restore_state (StateIn &si, const char *objectname, const char *keyword=0) |
Protected Methods | |
SavableState () | |
SavableState (const SavableState &) | |
SavableState (StateIn &) | |
Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. More... |
|
Each derived class StateIn CTOR handles the restore corresponding to calling save_object_state, save_vbase_state, and save_data_state listed above. All derived class StateIn& constructors must invoke the SavableState(StateIn&) constructor. |
|
Restores objects saved with save_state. The exact type of the next object in si can be any type publically derived from the SavableState. Derived classes implement a similar static function that returns a pointer to the derived class. If the objectname is given the directory will be consulted to find and restore that object. |
|
|
This can be used for saving state when the exact type of the object is known for both the save and the restore. To restore objects saved in this way the user must directly invoke the object's StateIn& constructor. |
|
Save the state of the object as specified by the StateOut object. This routine saves the state of the object (which includes the nonvirtual bases), the virtual bases, and type information. The default implementation should be adequate. |
|
Save the virtual bases for the object. This must be done in the same order that the ctor initializes the virtual bases. This does not include the DescribedClass and SavableState virtual base classes. This must be implemented by the user if the class has other virtual bases. (These virtual bases must come after SavableState, if SavableState is virtual.) |