git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
154 lines
4 KiB
Groff
154 lines
4 KiB
Groff
.TH "eoState" 3 "19 Oct 2006" "Version 0.9.4-cvs" "EO" \" -*- nroff -*-
|
|
.ad l
|
|
.nh
|
|
.SH NAME
|
|
eoState \- eoState can be used to register derivants of \fBeoPersistent\fP.
|
|
|
|
.PP
|
|
.SH SYNOPSIS
|
|
.br
|
|
.PP
|
|
\fC#include <eoState.h>\fP
|
|
.PP
|
|
Inherits \fBeoFunctorStore\fP.
|
|
.PP
|
|
.SS "Public Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "void \fBregisterObject\fP (\fBeoPersistent\fP ®istrant)"
|
|
.br
|
|
.RI "\fIObject registration function, note that it does not take ownership! \fP"
|
|
.ti -1c
|
|
.RI "template<class T> T & \fBtakeOwnership\fP (const T &persistent)"
|
|
.br
|
|
.RI "\fICopies the object (MUST be derived from \fBeoPersistent\fP) and returns a reference to the owned object. \fP"
|
|
.ti -1c
|
|
.RI "std::string \fBgetCommentString\fP (void) const "
|
|
.br
|
|
.ti -1c
|
|
.RI "void \fBload\fP (const std::string &_filename)"
|
|
.br
|
|
.RI "\fIReads the file specified. \fP"
|
|
.ti -1c
|
|
.RI "void \fBload\fP (std::istream &is)"
|
|
.br
|
|
.RI "\fIReads the file specified. \fP"
|
|
.ti -1c
|
|
.RI "void \fBsave\fP (const std::string &_filename) const "
|
|
.br
|
|
.RI "\fISaves the state in file specified. \fP"
|
|
.ti -1c
|
|
.RI "void \fBsave\fP (std::ostream &os) const "
|
|
.br
|
|
.RI "\fISaves the state in file specified. \fP"
|
|
.in -1c
|
|
.SS "Private Types"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "typedef std::map< std::string, \fBeoPersistent\fP * > \fBObjectMap\fP"
|
|
.br
|
|
.in -1c
|
|
.SS "Private Member Functions"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "std::string \fBcreateObjectName\fP (\fBeoObject\fP *obj)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBeoState\fP (const \fBeoState\fP &)"
|
|
.br
|
|
.ti -1c
|
|
.RI "\fBeoState\fP & \fBoperator=\fP (const \fBeoState\fP &)"
|
|
.br
|
|
.in -1c
|
|
.SS "Private Attributes"
|
|
|
|
.in +1c
|
|
.ti -1c
|
|
.RI "ObjectMap \fBobjectMap\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "std::vector< ObjectMap::iterator > \fBcreationOrder\fP"
|
|
.br
|
|
.ti -1c
|
|
.RI "std::vector< \fBeoPersistent\fP * > \fBownedObjects\fP"
|
|
.br
|
|
.in -1c
|
|
.SH "Detailed Description"
|
|
.PP
|
|
eoState can be used to register derivants of \fBeoPersistent\fP.
|
|
|
|
It will then in turn implement the persistence framework through members load and save, that will call readFrom and printOn for the registrated objects.
|
|
.PP
|
|
It is derived from \fBeoFunctorStore\fP, 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 \fBeoFunctorStore\fP (or a state) which is used to hold all dynamically generated data. Note however, that unlike with \fBeoPersistent\fP derived classes, \fBeoFunctorBase\fP derived classes are not saved or loaded. To govern the creation of functors, command-line parameters (which can be stored) are needed.
|
|
.PP
|
|
Definition at line 54 of file eoState.h.
|
|
.SH "Member Function Documentation"
|
|
.PP
|
|
.SS "template<class T> T& eoState::takeOwnership (const T & persistent)\fC [inline]\fP"
|
|
.PP
|
|
Copies the object (MUST be derived from \fBeoPersistent\fP) and returns a reference to the owned object.
|
|
.PP
|
|
Note: it does not register the object, this must be done afterwards!
|
|
.PP
|
|
Definition at line 73 of file eoState.h.
|
|
.SS "void eoState::load (const std::string & _filename)"
|
|
.PP
|
|
Reads the file specified.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fI_filename\fP the name of the file to load from
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Definition at line 74 of file eoState.cpp.
|
|
.SS "void eoState::load (std::istream & is)"
|
|
.PP
|
|
Reads the file specified.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fIis\fP the stream to load from
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Definition at line 87 of file eoState.cpp.
|
|
.PP
|
|
References eoPersistent::readFrom().
|
|
.SS "void eoState::save (const std::string & _filename) const"
|
|
.PP
|
|
Saves the state in file specified.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fI_filename\fP the name of the file to save into
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Definition at line 148 of file eoState.cpp.
|
|
.PP
|
|
Referenced by eoTimedStateSaver::operator()().
|
|
.SS "void eoState::save (std::ostream & os) const"
|
|
.PP
|
|
Saves the state in file specified.
|
|
.PP
|
|
\fBParameters:\fP
|
|
.RS 4
|
|
\fIos\fP the stream to save into
|
|
.RE
|
|
.PP
|
|
|
|
.PP
|
|
Definition at line 161 of file eoState.cpp.
|
|
.PP
|
|
References eoPrintable::printOn().
|
|
|
|
.SH "Author"
|
|
.PP
|
|
Generated automatically by Doxygen for EO from the source code.
|