#include <eoState.h>
Inheritance diagram for eoState:

Public Member Functions | |
| void | registerObject (eoPersistent ®istrant) |
| Object registration function, note that it does not take ownership! | |
| template<class T> | |
| T & | takeOwnership (const T &persistent) |
| Copies the object (MUST be derived from eoPersistent) and returns a reference to the owned object. | |
| std::string | getCommentString (void) const |
| void | load (const std::string &_filename) |
| Reads the file specified. | |
| void | load (std::istream &is) |
| Reads the file specified. | |
| void | save (const std::string &_filename) const |
| Saves the state in file specified. | |
| void | save (std::ostream &os) const |
| Saves the state in file specified. | |
Private Types | |
|
typedef std::map< std::string, eoPersistent * > | ObjectMap |
Private Member Functions | |
| std::string | createObjectName (eoObject *obj) |
| eoState (const eoState &) | |
| eoState & | operator= (const eoState &) |
Private Attributes | |
| ObjectMap | objectMap |
| std::vector< ObjectMap::iterator > | creationOrder |
| std::vector< eoPersistent * > | ownedObjects |
It will then in turn implement the persistence framework through members load and save, that will call readFrom and printOn for the registrated objects.
It is derived from eoFunctorStore, so that it also serves as a place where all those nifty eo functors can be stored. This is useful in the case you want to use one of the make_* functions. These functions generally take as their last argument an eoFunctorStore (or a state) which is used to hold all dynamically generated data. Note however, that unlike with eoPersistent derived classes, eoFunctorBase derived classes are not saved or loaded. To govern the creation of functors, command-line parameters (which can be stored) are needed.
Definition at line 54 of file eoState.h.
|
||||||||||
|
Copies the object (MUST be derived from eoPersistent) and returns a reference to the owned object. Note: it does not register the object, this must be done afterwards! |
|
|
Reads the file specified.
Definition at line 74 of file eoState.cpp. |
|
|
Reads the file specified.
Definition at line 87 of file eoState.cpp. References eoPersistent::readFrom(). |
|
|
Saves the state in file specified.
Definition at line 148 of file eoState.cpp. Referenced by eoTimedStateSaver::operator()(). |
|
|
Saves the state in file specified.
Definition at line 161 of file eoState.cpp. References eoPrintable::printOn(). |
1.3.9.1