diff options
author | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
---|---|---|
committer | neodarz <neodarz@neodarz.net> | 2018-08-11 20:21:34 +0200 |
commit | 0ea5fc66924303d1bf73ba283a383e2aadee02f2 (patch) | |
tree | 2568e71a7ccc44ec23b8bb3f0ff97fb6bf2ed709 /docs/doxygen/nel/operation_8cpp-source.html | |
download | nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.tar.xz nevrax-website-self-hostable-0ea5fc66924303d1bf73ba283a383e2aadee02f2.zip |
Initial commit
Diffstat (limited to 'docs/doxygen/nel/operation_8cpp-source.html')
-rw-r--r-- | docs/doxygen/nel/operation_8cpp-source.html | 455 |
1 files changed, 455 insertions, 0 deletions
diff --git a/docs/doxygen/nel/operation_8cpp-source.html b/docs/doxygen/nel/operation_8cpp-source.html new file mode 100644 index 00000000..39fa3d8f --- /dev/null +++ b/docs/doxygen/nel/operation_8cpp-source.html @@ -0,0 +1,455 @@ +<!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> <A CLASS=uplinks HREF=http://www.nevrax.org><b>Home</B></FONT></A> </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> <A CLASS=uplinks HREF=http://www.nevrax.com><b>nevrax.com</B></FONT></A> </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> + + +<!-- 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> </td> +</tr></table> +<!-- Generated by Doxygen 1.2.14 --> +<center> +<a class="qindex" href="index.html">Main Page</a> <a class="qindex" href="namespaces.html">Namespace List</a> <a class="qindex" href="hierarchy.html">Class Hierarchy</a> <a class="qindex" href="classes.html">Alphabetical List</a> <a class="qindex" href="annotated.html">Compound List</a> <a class="qindex" href="files.html">File List</a> <a class="qindex" href="namespacemembers.html">Namespace Members</a> <a class="qindex" href="functions.html">Compound Members</a> <a class="qindex" href="globals.html">File Members</a> <a class="qindex" href="pages.html">Related Pages</a> <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> </center> +<hr><h1>operation.cpp</h1><a href="operation_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><pre>00001 +00007 <font class="comment">/* Copyright, 2001 Nevrax Ltd.</font> +00008 <font class="comment"> *</font> +00009 <font class="comment"> * This file is part of NEVRAX D.T.C. SYSTEM.</font> +00010 <font class="comment"> * NEVRAX D.T.C. SYSTEM is free software; you can redistribute it and/or modify</font> +00011 <font class="comment"> * it under the terms of the GNU General Public License as published by</font> +00012 <font class="comment"> * the Free Software Foundation; either version 2, or (at your option)</font> +00013 <font class="comment"> * any later version.</font> +00014 <font class="comment"></font> +00015 <font class="comment"> * NEVRAX D.T.C. SYSTEM is distributed in the hope that it will be useful, but</font> +00016 <font class="comment"> * WITHOUT ANY WARRANTY; without even the implied warranty of</font> +00017 <font class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU</font> +00018 <font class="comment"> * General Public License for more details.</font> +00019 <font class="comment"></font> +00020 <font class="comment"> * You should have received a copy of the GNU General Public License</font> +00021 <font class="comment"> * along with NEVRAX D.T.C. SYSTEM; see the file COPYING. If not, write to the</font> +00022 <font class="comment"> * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,</font> +00023 <font class="comment"> * MA 02111-1307, USA.</font> +00024 <font class="comment"> */</font> +00025 <font class="preprocessor">#include "<a class="code" href="operation_8h.html">nel/ai/agent/operation.h</a>"</font> +00026 <font class="preprocessor">#include "<a class="code" href="agent__local__mailer_8h.html">nel/ai/agent/agent_local_mailer.h</a>"</font> +00027 <font class="preprocessor">#include "<a class="code" href="object__unknown_8h.html">nel/ai/script/object_unknown.h</a>"</font> +00028 <font class="preprocessor">#include "<a class="code" href="interpret__object__message_8h.html">nel/ai/script/interpret_object_message.h</a>"</font> +00029 +00030 +00031 <font class="keyword">namespace </font>NLAIAGENT +00032 { +<a name="l00033"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#p0">00033</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> *CAgentOperation::IdAgentOperation = NULL; +<a name="l00034"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#p1">00034</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> *CAgentOperation::idMsgOnChangeMsg = NULL; +<a name="l00035"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#p2">00035</a> <font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *CAgentOperation::MsgOnChangeMsg = NULL; +00036 +<a name="l00037"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a0">00037</a> CAgentOperation::CAgentOperation():CAgentScript(NULL), _Op(NULL), _Name(NULL), _Change(false) +00038 { +00039 } +00040 +<a name="l00041"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a1">00041</a> CAgentOperation::CAgentOperation(IObjetOp *o):CAgentScript(NULL), _Op(o), _Name(NULL), _Change(true) +00042 { +00043 +00044 } +00045 +<a name="l00046"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a2">00046</a> CAgentOperation::CAgentOperation(<font class="keyword">const</font> CAgentOperation &a):CAgentScript(a), _Op(a._Op), _Name(NULL), _Change(false) +00047 { +00048 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a> != NULL) +00049 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->incRef(); +00050 +00051 <font class="keywordflow">if</font>(a._Name != NULL) +00052 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a6">setName</a>(*a._Name); +00053 +00054 <font class="comment">/*std::list <IConnectIA *>::iterator it = _Connection.begin();</font> +00055 <font class="comment"> while(it != _Connection.end())</font> +00056 <font class="comment"> { </font> +00057 <font class="comment"> (*it)->connect(this);</font> +00058 <font class="comment"> it ++;</font> +00059 <font class="comment"> }*/</font> +00060 } +00061 +<a name="l00062"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a3">00062</a> CAgentOperation::~CAgentOperation() +00063 { +00064 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a> != NULL) +00065 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->release(); +00066 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a> != NULL) +00067 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a>->release(); +00068 } +00069 +<a name="l00070"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a18">00070</a> <font class="keywordtype">void</font> CAgentOperation::onKill(IConnectIA *A) +00071 { +00072 std::list <IConnectIA *>::iterator it = <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.begin(); +00073 <font class="keywordflow">while</font>(it != <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.end()) +00074 { +00075 <font class="keywordflow">if</font>((*it) == A) +00076 { +00077 std::list < IConnectIA * >::iterator itTmp = it ++; +00078 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.erase(itTmp); +00079 <font class="keywordflow">continue</font>; +00080 } +00081 it ++; +00082 } +00083 } +00084 +<a name="l00085"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#b0">00085</a> <font class="keywordtype">void</font> CAgentOperation::update(IObjectIA *obj) +00086 { +00087 <a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *msg = (<a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *)CAgentOperation::MsgOnChangeMsg-><a class="code" href="classNLAIC_1_1IBasicType.html#a3">clone</a>(); +00088 msg-><a class="code" href="classNLAIAGENT_1_1IListBasicManager.html#z161_7">push</a>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a>); +00089 msg-><a class="code" href="classNLAIAGENT_1_1IListBasicManager.html#z161_7">push</a>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>); +00090 msg-><a class="code" href="classNLAIAGENT_1_1IMessageBase.html#a9">setPerformatif</a>(IMessageBase::PTell); +00091 msg-><a class="code" href="classNLAIAGENT_1_1IMessageBase.html#z165_0">setSender</a>((<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)((<a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> *)<font class="keyword">this</font>)); +00092 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->incRef(); +00093 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a>->incRef(); +00094 (obj)->sendMessage(((<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *)msg)); +00095 } +00096 +<a name="l00097"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a29">00097</a> <font class="keywordtype">void</font> CAgentOperation::connectOnChange(IConnectIA *ref) +00098 { +00099 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.push_back(ref); +00100 <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#b0">IConnectIA</a> *obj = ref; +00101 <font class="keywordflow">if</font>(CLocalAgentMail::LocalAgentMail == ref->getType()) +00102 obj = (<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#b0">IConnectIA</a> *)((CLocalAgentMail *)ref)->getHost(); +00103 +00104 obj->connect(<font class="keyword">this</font>); +00105 +00106 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a> != NULL) +00107 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(ref); +00108 } +00109 +<a name="l00110"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a15">00110</a> IObjectIA::CProcessResult CAgentOperation::runActivity() +00111 { +00112 <font class="keywordflow">if</font>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a28">changed</a>()) +00113 { +00114 std::list < IConnectIA * >::iterator it = <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.begin(); +00115 <font class="keywordflow">while</font>(it != <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o1">_Connection</a>.end()) +00116 { +00117 <font class="comment">/*NLAIAGENT::IMessageBase *msg = (NLAIAGENT::IMessageBase *)CAgentOperation::MsgOnChangeMsg->clone(); </font> +00118 <font class="comment"> msg->push(_Op);</font> +00119 <font class="comment"> msg->setPerformatif(IMessageBase::PTell);</font> +00120 <font class="comment"> msg->setSender((NLAIAGENT::IObjectIA *)((CAgentScript *)this));</font> +00121 <font class="comment"> _Op->incRef();</font> +00122 <font class="comment"> (*it)->sendMessage(((NLAIAGENT::IObjectIA *)msg));*/</font> +00123 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(*it); +00124 it ++; +00125 } +00126 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a30">changeIsDone</a>(); +00127 } +00128 <font class="keywordflow">if</font>(CAgentScript::haveActivity()) <font class="keywordflow">return</font> CAgentScript::runActivity(); +00129 <font class="keywordflow">else</font> <font class="keywordflow">return</font> CProcessResult(); +00130 } +00131 +<a name="l00132"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a19">00132</a> <font class="keyword">const</font> IObjectIA::CProcessResult &CAgentOperation::run() +00133 { +00134 <font class="keywordflow">return</font> CAgentScript::run(); +00135 } +00136 +<a name="l00137"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a17">00137</a> IMessageBase *CAgentOperation::runTell(<font class="keyword">const</font> IMessageBase &msg) +00138 { +00139 <font class="keywordflow">if</font>(msg.getType() == *CAgentOperation::idMsgOnChangeMsg) +00140 { +00141 CConstIteratorContener iter = msg.getConstIterator(); +00142 ((<a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> &)*<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>) = (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjectIA.html#b0">IObjectIA</a> &)*(iter ++); +00143 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o2">_Change</a> = <font class="keyword">true</font>; +00144 <font class="keywordflow">return</font> NULL; +00145 } +00146 <font class="keywordflow">else</font> +00147 { +00148 <font class="keyword">static</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a> idMsgSetValue(<font class="stringliteral">"SetValueMsg"</font>); +00149 <font class="keywordflow">if</font>(msg.getType() == idMsgSetValue) +00150 { +00151 CConstIteratorContener iter = msg.getConstIterator(); +00152 iter ++; +00153 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a4">setValue</a>((<a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *)iter ++); +00154 <font class="keywordflow">return</font> NULL; +00155 } +00156 } +00157 <font class="keywordflow">return</font> CAgentScript::runTell(msg); +00158 } +00159 +<a name="l00160"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a20">00160</a> <font class="keywordtype">bool</font> <a class="code" href="chain_8cpp.html#a2">CAgentOperation::isEqual</a>(<font class="keyword">const</font> IBasicObjectIA &a)<font class="keyword"> const</font> +00161 <font class="keyword"> </font>{ +00162 <font class="keywordflow">if</font>(<a class="code" href="chain_8cpp.html#a2">CAgentScript::isEqual</a>((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> &)*<font class="keyword">this</font>)) +00163 { +00164 <font class="keywordflow">if</font>(_Op) +00165 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->isEqual((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> &)*<font class="keyword">this</font>); +00166 } +00167 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00168 } +00169 +<a name="l00170"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a25">00170</a> <font class="keywordtype">void</font> CAgentOperation::getDebugString(std::string &<a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a>)<font class="keyword"> const</font> +00171 <font class="keyword"> </font>{ +00172 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"CAgentOperation"</font>; +00173 <font class="keywordflow">if</font>(_Op) +00174 { +00175 std::string <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>; +00176 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->getDebugString(<a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>); +00177 <a class="code" href="driver__opengl__extension__def_8h.html#a384">t</a> += <font class="stringliteral">"<"</font> + <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a> + <font class="stringliteral">">"</font>; +00178 } +00179 } +00180 +<a name="l00181"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a23">00181</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CAgentOperation::clone()<font class="keyword"> const</font> +00182 <font class="keyword"> </font>{ +00183 <font class="keywordflow">return</font> (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> *)<font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a0">CAgentOperation</a>(*<font class="keyword">this</font>); +00184 +00185 } +00186 +<a name="l00187"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a24">00187</a> <font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicType.html">NLAIC::IBasicType</a> *CAgentOperation::newInstance()<font class="keyword"> const</font> +00188 <font class="keyword"> </font>{ +00189 <font class="keywordflow">return</font> (<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> *)<font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a0">CAgentOperation</a>(); +00190 } +00191 +<a name="l00192"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a21">00192</a> <font class="keywordtype">void</font> CAgentOperation::load(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &is) +00193 { +00194 +00195 } +00196 +<a name="l00197"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a22">00197</a> <font class="keywordtype">void</font> CAgentOperation::save(<a class="code" href="classNLMISC_1_1IStream.html">NLMISC::IStream</a> &os) +00198 { +00199 +00200 } +00201 +<a name="l00202"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a9">00202</a> IObjetOp &CAgentOperation::neg() +00203 { +00204 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->neg(); +00205 } +00206 +<a name="l00207"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a10">00207</a> IObjetOp &CAgentOperation::operator += (<font class="keyword">const</font> IObjetOp &a) +00208 { +00209 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(); +00210 <font class="keywordflow">return</font> (*_Op) += a; +00211 } +00212 +<a name="l00213"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a11">00213</a> IObjetOp &CAgentOperation::operator -= (<font class="keyword">const</font> IObjetOp &a) +00214 { +00215 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(); +00216 <font class="keywordflow">return</font> (*_Op) -= a; +00217 } +00218 +<a name="l00219"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a12">00219</a> IObjetOp &CAgentOperation::operator *= (<font class="keyword">const</font> IObjetOp &a) +00220 { +00221 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(); +00222 <font class="keywordflow">return</font> (*_Op) *= a; +00223 } +00224 +<a name="l00225"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a13">00225</a> IObjetOp &CAgentOperation::operator /= (<font class="keyword">const</font> IObjetOp &a) +00226 { +00227 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(); +00228 <font class="keywordflow">return</font> (*_Op) /= a; +00229 } +00230 +<a name="l00231"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a8">00231</a> <font class="keywordtype">bool</font> CAgentOperation::isTrue()<font class="keyword"> const</font> +00232 <font class="keyword"> </font>{ +00233 <font class="keywordflow">if</font>(_Op) +00234 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->isTrue(); +00235 <font class="keywordflow">return</font> <font class="keyword">false</font>; +00236 } +00237 +00238 +<a name="l00239"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a31">00239</a> <font class="keywordtype">int</font> CAgentOperation::getBaseMethodCount()<font class="keyword"> const</font> +00240 <font class="keyword"> </font>{ +00241 <font class="keywordflow">return</font> CAgentScript::getBaseMethodCount() + CAgentOperation::TLastM; +00242 } +00243 +<a name="l00244"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a33">00244</a> sint32 CAgentOperation::getMethodIndexSize()<font class="keyword"> const</font> +00245 <font class="keyword"> </font>{ +00246 <font class="keywordflow">return</font> CAgentScript::getMethodIndexSize() + CAgentOperation::TLastM; +00247 } +00248 +<a name="l00249"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a32">00249</a> NLAIAGENT::tQueue CAgentOperation::isMember(<font class="keyword">const</font> IVarName *className,<font class="keyword">const</font> IVarName *methodName,<font class="keyword">const</font> IObjectIA &<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>)<font class="keyword"> const</font> +00250 <font class="keyword"> </font>{ +00251 <font class="preprocessor">#ifdef NL_DEBUG</font> +00252 <font class="preprocessor"></font> <font class="keyword">const</font> <font class="keywordtype">char</font> *dbg_method_name = methodName->getString(); +00253 std::string buffer; +00254 <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>.getDebugString(buffer); +00255 <font class="preprocessor">#endif</font> +00256 <font class="preprocessor"></font> +00257 NLAIAGENT::tQueue <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a> = <a class="code" href="namespaceNLAIAGENT.html#a42">NLAIAGENT::isTemplateMember</a>(CAgentOperation::StaticMethod,CAgentOperation::TLastM, CAgentScript::getMethodIndexSize(), +00258 className, methodName, <a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>); +00259 <font class="keywordflow">if</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>.size()) <font class="keywordflow">return</font> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00260 <font class="keywordflow">else</font> <font class="keywordflow">return</font> CAgentScript::isMember(className,methodName,<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a>); +00261 } +00262 +<a name="l00263"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a34">00263</a> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> CAgentOperation::runMethodBase(<font class="keywordtype">int</font> heritance, <font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,<a class="code" href="classNLAIAGENT_1_1IObjectIA.html">NLAIAGENT::IObjectIA</a> *o) +00264 { +00265 <font class="keywordflow">return</font> <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a34">runMethodBase</a>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,o); +00266 } +00267 +<a name="l00268"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a35">00268</a> <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> CAgentOperation::runMethodBase(<font class="keywordtype">int</font> <a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>, IObjectIA *o) +00269 { +00270 <a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html">NLAIAGENT::IObjectIA::CProcessResult</a> <a class="code" href="driver__opengl__extension__def_8h.html#a385">r</a>; +00271 <a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *<a class="code" href="driver__opengl__extension__def_8h.html#a382">param</a> = (<a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html">NLAIAGENT::IBaseGroupType</a> *)o; +00272 <font class="keywordflow">switch</font>(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a> - CAgentScript::getMethodIndexSize()) +00273 { +00274 <font class="keywordflow">case</font> CAgentOperation::TSetValue: +00275 { +00276 <a class="code" href="classNLAIAGENT_1_1IObjetOp.html#a0">IObjetOp</a> *obj = (<a class="code" href="classNLAIAGENT_1_1IObjetOp.html">NLAIAGENT::IObjetOp</a> *)param-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_10">get</a>(); +00277 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a4">setValue</a>(obj); +00278 obj->incRef(); +00279 } +00280 <font class="keywordflow">return</font> r; +00281 +00282 <font class="keywordflow">case</font> CAgentOperation::TGetValue: +00283 r.<a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html#m1">Result</a> = <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>; +00284 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#n0">_Op</a>->incRef(); +00285 <font class="keywordflow">return</font> r; +00286 +00287 <font class="keywordflow">case</font> CAgentOperation::TSetName: +00288 { +00289 <a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> <a class="code" href="driver__opengl__extension__def_8h.html#a383">s</a>(*(<a class="code" href="classNLAIAGENT_1_1CStringType.html">NLAIAGENT::CStringType</a> *)param-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_10">get</a>()); +00290 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a6">setName</a>(s); +00291 } +00292 <font class="keywordflow">return</font> r; +00293 +00294 <font class="keywordflow">case</font> CAgentOperation::TGetName: +00295 r.<a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html#m1">Result</a> = <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a>; +00296 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#o0">_Name</a>->release(); +00297 <font class="keywordflow">return</font> r; +00298 +00299 <font class="keywordflow">case</font> CAgentOperation::TUpdate: +00300 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a27">update</a>(); +00301 <font class="keywordflow">return</font> r; +00302 +00303 <font class="keywordflow">case</font> CAgentOperation::TIsChange: +00304 r.<a class="code" href="structNLAIAGENT_1_1IObjectIA_1_1CProcessResult.html#m1">Result</a> = <font class="keyword">new</font> <a class="code" href="classNLAIAGENT_1_1DDigitalType.html">NLAIAGENT::DDigitalType</a>(<a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a28">changed</a>() ? 1.0 : 0.0); +00305 <font class="keywordflow">return</font> r; +00306 +00307 <font class="keywordflow">case</font> CAgentOperation::TConnect: +00308 { +00309 <a class="code" href="classNLAIAGENT_1_1IConnectIA.html#b0">IConnectIA</a> *c = (<a class="code" href="classNLAIAGENT_1_1IConnectIA.html#b0">IConnectIA</a> *)param-><a class="code" href="classNLAIAGENT_1_1IBaseGroupType.html#z136_10">get</a>(); +00310 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a29">connectOnChange</a>(c); +00311 c->incRef(); +00312 } +00313 <font class="keywordflow">return</font> r; +00314 +00315 +00316 <font class="keywordflow">default</font>: +00317 <font class="keywordflow">return</font> CAgentScript::runMethodBase(<a class="code" href="driver__opengl__extension__def_8h.html#a358">index</a>,o); +00318 } +00319 } +00320 +<a name="l00321"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#p3">00321</a> <a class="code" href="structNLAIAGENT_1_1CAgentScript_1_1CMethodCall.html">NLAIAGENT::CAgentScript::CMethodCall</a> **CAgentOperation::StaticMethod = NULL; +00322 +<a name="l00323"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#d0">00323</a> <font class="keywordtype">void</font> CAgentOperation::initClass() +00324 { +00325 <a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#a0">CAgentOperation</a> a; +00326 CAgentOperation::IdAgentOperation = <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<font class="stringliteral">"AgentOperation"</font>, <a class="code" href="classNLAIC_1_1CSelfClassFactory.html">NLAIC::CSelfClassFactory</a>( (<font class="keyword">const</font> <a class="code" href="classNLAIC_1_1IBasicInterface.html">NLAIC::IBasicInterface</a> &)((<font class="keyword">const</font> <a class="code" href="classNLAIAGENT_1_1CAgentScript.html#a1">CAgentScript</a> &)a) ), +00327 <a class="code" href="classNLAIC_1_1CTypeOfObject.html#s12s4">NLAIC::CTypeOfObject::tAgent</a> | <a class="code" href="classNLAIC_1_1CTypeOfObject.html#s12s5">NLAIC::CTypeOfObject::tInterpret</a>, <a class="code" href="classNLAIC_1_1CTypeOfOperator.html#s15s5">NLAIC::CTypeOfOperator::opEq</a> ); +00328 +00329 CAgentOperation::idMsgOnChangeMsg = <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<font class="stringliteral">"OnChangeMsg"</font>); +00330 CAgentOperation::MsgOnChangeMsg = (<a class="code" href="classNLAIAGENT_1_1IMessageBase.html">NLAIAGENT::IMessageBase</a> *)CAgentOperation::idMsgOnChangeMsg-><a class="code" href="classNLAIC_1_1CIdentType.html#a15">allocClass</a>(); +00331 +00332 +00333 CAgentOperation::StaticMethod = <font class="keyword">new</font> <a class="code" href="structNLAIAGENT_1_1CAgentScript_1_1CMethodCall.html">NLAIAGENT::CAgentScript::CMethodCall</a> *[CAgentOperation::TLastM]; +00334 +00335 CAgentOperation::StaticMethod[CAgentOperation::TSetValue] = +00336 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"SetValue"</font>, +00337 CAgentOperation::TSetValue, +00338 NULL,CAgentScript::CheckCount, 1, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandVoid.html">NLAISCRIPT::COperandVoid</a>)); +00339 +00340 CAgentOperation::StaticMethod[CAgentOperation::TGetValue] = +00341 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"GetValue"</font>, +00342 CAgentOperation::TGetValue, +00343 NULL,CAgentScript::CheckCount, 0, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandAnyObject.html">NLAISCRIPT::COperandAnyObject</a>)); +00344 +00345 CAgentOperation::StaticMethod[CAgentOperation::TSetName] = +00346 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"SetName"</font>, +00347 CAgentOperation::TSetName, +00348 NULL,CAgentScript::CheckCount, 1, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandVoid.html">NLAISCRIPT::COperandVoid</a>)); +00349 +00350 CAgentOperation::StaticMethod[CAgentOperation::TGetName] = +00351 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"GetName"</font>, +00352 CAgentOperation::TGetName, +00353 NULL,CAgentScript::CheckCount, 0, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandAnyObject.html">NLAISCRIPT::COperandAnyObject</a>)); +00354 +00355 +00356 CAgentOperation::StaticMethod[CAgentOperation::TUpdate] = +00357 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"Update"</font>, +00358 CAgentOperation::TUpdate, +00359 NULL,CAgentScript::CheckCount, 0, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandVoid.html">NLAISCRIPT::COperandVoid</a>)); +00360 +00361 CAgentOperation::StaticMethod[CAgentOperation::TIsChange] = +00362 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"IsChange"</font>, +00363 CAgentOperation::TIsChange, +00364 NULL,CAgentScript::CheckCount, 0, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>( +00365 <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandSimple.html">NLAISCRIPT::COperandSimple</a>( +00366 <font class="keyword">new</font> <a class="code" href="classNLAIC_1_1CIdentType.html">NLAIC::CIdentType</a>(<a class="code" href="classNLAIAGENT_1_1DDigitalType.html#p0">NLAIAGENT::DDigitalType::IdDDigitalType</a>)))); +00367 CAgentOperation::StaticMethod[CAgentOperation::TConnect] = +00368 <font class="keyword">new</font> CAgentScript::CMethodCall( <font class="stringliteral">"Connect"</font>, +00369 CAgentOperation::TConnect, +00370 NULL,CAgentScript::CheckCount, 1, <font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1CObjectUnknown.html">NLAISCRIPT::CObjectUnknown</a>(<font class="keyword">new</font> <a class="code" href="classNLAISCRIPT_1_1COperandVoid.html">NLAISCRIPT::COperandVoid</a>)); +00371 +00372 } +<a name="l00373"></a><a class="code" href="classNLAIAGENT_1_1CAgentOperation.html#d1">00373</a> <font class="keywordtype">void</font> CAgentOperation::releaseClass() +00374 { +00375 <font class="comment">//delete CAgentOperation::IdAgentOperation;</font> +00376 <font class="keyword">delete</font> CAgentOperation::idMsgOnChangeMsg; +00377 <font class="keyword">delete</font> CAgentOperation::MsgOnChangeMsg; +00378 +00379 sint i; +00380 <font class="keywordflow">for</font>(i = 0; i < CAgentOperation::TLastM; i++ ) +00381 { +00382 <font class="keyword">delete</font> CAgentOperation::StaticMethod[i]; +00383 } +00384 <font class="keyword">delete</font> CAgentOperation::StaticMethod; +00385 } +00386 } +</pre></div> + +<!-- footer --> +<BR><FONT Size=+5> </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> |