interpret_message_action.cpp

Go to the documentation of this file.
00001 
00006 /* Copyright, 2000 Nevrax Ltd.
00007  *
00008  * This file is part of NEVRAX NEL.
00009  * NEVRAX NEL is free software; you can redistribute it and/or modify
00010  * it under the terms of the GNU General Public License as published by
00011  * the Free Software Foundation; either version 2, or (at your option)
00012  * any later version.
00013 
00014  * NEVRAX NEL is distributed in the hope that it will be useful, but
00015  * WITHOUT ANY WARRANTY; without even the implied warranty of
00016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
00017  * General Public License for more details.
00018 
00019  * You should have received a copy of the GNU General Public License
00020  * along with NEVRAX NEL; see the file COPYING. If not, write to the
00021  * Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
00022  * MA 02111-1307, USA.
00023  */
00024 #include "nel/ai/c/registry_class.h"
00025 #include "nel/ai/agent/message_script.h"
00026 #include "nel/ai/script/lexsupport.h"
00027 #include "nel/ai/script/interpret_message_action.h"
00028 #include "nel/ai/agent/msg_action.h"
00029 
00030 namespace NLAISCRIPT
00031 {
00032 
00033 //#########################################
00034 //              CSuccessMsgClass
00035 //#########################################
00036 
00037         CSuccessMsgClass::CSuccessMsgClass(const NLAIAGENT::IVarName &s):CMessageClass(s)
00038         {
00039                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CSuccessMsg::IdSuccessMsg.getFactory()->getClass());           
00040                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00041                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00042                 setClassName(NLAIAGENT::CStringVarName("CSuccessMsgClass"));
00043                 buildVTable();
00044         }
00045 
00046         CSuccessMsgClass::CSuccessMsgClass(const NLAIC::CIdentType &id):CMessageClass(id)
00047         {
00048                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CSuccessMsg::IdSuccessMsg.getFactory()->getClass());           
00049                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00050                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00051                 setClassName(NLAIAGENT::CStringVarName("CSuccessMsgClass"));
00052                 buildVTable();
00053         }
00054 
00055         CSuccessMsgClass::CSuccessMsgClass() : CMessageClass()
00056         {               
00057                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CSuccessMsg::IdSuccessMsg.getFactory()->getClass());           
00058                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00059                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00060                 setClassName(NLAIAGENT::CStringVarName("CSuccessMsgClass"));
00061                 buildVTable();
00062         }
00063         
00064         const NLAIC::IBasicType *CSuccessMsgClass::clone() const
00065         {
00066                 return new CSuccessMsgClass();
00067         }
00068 
00069         const NLAIC::IBasicType *CSuccessMsgClass::newInstance() const
00070         {
00071                 return new CSuccessMsgClass();
00072         }
00073 
00074         NLAIAGENT::IObjectIA *CSuccessMsgClass::buildNewInstance() const
00075         {
00076                 std::list<NLAIAGENT::IObjectIA *> components;
00077                 createBaseClassComponents( components );
00078 
00079                 NLAIAGENT::IObjectIA *x = new NLAIAGENT::CSuccessMsg( components,  (CMessageClass *) this );            
00080                 return x;
00081         }       
00082 
00083 //#########################################
00084 //              CFailureMsgClass
00085 //#########################################
00086 
00087         CFailureMsgClass::CFailureMsgClass(const NLAIAGENT::IVarName &s):CMessageClass(s)
00088         {
00089                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CFailureMsg::IdFailureMsg.getFactory()->getClass());           
00090                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00091                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00092                 setClassName(NLAIAGENT::CStringVarName("CFailureMsgClass"));
00093                 buildVTable();
00094         }
00095 
00096         CFailureMsgClass::CFailureMsgClass(const NLAIC::CIdentType &id):CMessageClass(id)
00097         {
00098                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CFailureMsg::IdFailureMsg.getFactory()->getClass());           
00099                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00100                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00101                 setClassName(NLAIAGENT::CStringVarName("CFailureMsgClass"));
00102                 buildVTable();
00103         }
00104 
00105         CFailureMsgClass::CFailureMsgClass() : CMessageClass()
00106         {               
00107                 setBaseObjectInstance((NLAIAGENT::IObjectIA *)NLAIAGENT::CFailureMsg::IdFailureMsg.getFactory()->getClass());           
00108                 registerComponent(NLAIAGENT::CStringVarName("Float"),NLAIAGENT::CStringVarName("Param"));
00109                 setInheritanceName(NLAIAGENT::CStringVarName("Message"));
00110                 setClassName(NLAIAGENT::CStringVarName("CFailureMsgClass"));
00111                 buildVTable();
00112         }
00113         
00114         const NLAIC::IBasicType *CFailureMsgClass::clone() const
00115         {
00116                 return new CFailureMsgClass();
00117         }
00118 
00119         const NLAIC::IBasicType *CFailureMsgClass::newInstance() const
00120         {
00121                 return new CFailureMsgClass();
00122         }
00123 
00124         NLAIAGENT::IObjectIA *CFailureMsgClass::buildNewInstance() const
00125         {
00126                 std::list<NLAIAGENT::IObjectIA *> components;
00127                 createBaseClassComponents( components );
00128 
00129                 NLAIAGENT::IObjectIA *x = new NLAIAGENT::CFailureMsg( components,  (CMessageClass *) this );            
00130                 return x;
00131         }       
00132 }

Generated on Tue Mar 16 06:26:52 2004 for NeL by doxygen 1.3.6