aboutsummaryrefslogtreecommitdiff
path: root/docs/doxygen/nel/mailbox_8cpp-source.html
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--docs/doxygen/nel/mailbox_8cpp-source.html716
1 files changed, 716 insertions, 0 deletions
diff --git a/docs/doxygen/nel/mailbox_8cpp-source.html b/docs/doxygen/nel/mailbox_8cpp-source.html
new file mode 100644
index 00000000..3828bcd0
--- /dev/null
+++ b/docs/doxygen/nel/mailbox_8cpp-source.html
@@ -0,0 +1,716 @@
+<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+ <TITLE>nevrax.org : docs</TITLE>
+ <LINK REL=stylesheet TYPE="text/css" HREF="http://www.nevrax.org/inc/css/nevrax.css">
+ <link href="doxygen.css" rel="stylesheet" type="text/css">
+</HEAD>
+<BODY MARGINHEIGHT="0" MARGINWIDTH="0">
+
+<!-- uplinks -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ <TD><IMG width=6 height=14 SRC="http://www.nevrax.org/inc/img/reddots.gif" ALT="#" VSPACE=2 HSPACE=2 BORDER=0 ></TD><TD VALIGN=middle>&nbsp;<A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A>&nbsp;&nbsp;&nbsp;</TD>
+ </TR>
+</TABLE>
+
+<!-- banner Nevrax -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 WIDTH=100%>
+ <TR><TD BGCOLOR="#000000" BACKGROUND="http://www.nevrax.org/inc/img/black_banner.jpg"><A HREF="http://www.nevrax.org"><IMG SRC="http://www.nevrax.org/inc/img/nevrax.gif" WIDTH="170" HEIGHT="45" BORDER=0 ALT="Nevrax" ></A></TD></TR>
+</TABLE>
+
+<!-- main table -->
+<TABLE CELLSPACING=0 CELLPADDING=0 BORDER=0 height=100%>
+ <TR>
+ <TD WIDTH=16><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="10" BORDER=0 ALT=""></TD>
+ <TD WIDTH=140 BGCOLOR=#dddddd VALIGN=TOP ALIGN=middle><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+ <!------ Begin Box ------>
+ <TABLE BORDER=0 CELLSPACING=0 CELLPADDING=0 BGCOLOR=black><TR><TD><TABLE border=0 cellspacing=2 cellpadding=0 width=120><tr><TD ALIGN=middle bgcolor=black>
+ <FONT COLOR=white FACE="sans-serif"><B>Nevrax.org</B></FONT></TD></TR><tr><td colspan=2 bgcolor=#FFFFFF>
+ <TABLE cellspacing=0 cellpadding=1 border=0>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="Rubrique news"><img width=13 height=15 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-news.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/news/" TITLE="News">News</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Rubrique mail"><img width=15 height=11 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-mail.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/mail/" TITLE="Mailing list archive">Mailing-list</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Rubrique docs"><img width=14 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-docs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/docs/" TITLE="Documentation">Documentation</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="Rubrique cvs"><img width=13 height=17 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-cvs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/cvs/" TITLE="CVS Web">CVS</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Rubrique bugs"><img width=20 height=16 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-bugs.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/bugs/" TITLE="Bugtracking">Bugs</a></td></tr>
+ <tr><td ALIGN=middle><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="Rubrique license"><img width=18 height=12 hspace=5 border=0 src=http://www.nevrax.org/inc/img/picto-gpl.gif ALT=#></A></td><td><a class='linkbox' href="http://www.nevrax.org/GPL.php3" TITLE="License">License</a></td></tr>
+ </TABLE>
+ </TD></TR></TABLE></TD></TR></TABLE>
+ <!------ End Box ------>
+
+ </TD>
+ <TD WIDTH=15><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="16" HEIGHT="16" BORDER=0 ALT=""></TD>
+ <TD ALIGN=left valign=top><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="140" HEIGHT="10" BORDER=0 ALT="">
+
+<!-- title -->
+<TABLE background="http://www.nevrax.org/inc/img/redline.gif" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td>
+<A HREF="http://www.nevrax.org/docs/"><img src="http://www.nevrax.org/inc/img/t_docs.gif" ALT="Docs" HEIGHT=20 BORDER=0></A>
+</td><td><IMG SRC="http://www.nevrax.org/inc/img/pixel.gif" WIDTH="1" HEIGHT="1" BORDER=0 ALT="">
+</td></tr></table>
+&nbsp;
+
+<!-- block -->
+<TABLE bgcolor="#dddddd" CELLSPACING=0 CELLPADDING=0 BORDER=0 width=100%><tr><td width=1% valign=middle><img width=6 height=14 hspace=2 vspace=2 src="http://www.nevrax.org/inc/img/reddots.gif"></TD>
+ <TD><B>Documentation</B></TD>
+ <TD ALIGN=RIGHT>&nbsp;</td>
+</tr></table>
+<!-- Generated by Doxygen 1.2.14 -->
+<center>
+<a class="qindex" href="index.html">Main Page</a> &nbsp; <a class="qindex" href="namespaces.html">Namespace List</a> &nbsp; <a class="qindex" href="hierarchy.html">Class Hierarchy</a> &nbsp; <a class="qindex" href="classes.html">Alphabetical List</a> &nbsp; <a class="qindex" href="annotated.html">Compound List</a> &nbsp; <a class="qindex" href="files.html">File List</a> &nbsp; <a class="qindex" href="namespacemembers.html">Namespace Members</a> &nbsp; <a class="qindex" href="functions.html">Compound Members</a> &nbsp; <a class="qindex" href="globals.html">File Members</a> &nbsp; <a class="qindex" href="pages.html">Related Pages</a> &nbsp; <a class="qindexRef" doxygen="_cgi:http://www.nevrax.org/cgi-bin/nel-search.cgi" href="http://www.nevrax.org/cgi-bin/nel-search.cgi">Search</a> &nbsp; </center>
+<hr><h1>mailbox.cpp</h1><a href="mailbox_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001
+00006 <font class="comment">/* Copyright, 2000 Nevrax Ltd.</font>
+00007 <font class="comment"> *</font>
+00008 <font class="comment"> * This file is part of NEVRAX NEL.</font>
+00009 <font class="comment"> * NEVRAX NEL is free software; you can redistribute it and/or modify</font>
+00010 <font class="comment"> * it under the terms of the GNU General Public License as published by</font>
+00011 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font>
+00012 <font class="comment"> * any later version.</font>
+00013 <font class="comment"></font>
+00014 <font class="comment"> * NEVRAX NEL is distributed in the hope that it will be useful, but</font>
+00015 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font>
+00016 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font>
+00017 <font class="comment"> * General Public License for more details.</font>
+00018 <font class="comment"></font>
+00019 <font class="comment"> * You should have received a copy of the GNU General Public License</font>
+00020 <font class="comment"> * along with NEVRAX NEL; see the file COPYING. If not, write to the</font>
+00021 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font>
+00022 <font class="comment"> * MA 02111-1307, USA.</font>
+00023 <font class="comment"> */</font>
+00024 <font class="preprocessor">#include "<a class="code" href="agent_8h.html">nel/ai/agent/agent.h</a>"</font>
+00025 <font class="preprocessor">#include "<a class="code" href="agent__script_8h.html">nel/ai/agent/agent_script.h</a>"</font>
+00026
+00027 <font class="keyword">namespace </font>NLAIAGENT
+00028 {
+00029
+<a name="l00030"></a><a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">00030</a> IMailBox::IMailBox(<font class="keyword">const</font> IWordNumRef *parent):IConnectIA(parent)
+00031 {
+00032 }
+00033
+<a name="l00034"></a><a class="code" href="classNLAIAGENT_1_1IMailBox.html#a1">00034</a> IMailBox::IMailBox(<font class="keyword">const</font> IMailBox &amp;c) : IConnectIA(c)
+00035 {
+00036 }
+00037
+<a name="l00038"></a><a class="code" href="classNLAIAGENT_1_1IMailBox.html#a2">00038</a> IMailBox::IMailBox(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is):IConnectIA(is)
+00039 {
+00040 }
+00041
+<a name="l00042"></a><a class="code" href="classNLAIAGENT_1_1IMailBox.html#a5">00042</a> IMailBox::~IMailBox()
+00043 {
+00044 }
+00045
+<a name="l00046"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a0">00046</a> CSimpleLocalMailBox::CSimpleLocalMailBox(<font class="keyword">const</font> IWordNumRef *parent) : IMailBox(parent), _Size(0)
+00047 {
+00048 }
+00049
+<a name="l00050"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a1">00050</a> CSimpleLocalMailBox::CSimpleLocalMailBox(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is) : IMailBox(is), _Size(0)
+00051 {
+00052 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a22">load</a>(is);
+00053 }
+00054
+00055
+<a name="l00056"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a2">00056</a> CSimpleLocalMailBox::CSimpleLocalMailBox(<font class="keyword">const</font> CSimpleLocalMailBox &amp;a) : IMailBox(a), _Size(0)
+00057 {
+00058 tListMessage::const_reverse_iterator i = a._ListMessage.rbegin();
+00059 <font class="keywordflow">while</font>(i != a._ListMessage.rend())
+00060 {
+00061 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.push_back(*i++);
+00062 ((IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back())-&gt;incRef();
+00063 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> ++;
+00064 }
+00065 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n1">_RunState</a> = a._RunState;
+00066 }
+00067
+<a name="l00068"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a3">00068</a> CSimpleLocalMailBox::~CSimpleLocalMailBox()
+00069 {
+00070 <font class="keywordflow">while</font>(<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.begin() != <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.end())
+00071 {
+00072 IMessageBase *m = (IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back();
+00073 m-&gt;release();
+00074 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.pop_back();
+00075 }
+00076 }
+00077
+<a name="l00078"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a4">00078</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::addMessage(IMessageBase *msg)
+00079 {
+00080 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.push_front( msg );
+00081 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> ++;
+00082 }
+00083
+<a name="l00084"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a5">00084</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::addMailBox(IMailBox *)
+00085 {
+00086 }
+00087
+<a name="l00088"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a6">00088</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::removeMailBox(IMailBox *)
+00089 {
+00090 }
+00091
+<a name="l00092"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a8">00092</a> <font class="keyword">const</font> IMessageBase &amp;CSimpleLocalMailBox::getMessage()
+00093 {
+00094 <font class="keywordflow">return</font> *<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back();
+00095 }
+00096
+<a name="l00097"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a9">00097</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::popMessage()
+00098 {
+00099 ((IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back())-&gt;release();
+00100 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.pop_back();
+00101 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> --;
+00102 }
+00103
+<a name="l00104"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a10">00104</a> <a class="code" href="types__nl_8h.html#a8">sint32</a> CSimpleLocalMailBox::getMessageCount()<font class="keyword"> const</font>
+00105 <font class="keyword"> </font>{
+00106 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.size();
+00107 }
+<a name="l00108"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a11">00108</a> <font class="keywordtype">bool</font> CSimpleLocalMailBox::isEmpty()<font class="keyword"> const</font>
+00109 <font class="keyword"> </font>{
+00110 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> == 0;<font class="comment">//_ListMessage.begin() == _ListMessage.end();</font>
+00111 }
+00112
+<a name="l00113"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a12">00113</a> <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> *CSimpleLocalMailBox::pumpMessages(<font class="comment">/*IBasicMessageGroup &amp;*/</font>)<font class="keyword"> const</font>
+00114 <font class="keyword"> </font>{
+00115 <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> *result = <font class="keyword">new</font> <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a>;
+00116
+00117 std::list&lt;const IMessageBase *&gt;::const_iterator i = <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.begin();
+00118 <font class="keywordflow">while</font>(i != <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.end() )
+00119 {
+00120 result-&gt;push_back( *i++ );
+00121 }
+00122 <font class="keywordflow">return</font> result;
+00123 }
+00124
+00125 <font class="comment">/*void CSimpleLocalMailBox::addGroup(IBasicMessageGroup &amp;)</font>
+00126 <font class="comment"> {</font>
+00127 <font class="comment"></font>
+00128 <font class="comment"> }</font>
+00129 <font class="comment"></font>
+00130 <font class="comment"> void CSimpleLocalMailBox::removeGroup(IBasicMessageGroup &amp;)</font>
+00131 <font class="comment"> {</font>
+00132 <font class="comment"></font>
+00133 <font class="comment"> }</font>
+00134 <font class="comment"></font>
+00135 <font class="comment"> std::list&lt;IBasicMessageGroup *&gt; &amp;CSimpleLocalMailBox::getGroups()</font>
+00136 <font class="comment"> {</font>
+00137 <font class="comment"> return _Msg_grps;</font>
+00138 <font class="comment"> }*/</font>
+00139
+<a name="l00140"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a13">00140</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CSimpleLocalMailBox::getState()<font class="keyword"> const </font>
+00141 <font class="keyword"> </font>{
+00142 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n1">_RunState</a>;
+00143 }
+00144
+<a name="l00145"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a14">00145</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::setState(<a class="code" href="namespaceNLAIAGENT.html#a50">TProcessStatement</a> state, IObjectIA *result)
+00146 {
+00147 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n1">_RunState</a>.ResultState = state;
+00148 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n1">_RunState</a>.Result = result;
+00149 }
+00150
+<a name="l00151"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a15">00151</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CSimpleLocalMailBox::run()
+00152 {
+00153 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00154 }
+00155
+<a name="l00156"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a16">00156</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CSimpleLocalMailBox::isEqual</a>(<font class="keyword">const</font> IBasicObjectIA &amp;a)<font class="keyword"> const</font>
+00157 <font class="keyword"> </font>{
+00158 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> &amp;m = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> &amp;)a;
+00159 <font class="keywordflow">return</font> (<font class="keyword">const</font> IWordNumRef &amp;)m == (<font class="keyword">const</font> IWordNumRef &amp;)*<font class="keyword">this</font>;
+00160 }
+00161
+<a name="l00162"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a17">00162</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CSimpleLocalMailBox::clone()<font class="keyword"> const</font>
+00163 <font class="keyword"> </font>{
+00164 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a0">CSimpleLocalMailBox</a>(*<font class="keyword">this</font>);
+00165 <font class="keywordflow">return</font> a;
+00166 }
+00167
+<a name="l00168"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a18">00168</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CSimpleLocalMailBox::newInstance()<font class="keyword"> const</font>
+00169 <font class="keyword"> </font>{
+00170 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a;
+00171 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>() != NULL)
+00172 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a0">CSimpleLocalMailBox</a>((<font class="keyword">const</font> IWordNumRef *) <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>());
+00173 <font class="keywordflow">else</font>
+00174 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a0">CSimpleLocalMailBox</a>((<font class="keyword">const</font> IWordNumRef *) NULL);
+00175 <font class="keywordflow">return</font> a;
+00176 }
+00177
+<a name="l00178"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a19">00178</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;CSimpleLocalMailBox::getType()<font class="keyword"> const</font>
+00179 <font class="keyword"> </font>{
+00180 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#p0">IdSimpleLocalMailBox</a>;
+00181 }
+00182
+<a name="l00183"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a20">00183</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::getDebugString(std::string &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a>)<font class="keyword"> const</font>
+00184 <font class="keyword"> </font>{
+00185 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <font class="stringliteral">"class CSimpleLocalMailBox"</font>;
+00186 }
+00187
+<a name="l00188"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a21">00188</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;os)
+00189 {
+00190 IConnectIA::save(os);
+00191 <a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a26">size</a> = <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.size();
+00192 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a26">size</a> );
+00193
+00194 tListMessage::const_iterator i = <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.begin();
+00195 <font class="keywordflow">while</font>(i != <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.end())
+00196 {
+00197 IMessageBase &amp;m = (IMessageBase &amp;)*(*i);
+00198 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;) m.getType() );
+00199 <font class="comment">//os.serial( (IMessageBase &amp;) m );</font>
+00200 m.save(os);
+00201 }
+00202
+00203 }
+00204
+<a name="l00205"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a22">00205</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is)
+00206 {
+00207 IConnectIA::load(is);
+00208 <font class="keywordflow">while</font>(<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.size())
+00209 {
+00210 ((IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back())-&gt;release();
+00211 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.pop_back();
+00212 }
+00213 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> = 0;
+00214
+00215 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a223">id</a>;
+00216 <a class="code" href="types__nl_8h.html#a8">sint32</a> i;
+00217 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(i);
+00218 <font class="keywordflow">if</font>(i)
+00219 {
+00220 <font class="keywordflow">while</font>(i --)
+00221 {
+00222 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(id);
+00223 IMessageBase *m = (IMessageBase *)id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>();
+00224 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( *m );
+00225 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.push_back(m);
+00226 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n3">_Size</a> ++;
+00227 }
+00228 }
+00229 }
+00230
+<a name="l00231"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a23">00231</a> <font class="keywordtype">void</font> CSimpleLocalMailBox::onKill(IConnectIA *)
+00232 {
+00233 }
+00234
+<a name="l00235"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a24">00235</a> IObjectIA::CProcessResult CSimpleLocalMailBox::sendMessage(IMessageBase *m)
+00236 {
+00237 m-&gt;release();
+00238 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00239 }
+00240
+<a name="l00241"></a><a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#c0">00241</a> IConnectIA &amp;CSimpleLocalMailBox::getConnection(IConnectIA &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>)
+00242 {
+00243 <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#z139_2">addInConnectedList</a>(&amp;<a class="code" href="driver__opengl__extension__def_8h.html#a246">r</a>);
+00244 <font class="keywordflow">return</font> *<font class="keyword">this</font>;
+00245 }
+00246
+<a name="l00247"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a0">00247</a> CLocalMailBox::CLocalMailBox (<font class="keyword">const</font> IWordNumRef *parent):IMailBox(parent),_Size(0)
+00248 {
+00249 }
+00250
+<a name="l00251"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a1">00251</a> CLocalMailBox::CLocalMailBox(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is):IMailBox(is),_Size(0)
+00252 {
+00253 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a20">load</a>(is);
+00254 }
+00255
+00256
+<a name="l00257"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a2">00257</a> CLocalMailBox::CLocalMailBox (<font class="keyword">const</font> CLocalMailBox &amp;A):IMailBox(A),_RunState(A._RunState),_Size(0)
+00258 {
+00259 <font class="comment">/*tListMailBox::const_reverse_iterator i = A._ListMailBox.rbegin();</font>
+00260 <font class="comment"> while(i != A._ListMailBox.rend())</font>
+00261 <font class="comment"> {</font>
+00262 <font class="comment"> connect(*i);</font>
+00263 <font class="comment"> _ListMailBox.push_back(*i++);</font>
+00264 <font class="comment"> }*/</font>
+00265 }
+00266
+<a name="l00267"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a3">00267</a> CLocalMailBox::~CLocalMailBox()
+00268 {
+00269 <font class="keywordflow">while</font>(<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.begin() != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.end())
+00270 {
+00271 IMessageBase *msg = (IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.back();
+00272 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00273 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *mname = (<font class="keyword">const</font> <font class="keywordtype">char</font> *)msg-&gt;getType();
+00274 <font class="preprocessor">#endif</font>
+00275 <font class="preprocessor"></font> msg-&gt;release();
+00276 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.pop_back();
+00277 }
+00278
+00279 <font class="keywordflow">while</font>(<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.begin() != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.end())
+00280 {
+00281 IMessageBase *msg = (IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.back();
+00282 msg-&gt;release();
+00283 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.pop_back();
+00284 }
+00285
+00286 }
+00287
+<a name="l00288"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a5">00288</a> <font class="keywordtype">void</font> CLocalMailBox::shareMessage()
+00289 {
+00290 IMessageBase *msg = (IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.back();
+00291 msg-&gt;incRef();
+00292 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.push_back(msg);
+00293 }
+00294
+<a name="l00295"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a4">00295</a> <font class="keyword">const</font> IMessageBase &amp;CLocalMailBox::getMessage()
+00296 {
+00297 <font class="keywordflow">return</font> *<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.back();
+00298 }
+00299
+<a name="l00300"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a6">00300</a> <font class="keywordtype">void</font> CLocalMailBox::popMessage()
+00301 {
+00302
+00303 <font class="comment">/*IMessageBase *msg = (IMessageBase *)_ListMessageIn.back();</font>
+00304 <font class="comment"> _ListMessageIn.pop_back();</font>
+00305 <font class="comment"> if(msg-&gt;getDispatch())</font>
+00306 <font class="comment"> {</font>
+00307 <font class="comment"> _ListSharedMessage.push_back(msg);</font>
+00308 <font class="comment"> }</font>
+00309 <font class="comment"> else</font>
+00310 <font class="comment"> { </font>
+00311 <font class="comment"> msg-&gt;release();</font>
+00312 <font class="comment"> }*/</font>
+00313 ((IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.back())-&gt;release();
+00314 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.pop_back();
+00315 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> --;
+00316 }
+00317
+<a name="l00318"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a7">00318</a> <a class="code" href="types__nl_8h.html#a8">sint32</a> CLocalMailBox::getMessageCount()<font class="keyword"> const</font>
+00319 <font class="keyword"> </font>{
+00320 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a>;
+00321 }
+00322
+<a name="l00323"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a8">00323</a> <font class="keywordtype">bool</font> CLocalMailBox::isEmpty()<font class="keyword"> const</font>
+00324 <font class="keyword"> </font>{
+00325 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> == 0;<font class="comment">//_ListMessageIn.begin() == _ListMessageIn.end();</font>
+00326 }
+00327
+00328 <font class="comment">/*void CLocalMailBox::sendMessage(const IBasicAgent &amp;,const IBaseGroupType &amp;)</font>
+00329 <font class="comment"> { </font>
+00330 <font class="comment"> }*/</font>
+00331
+<a name="l00332"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a9">00332</a> IObjectIA::CProcessResult CLocalMailBox::sendMessage(IMessageBase *m)
+00333 {
+00334 m-&gt;release();
+00335 <font class="comment">//_listMessageOut.push_back((const IMessageBase *)msg.clone());</font>
+00336 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00337 }
+00338
+<a name="l00339"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a10">00339</a> <font class="keywordtype">void</font> CLocalMailBox::addMessage(IMessageBase *msg)
+00340 {
+00341 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.push_front(msg);
+00342 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> ++;
+00343 }
+00344
+00345 <font class="comment">// Ajoute une boite aux lettre dans la liste des boites aux lettres "source" (les bals à consulter).</font>
+<a name="l00346"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a11">00346</a> <font class="keywordtype">void</font> CLocalMailBox::addMailBox(IMailBox *mail)
+00347 {
+00348 <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a7">connect</a>( mail );
+00349 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.push_back((<a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> *)mail);
+00350
+00351 <font class="comment">/*std::list&lt;IBasicMessageGroup *&gt;::const_iterator it_grp = mail-&gt;getGroups().begin();</font>
+00352 <font class="comment"> while ( it_grp != mail-&gt;getGroups().end() )</font>
+00353 <font class="comment"> {</font>
+00354 <font class="comment"> _Msg_grps.push_back( *it_grp );</font>
+00355 <font class="comment"> it_grp++;</font>
+00356 <font class="comment"> }*/</font>
+00357
+00358 }
+00359
+00360 <font class="comment">// Supprime une boite aux lettre dans la liste des boites aux lettres "source" (les bals à consulter).</font>
+<a name="l00361"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a12">00361</a> <font class="keywordtype">void</font> CLocalMailBox::removeMailBox(IMailBox *mail)
+00362 {
+00363 eraseFromList&lt;IMailBox *&gt;(&amp;<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>,mail);
+00364 <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a8">removeConnection</a>(mail);
+00365 }
+00366
+<a name="l00367"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a13">00367</a> <font class="keywordtype">void</font> CLocalMailBox::setName(<font class="keyword">const</font> IVarName &amp;)
+00368 {
+00369 }
+00370
+<a name="l00371"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a14">00371</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CLocalMailBox::clone()<font class="keyword"> const</font>
+00372 <font class="keyword"> </font>{
+00373 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a0">CLocalMailBox</a>(*<font class="keyword">this</font>);
+00374 <font class="keywordflow">return</font> a;
+00375 }
+00376
+<a name="l00377"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a15">00377</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CLocalMailBox::newInstance()<font class="keyword"> const</font>
+00378 <font class="keyword"> </font>{
+00379 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a;
+00380 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>() != NULL)
+00381 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a0">CLocalMailBox</a>((<font class="keyword">const</font> IWordNumRef *)<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>());
+00382 <font class="keywordflow">else</font>
+00383 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a0">CLocalMailBox</a>((<font class="keyword">const</font> IWordNumRef *)NULL);
+00384 <font class="keywordflow">return</font> a;
+00385 }
+00386
+<a name="l00387"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a16">00387</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;CLocalMailBox::getType()<font class="keyword"> const</font>
+00388 <font class="keyword"> </font>{
+00389 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#p0">IdLocalMailBox</a>;
+00390 }
+00391
+<a name="l00392"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a17">00392</a> <font class="keywordtype">void</font> CLocalMailBox::onKill(IConnectIA *a)
+00393 {
+00394 eraseFromList&lt;IMailBox *&gt;(&amp;<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>,(<a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> *)a);
+00395
+00396 <a class="code" href="classstd_1_1list.html">tListMessageIter</a> msgItr = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.begin();
+00397 <font class="keywordflow">while</font>(msgItr != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.end())
+00398 {
+00399 IMessageBase *msg = (IMessageBase *)*msgItr;
+00400
+00401 <font class="keywordflow">if</font>(msg-&gt;getSender() == a || msg-&gt;getContinuation() == a)
+00402 {
+00403 <a class="code" href="classstd_1_1list.html">tListMessageIter</a> iTmp = msgItr++;
+00404 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.erase(iTmp);
+00405 msg-&gt;release();
+00406 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> --;
+00407 }
+00408 <font class="keywordflow">else</font> msgItr++;
+00409 }
+00410
+00411 }
+00412
+<a name="l00413"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a18">00413</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CLocalMailBox::isEqual</a>(<font class="keyword">const</font> IBasicObjectIA &amp;a)<font class="keyword"> const</font>
+00414 <font class="keyword"> </font>{
+00415 <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> &amp;m = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> &amp;)a;
+00416 <font class="keywordflow">return</font> (<font class="keyword">const</font> IWordNumRef &amp;)m == (<font class="keyword">const</font> IWordNumRef &amp;)*<font class="keyword">this</font>;
+00417 }
+00418
+<a name="l00419"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a19">00419</a> <font class="keywordtype">void</font> CLocalMailBox::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;os)
+00420 {
+00421 IMailBox::save(os);
+00422 <a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.size();
+00423 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> );
+00424 <a class="code" href="classstd_1_1list.html">tListMailBoxCstIter</a> k = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.begin();
+00425 <font class="keywordflow">while</font>(k != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.end())
+00426 {
+00427 <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> *mail = *k++;
+00428 ((IWordNumRef *)(<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IWordNumRef.html">NLAIAGENT::IWordNumRef</a> *)*mail)-&gt;save(os);
+00429 }
+00430
+00431 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.size();
+00432 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> );
+00433 <a class="code" href="classstd_1_1list.html">tListMessageIter</a> msgItr = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.begin();
+00434 <font class="keywordflow">while</font>(msgItr != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.end())
+00435 {
+00436 IMessageBase *msg = (IMessageBase *)*msgItr++;
+00437 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;) (msg-&gt;getType()) );
+00438 msg-&gt;save(os);
+00439 }
+00440
+00441 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.size();
+00442 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a27">size</a> );
+00443 msgItr = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.begin();
+00444 <font class="keywordflow">while</font>(msgItr != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.end())
+00445 {
+00446 IMessageBase *msg = (IMessageBase *)*msgItr++;
+00447 os.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>( (<a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;) (msg-&gt;getType()) );
+00448 msg-&gt;save(os);
+00449 }
+00450 <font class="comment">//_ListMessageIn.save(os);</font>
+00451 }
+00452
+<a name="l00453"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a20">00453</a> <font class="keywordtype">void</font> CLocalMailBox::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is)
+00454 {
+00455 IMailBox::load(is);
+00456 <a class="code" href="types__nl_8h.html#a8">sint32</a> i;
+00457 <a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html">NLAIC::CIdentTypeAlloc</a> <a class="code" href="driver__opengl__extension__def_8h.html#a223">id</a>;
+00458 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(i);
+00459 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> = 0;
+00460 <font class="keywordflow">if</font>(i)
+00461 {
+00462 <font class="keywordflow">while</font>(i --)
+00463 {
+00464 is.<a class="code" href="classNLMISC_1_1IStream.html#a5">serial</a>(id);
+00465 IWordNumRef *num = (IWordNumRef *)id.<a class="code" href="classNLAIC_1_1CIdentTypeAlloc.html#a3">allocClass</a>();
+00466 num-&gt;load(is);
+00467 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.push_back((<a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> *)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IRefrence.html#b0">IRefrence</a> *)*num));
+00468 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o4">_Size</a> ++;
+00469 <font class="keyword">delete</font> num;
+00470 }
+00471 }
+00472
+00473 <font class="comment">//_ListMessageIn.load(is);</font>
+00474 }
+00475
+<a name="l00476"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a21">00476</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CLocalMailBox::getState()<font class="keyword"> const </font>
+00477 <font class="keyword"> </font>{
+00478 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o0">_RunState</a>;
+00479 }
+00480
+<a name="l00481"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a22">00481</a> <font class="keywordtype">void</font> CLocalMailBox::setState(<a class="code" href="namespaceNLAIAGENT.html#a50">TProcessStatement</a> state, IObjectIA *result)
+00482 {
+00483 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o0">_RunState</a>.ResultState = state;
+00484 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o0">_RunState</a>.Result = result;
+00485 }
+00486
+<a name="l00487"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a23">00487</a> <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> *CLocalMailBox::pumpMessages(<font class="comment">/*IBasicMessageGroup &amp;grp*/</font>)<font class="keyword"> const</font>
+00488 <font class="keyword"> </font>{
+00489 <font class="comment">//return _ListMessageIn.pumpMessages( grp );</font>
+00490 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.begin() != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.end())
+00491 {
+00492 <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> *<a class="code" href="namespaceNLAISCRIPT.html#a20">l</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1IMailBox.html#s0">tListMessage</a>;
+00493 <a class="code" href="classstd_1_1list.html">tListMessageCstIter</a> msgItr = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.begin();
+00494 <font class="keywordflow">while</font>(msgItr != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o2">_ListSharedMessage</a>.end())
+00495 {
+00496 <font class="keyword">const</font> IMessageBase *msg = *msgItr++;
+00497 l-&gt;push_back((<font class="keyword">const</font> IMessageBase *)msg-&gt;clone());
+00498 }
+00499 <font class="keywordflow">return</font> l;
+00500 }
+00501 <font class="keywordflow">return</font> NULL;
+00502 }
+00503
+<a name="l00504"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a24">00504</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CLocalMailBox::run()
+00505 {
+00506
+00507 <font class="comment">/*while(_ListSharedMessage.begin() != _ListSharedMessage.end())</font>
+00508 <font class="comment"> {</font>
+00509 <font class="comment"> _ListSharedMessage.back()-&gt;release(); </font>
+00510 <font class="comment"> _ListSharedMessage.pop_back();</font>
+00511 <font class="comment"> }</font>
+00512 <font class="comment"> tListMailBoxIter j;</font>
+00513 <font class="comment"> fillMailBox();*/</font>
+00514 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a21">getState</a>();
+00515 }
+00516
+<a name="l00517"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#a25">00517</a> <font class="keywordtype">void</font> CLocalMailBox::getDebugString(std::string &amp;<a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a>)<font class="keyword"> const</font>
+00518 <font class="keyword"> </font>{
+00519 <a class="code" href="driver__opengl__extension__def_8h.html#a245">t</a> += <font class="stringliteral">"class CLocalMailBox parent"</font>;
+00520 <font class="comment">/*if(getParent() != NULL)</font>
+00521 <font class="comment"> {</font>
+00522 <font class="comment"> const IObjectIA *o = getParent();</font>
+00523 <font class="comment"> t += (const char *)o-&gt;getType();</font>
+00524 <font class="comment"> t += "&gt;";</font>
+00525 <font class="comment"> }</font>
+00526 <font class="comment"> else</font>
+00527 <font class="comment"> t += "NULL&gt;";*/</font>
+00528
+00529 }
+00530
+<a name="l00531"></a><a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#c0">00531</a> <font class="keywordtype">void</font> CLocalMailBox::fillMailBox()
+00532 {
+00533 <a class="code" href="classstd_1_1list.html">tListMailBoxIter</a> i_mbox = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.begin();
+00534
+00535 <font class="preprocessor">#ifdef NL_DEBUG</font>
+00536 <font class="preprocessor"></font> <font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a244">s</a> = <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.size();
+00537 <font class="preprocessor">#endif</font>
+00538 <font class="preprocessor"></font>
+00539 <font class="keywordflow">while</font> ( i_mbox != <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o3">_ListMailBox</a>.end() )
+00540 {
+00541 <a class="code" href="classNLAIAGENT_1_1IMailBox.html#a0">IMailBox</a> *box = (*i_mbox);
+00542 <a class="code" href="classstd_1_1list.html">std::list&lt;const IMessageBase *&gt;</a> *msg_lst = box-&gt;pumpMessages();
+00543 <font class="keywordflow">if</font> ( msg_lst != NULL)
+00544 {
+00545 <font class="keywordflow">while</font> ( msg_lst-&gt;begin() != msg_lst-&gt;end())
+00546 {
+00547 IMessageBase *m = (IMessageBase *) msg_lst-&gt;front();
+00548 m-&gt;incRef();
+00549 <a class="code" href="classNLAIAGENT_1_1CLocalMailBox.html#o1">_ListMessageIn</a>.push_back(m);
+00550 m-&gt;release();
+00551 msg_lst-&gt;pop_front();
+00552 }
+00553 <font class="keyword">delete</font> msg_lst;
+00554 }
+00555 i_mbox++;
+00556 }
+00557 }
+00558
+00559
+<a name="l00560"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a0">00560</a> CScriptMailBox::CScriptMailBox(<font class="keyword">const</font> IWordNumRef *parent) : CSimpleLocalMailBox(parent)
+00561 {
+00562 }
+00563
+<a name="l00564"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a1">00564</a> CScriptMailBox::CScriptMailBox(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &amp;is) : CSimpleLocalMailBox(is)
+00565 {
+00566 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#a22">load</a>(is);
+00567 }
+00568
+<a name="l00569"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a2">00569</a> CScriptMailBox::CScriptMailBox(<font class="keyword">const</font> CScriptMailBox &amp;a) : CSimpleLocalMailBox(a)
+00570 {
+00571 tListMessage::const_reverse_iterator i = a._ListMessage.rbegin();
+00572 <font class="keywordflow">while</font>(i != a._ListMessage.rend())
+00573 {
+00574 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.push_back(*i++);
+00575 ((IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back())-&gt;incRef();
+00576 }
+00577 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n1">_RunState</a> = a._RunState;
+00578 }
+00579
+<a name="l00580"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a3">00580</a> CScriptMailBox::~CScriptMailBox()
+00581 {
+00582 <font class="keywordflow">while</font>(<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.begin() != <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.end())
+00583 {
+00584 IMessageBase *m = (IMessageBase *)<a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.back();
+00585 m-&gt;release();
+00586 <a class="code" href="classNLAIAGENT_1_1CSimpleLocalMailBox.html#n0">_ListMessage</a>.pop_back();
+00587 }
+00588 }
+00589
+<a name="l00590"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a4">00590</a> <font class="keyword">const</font> IObjectIA::CProcessResult &amp;CScriptMailBox::run()
+00591 {
+00592 <font class="comment">// Get messages from the father's mailbox</font>
+00593 <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a5">fillMailBox</a>();
+00594 <font class="keywordflow">return</font> IObjectIA::ProcessRun;
+00595 }
+00596
+<a name="l00598"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a5">00598</a> <font class="keywordtype">void</font> CScriptMailBox::fillMailBox()
+00599 {
+00600 }
+00601
+<a name="l00602"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a6">00602</a> <font class="keywordtype">void</font> CScriptMailBox::setIndex(<a class="code" href="types__nl_8h.html#a8">sint32</a> i)
+00603 {
+00604 <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#o0">_CIndex</a> = i;
+00605 }
+00606
+<a name="l00607"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a7">00607</a> <a class="code" href="types__nl_8h.html#a8">sint32</a> CScriptMailBox::getIndex()
+00608 {
+00609 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#o0">_CIndex</a>;
+00610 }
+00611
+<a name="l00612"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#c0">00612</a> <font class="keyword">const</font> IMessageBase *CScriptMailBox::translateMsg(<font class="keyword">const</font> IMessageBase *msg)
+00613 {
+00614 CAgentScript *father = (CAgentScript *) <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>()-&gt;getParent();
+00615
+00616 <a class="code" href="types__nl_8h.html#a8">sint32</a> <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a> = father-&gt;getChildMessageIndex( msg, <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#o0">_CIndex</a> );
+00617
+00618 <font class="keywordflow">if</font> ( <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a> != -1 )
+00619 {
+00620 IMessageBase *translated_msg = (IMessageBase *) msg-&gt;clone();
+00621 translated_msg-&gt;setMethodIndex( 0, <a class="code" href="driver__opengl__extension__def_8h.html#a225">index</a> + ( (CAgentScript *) <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>())-&gt;getBaseMethodCount() );
+00622 <font class="keywordflow">return</font> translated_msg;
+00623 }
+00624 <font class="keywordflow">return</font> NULL;
+00625 }
+00626
+<a name="l00627"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a8">00627</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CScriptMailBox::clone()<font class="keyword"> const</font>
+00628 <font class="keyword"> </font>{
+00629 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a0">CScriptMailBox</a>(*<font class="keyword">this</font>);
+00630 <font class="keywordflow">return</font> a;
+00631 }
+00632
+<a name="l00633"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a9">00633</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CScriptMailBox::newInstance()<font class="keyword"> const</font>
+00634 <font class="keyword"> </font>{
+00635 <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *a;
+00636 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>() != NULL)
+00637 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a0">CScriptMailBox</a>((<font class="keyword">const</font> IWordNumRef *)<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#a3">getParent</a>());
+00638 <font class="keywordflow">else</font>
+00639 a = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a0">CScriptMailBox</a>((<font class="keyword">const</font> IWordNumRef *)NULL);
+00640 <font class="keywordflow">return</font> a;
+00641 }
+00642
+<a name="l00643"></a><a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#a10">00643</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> &amp;CScriptMailBox::getType()<font class="keyword"> const</font>
+00644 <font class="keyword"> </font>{
+00645 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CScriptMailBox.html#p0">IdScriptMailBox</a>;
+00646 }
+00647 }
+</pre></div>
+
+<!-- footer -->
+<BR><FONT Size=+5>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </FONT>
+</TD>
+<TD WIDTH=15><IMG SRC=http://www.nevrax.org/inc/img/pixel.gif WIDTH=15 HEIGHT=15 BORDER=0 ALT=""></TD>
+</TR>
+</TABLE>
+</BODY>
+</HTML>