Paradiseo-eo sources added

git-svn-id: svn://scm.gforge.inria.fr/svnroot/paradiseo@40 331e1502-861f-0410-8da2-ba01fb791d7f
This commit is contained in:
legrand 2006-12-12 14:49:08 +00:00
commit c3aec878e5
3609 changed files with 342772 additions and 0 deletions

View file

@ -0,0 +1,276 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>EO: eoState Class Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"> <form class="search" action="search.php" method="get">
<a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="namespaces.html">Namespace List</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="namespacemembers.html">Namespace&nbsp;Members</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a> | <span class="search"><u>S</u>earch&nbsp;for&nbsp;<input class="search" type="text" name="query" value="" size="20" accesskey="s"/></span></form></div>
<h1>eoState Class Reference</h1>eoState can be used to register derivants of <a class="el" href="classeo_persistent.html">eoPersistent</a>.
<a href="#_details">More...</a>
<p>
<code>#include &lt;<a class="el" href="eo_state_8h-source.html">eoState.h</a>&gt;</code>
<p>
<p>Inheritance diagram for eoState:
<p><center><img src="classeo_state.png" usemap="#eoState_map" border="0" alt=""></center>
<map name="eoState_map">
<area href="classeo_functor_store.html" alt="eoFunctorStore" shape="rect" coords="0,0,100,24">
</map>
<a href="classeo_state-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a2" doxytag="eoState::registerObject"></a>
void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_state.html#a2">registerObject</a> (<a class="el" href="classeo_persistent.html">eoPersistent</a> &amp;registrant)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Object registration function, note that it does not take ownership! <br></td></tr>
<tr><td class="memTemplParams" nowrap colspan="2">template&lt;class T&gt; </td></tr>
<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">T &amp;&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classeo_state.html#a3">takeOwnership</a> (const T &amp;persistent)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copies the object (MUST be derived from <a class="el" href="classeo_persistent.html">eoPersistent</a>) and returns a reference to the owned object. <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a4" doxytag="eoState::getCommentString"></a>
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><b>getCommentString</b> (void) const </td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_state.html#a5">load</a> (const std::string &amp;_filename)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the file specified. <a href="#a5"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_state.html#a6">load</a> (std::istream &amp;is)</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Reads the file specified. <a href="#a6"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_state.html#a7">save</a> (const std::string &amp;_filename) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Saves the state in file specified. <a href="#a7"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classeo_state.html#a8">save</a> (std::ostream &amp;os) const </td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Saves the state in file specified. <a href="#a8"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Private Types</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="y0" doxytag="eoState::ObjectMap"></a>
typedef std::map&lt; std::string,<br>
<a class="el" href="classeo_persistent.html">eoPersistent</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>ObjectMap</b></td></tr>
<tr><td colspan="2"><br><h2>Private Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d0" doxytag="eoState::createObjectName"></a>
std::string&nbsp;</td><td class="memItemRight" valign="bottom"><b>createObjectName</b> (<a class="el" href="classeo_object.html">eoObject</a> *obj)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1" doxytag="eoState::eoState"></a>
&nbsp;</td><td class="memItemRight" valign="bottom"><b>eoState</b> (const <a class="el" href="classeo_state.html">eoState</a> &amp;)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2" doxytag="eoState::operator="></a>
<a class="el" href="classeo_state.html">eoState</a> &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><b>operator=</b> (const <a class="el" href="classeo_state.html">eoState</a> &amp;)</td></tr>
<tr><td colspan="2"><br><h2>Private Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r0" doxytag="eoState::objectMap"></a>
ObjectMap&nbsp;</td><td class="memItemRight" valign="bottom"><b>objectMap</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r1" doxytag="eoState::creationOrder"></a>
std::vector&lt; ObjectMap::iterator &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>creationOrder</b></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="r2" doxytag="eoState::ownedObjects"></a>
std::vector&lt; <a class="el" href="classeo_persistent.html">eoPersistent</a> * &gt;&nbsp;</td><td class="memItemRight" valign="bottom"><b>ownedObjects</b></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
eoState can be used to register derivants of <a class="el" href="classeo_persistent.html">eoPersistent</a>.
<p>
It will then in turn implement the persistence framework through members load and save, that will call readFrom and printOn for the registrated objects.<p>
It is derived from <a class="el" href="classeo_functor_store.html">eoFunctorStore</a>, 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 <a class="el" href="classeo_functor_store.html">eoFunctorStore</a> (or a state) which is used to hold all dynamically generated data. Note however, that unlike with <a class="el" href="classeo_persistent.html">eoPersistent</a> derived classes, <a class="el" href="classeo_functor_base.html">eoFunctorBase</a> derived classes are not saved or loaded. To govern the creation of functors, command-line parameters (which can be stored) are needed.
<p>
<p>
Definition at line <a class="el" href="eo_state_8h-source.html#l00054">54</a> of file <a class="el" href="eo_state_8h-source.html">eoState.h</a>.<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3" doxytag="eoState::takeOwnership"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" colspan="4">
template&lt;class T&gt; </td>
</tr>
<tr>
<td class="md" nowrap valign="top">T&amp; eoState::takeOwnership </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const T &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>persistent</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Copies the object (MUST be derived from <a class="el" href="classeo_persistent.html">eoPersistent</a>) and returns a reference to the owned object.
<p>
Note: it does not register the object, this must be done afterwards!
<p>
Definition at line <a class="el" href="eo_state_8h-source.html#l00073">73</a> of file <a class="el" href="eo_state_8h-source.html">eoState.h</a>. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="eoState::load"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void eoState::load </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>_filename</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Reads the file specified.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>_filename</em>&nbsp;</td><td>the name of the file to load from </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="eo_state_8cpp-source.html#l00074">74</a> of file <a class="el" href="eo_state_8cpp-source.html">eoState.cpp</a>. </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="eoState::load"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void eoState::load </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">std::istream &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>is</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Reads the file specified.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>is</em>&nbsp;</td><td>the stream to load from </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="eo_state_8cpp-source.html#l00087">87</a> of file <a class="el" href="eo_state_8cpp-source.html">eoState.cpp</a>.
<p>
References <a class="el" href="classeo_persistent.html#a1">eoPersistent::readFrom()</a>. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="eoState::save"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void eoState::save </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const std::string &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>_filename</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Saves the state in file specified.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>_filename</em>&nbsp;</td><td>the name of the file to save into </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="eo_state_8cpp-source.html#l00148">148</a> of file <a class="el" href="eo_state_8cpp-source.html">eoState.cpp</a>.
<p>
Referenced by <a class="el" href="eo_updater_8cpp-source.html#l00016">eoTimedStateSaver::operator()()</a>. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="eoState::save"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">void eoState::save </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">std::ostream &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>os</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const</td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Saves the state in file specified.
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>os</em>&nbsp;</td><td>the stream to save into </td></tr>
</table>
</dl>
<p>
Definition at line <a class="el" href="eo_state_8cpp-source.html#l00161">161</a> of file <a class="el" href="eo_state_8cpp-source.html">eoState.cpp</a>.
<p>
References <a class="el" href="classeo_printable.html#a1">eoPrintable::printOn()</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="eo_state_8h-source.html">eoState.h</a><li><a class="el" href="eo_state_8cpp-source.html">eoState.cpp</a></ul>
<hr size="1"><address style="align: right;"><small>Generated on Thu Oct 19 05:06:56 2006 for EO by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>