# Home    # nevrax.com   
Nevrax
Nevrax.org
#News
#Mailing-list
#Documentation
#CVS
#Bugs
#License
Docs
 
Documentation  
Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages   Search  

agent_operator.h

Go to the documentation of this file.
00001 
00007 /* Copyright, 2000 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX NEL.
00010  * NEVRAX NEL is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2, or (at your option)
00013  * any later version.
00014 
00015  * NEVRAX NEL is distributed in the hope that it will be useful, but
00016  * WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00018  * General Public License for more details.
00019 
00020  * You should have received a copy of the GNU General Public License
00021  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00022  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00023  * MA 02111-1307, USA.
00024  */
00025 #ifndef NL_AGENT_OPERATOR_H
00026 #define NL_AGENT_OPERATOR_H
00027 
00028 //#include "nel/ai/c/abstract_interface.h"
00029 #include "nel/ai/agent/baseai.h"
00030 
00031 
00032 namespace NLAIAGENT
00033 {       
00043         class IObjetOp: public IObjectIA
00044         {
00045         public:         
00046                 enum TOpId 
00047                 {
00048                         op_add ,
00049                         op_sub ,
00050                         op_mul ,
00051                         op_div ,
00052                         op_eq ,
00053                         op_inf ,
00054                         op_sup ,
00055                         op_inf_eq ,
00056                         op_sup_eq ,
00057                         op_not ,
00058                         op_diff ,                       
00059                         op_neg,
00060                         op_last
00061                 };      
00062         public:         
00063 
00065 
00066                 tQueue IObjetOp::isMember(const IVarName *,const IVarName *,const IObjectIA &) const;
00067                 CProcessResult IObjetOp::runMethodeMember(sint32 index, IObjectIA *);
00068                 virtual sint32 getMethodIndexSize() const;
00070 
00071                 IObjetOp()
00072                 {                       
00073                 }               
00074 
00075                 IObjetOp(const IObjetOp &a):IObjectIA(a)
00076                 {                       
00077                 }               
00078 
00080                 virtual IObjetOp &operator += (const IObjetOp &)
00081                 {                       
00082                         char text[2048*8];
00083                         sprintf(text,"opertor <IObjectIA &operator += (const IObjectIA &a)> note implemented for the '%s' interface",(const char *)getType());
00084                         throw NLAIE::CExceptionNotImplemented(text);
00085                         return *this;
00086                 }
00087 
00088                 virtual IObjetOp &operator -= (const IObjetOp &)
00089                 {
00090                         char text[2048*8];
00091                         sprintf(text,"opertor <IObjectIA &operator -= (const IObjectIA &a)> note implemented for the '%s' interface",(const char *)getType());
00092                         throw NLAIE::CExceptionNotImplemented(text);
00093                         return *this;
00094                 }
00095 
00096                 virtual IObjetOp &neg()
00097                 {
00098                         char text[2048*8];
00099                         sprintf(text,"opertor <IObjectIA &neg()> note implemented for the '%s' interface",(const char *)getType());
00100                         throw NLAIE::CExceptionNotImplemented(text);
00101                         return *this;
00102                 }
00103 
00104                 virtual IObjetOp &operator *= (const IObjetOp &)
00105                 {
00106                         char text[2048*8];
00107                         sprintf(text,"opertor <IObjectIA &operator *= (const IObjectIA &a)> note implemented for the '%s' interface",(const char *)getType());
00108                         throw NLAIE::CExceptionNotImplemented(text);
00109                         return *this;
00110                 }
00111                 virtual IObjetOp &operator /= (const IObjetOp &)
00112                 {
00113                         char text[2048*8];
00114                         sprintf(text,"opertor <IObjectIA &operator /= (const IObjectIA &a)> note implemented for the '%s' interface",(const char *)getType());
00115                         throw NLAIE::CExceptionNotImplemented(text);
00116                         return *this;
00117                 }       
00118 
00119                 virtual IObjetOp *operator + (const IObjetOp &) const
00120                 {
00121                         char text[2048*8];
00122                         sprintf(text,"opertor <virtual IObjetOp *operator + (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00123                         throw NLAIE::CExceptionNotImplemented(text);
00124                         return (IObjetOp *)this;
00125                 }
00126 
00127                 virtual IObjetOp *operator - (const IObjetOp &)  const
00128                 {
00129                         char text[2048*8];
00130                         sprintf(text,"opertor <virtual IObjetOp *operator - (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00131                         throw NLAIE::CExceptionNotImplemented(text);
00132                         return (IObjetOp *)this;
00133                 }
00134 
00135                 virtual const IObjetOp *operator * (const IObjetOp &)  const 
00136                 {
00137                         char text[2048*8];
00138                         sprintf(text,"opertor <virtual IObjetOp *operator * (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00139                         throw NLAIE::CExceptionNotImplemented(text);
00140                         return (IObjetOp *)this;
00141                 }
00142 
00143                 virtual const IObjetOp *operator / (const IObjetOp &)  const 
00144                 {
00145                         char text[2048*8];
00146                         sprintf(text,"opertor <virtual IObjetOp *operator / (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00147                         throw NLAIE::CExceptionNotImplemented(text);
00148                         return (IObjetOp *)this;
00149                 }
00150                 
00151 
00152                 virtual IObjetOp *operator < (IObjetOp &)  const 
00153                 {
00154                         char text[2048*8];
00155                         sprintf(text,"opertor <virtual IObjetOp *operator < (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00156                         throw NLAIE::CExceptionNotImplemented(text);
00157                         return (IObjetOp *)this;
00158                 }
00159                 virtual IObjetOp *operator > (IObjetOp &)  const 
00160                 {
00161                         char text[2048*8];
00162                         sprintf(text,"opertor <virtual IObjetOp *operator > (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00163                         throw NLAIE::CExceptionNotImplemented(text);
00164                         return (IObjetOp *)this;
00165                 }
00166 
00167                 virtual IObjetOp *operator <= (IObjetOp &)  const 
00168                 {
00169                         char text[2048*8];
00170                         sprintf(text,"opertor <virtual IObjetOp *operator <= (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00171                         throw NLAIE::CExceptionNotImplemented(text);
00172                         return (IObjetOp *)this;
00173                 }
00174 
00175                 virtual IObjetOp *operator >= (IObjetOp &)  const 
00176                 {
00177                         char text[2048*8];
00178                         sprintf(text,"opertor <virtual IObjetOp *operator >= (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00179                         throw NLAIE::CExceptionNotImplemented(text);
00180                         return (IObjetOp *)this;
00181                 }
00182                 
00183                 virtual IObjetOp *operator ! ()  const 
00184                 {
00185                         char text[2048*8];
00186                         sprintf(text,"opertor <virtual IObjetOp *operator ! ()  const> note implemented for the '%s' interface",(const char *)getType());
00187                         throw NLAIE::CExceptionNotImplemented(text);
00188                         return (IObjetOp *)this;
00189                 }
00190                 virtual IObjetOp *operator != (IObjetOp &) const 
00191                 {
00192                         char text[2048*8];
00193                         sprintf(text,"opertor <virtual IObjetOp *operator != (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00194                         throw NLAIE::CExceptionNotImplemented(text);
00195                         return (IObjetOp *)this;
00196                 }               
00197 
00198                 virtual IObjetOp *operator == (IObjetOp &) const 
00199                 {
00200                         char text[2048*8];
00201                         sprintf(text,"opertor <virtual IObjetOp *operator == (const IObjetOp &a)  const> note implemented for the '%s' interface",(const char *)getType());
00202                         throw NLAIE::CExceptionNotImplemented(text);
00203                         return (IObjetOp *)this;
00204                 }
00205 
00206                 virtual bool isTrue() const = 0;
00207 
00208                 virtual ~IObjetOp()
00209                 {                       
00210                 }
00211         };
00212 
00213         inline bool IObjetOp::isTrue() const 
00214         {                       
00215                 char text[2048*8];
00216                 sprintf(text,"'bool isTrue() const' note implemented for the '%s' interface",(const char *)getType());
00217                 throw NLAIE::CExceptionNotImplemented(text);
00218                 return false;           
00219         }
00220 }
00221 
00222 #endif