# 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_init.cpp

Go to the documentation of this file.
00001 
00007 /* Copyright, 2001 Nevrax Ltd.
00008  *
00009  * This file is part of NEVRAX D.T.C. SYSTEM.
00010  * NEVRAX D.T.C. SYSTEM 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 D.T.C. SYSTEM 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 D.T.C. SYSTEM; 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 
00026 #include "nel/ai/script/compilateur.h"
00027 #include "nel/ai/agent/agent.h"
00028 #include "nel/ai/agent/agent_script.h"
00029 #include "nel/ai/agent/message_script.h"
00030 #include "nel/ai/logic/operator_script.h"
00031 #include "nel/ai/logic/interpret_object_operator.h"
00032 #include "nel/ai/script/interpret_object_manager.h"
00033 #include "nel/ai/script/interpret_object_message.h"
00034 #include "nel/ai/script/interpret_message_action.h"
00035 #include "nel/ai/agent/main_agent_script.h"
00036 #include "nel/ai/agent/agent_digital.h"
00037 #include "nel/ai/agent/msg_group.h"
00038 #include "nel/ai/agent/agent_local_mailer.h"
00039 #include "nel/ai/agent/agent_proxy_mailer.h"
00040 #include "nel/ai/logic/logic.h"
00041 #include "nel/ai/fuzzy/fuzzy.h"
00042 #include "nel/ai/fuzzy/fuzzy_script.h"
00043 #include "nel/ai/agent/actor.h"
00044 #include "nel/ai/agent/actor_script.h"
00045 #include "nel/ai/script/interpret_actor.h"
00046 #include "nel/ai/agent/performative.h"
00047 #include "nel/ai/agent/object_ident.h"
00048 
00049 
00050 #include "nel/ai/c/registry_class.h"
00051 #include "nel/ai/agent/msg_notify.h"
00052 #include "nel/ai/agent/msg_goal.h"
00053 #include "nel/ai/agent/msg_fact.h"
00054 #include "nel/ai/agent/msg_debug.h"
00055 #include "nel/ai/agent/msg_action.h"
00056 #include "nel/ai/agent/msg_on_change.h"
00057 #include "nel/ai/character/character.h"
00058 
00059 using namespace NLAIAGENT;
00060 using namespace NLAICHARACTER;
00061 
00062 void staticInitAgent()
00063 {
00064         CObjectIdent::IdObjectIdent = new NLAIC::CIdentType("ObjectIdent",NLAIC::CSelfClassFactory(CObjectIdent("0:0:0")),
00065                                                                                                                 NLAIC::CTypeOfObject(NLAIC::CTypeOfObject::tObject),
00066                                                                                                                 NLAIC::CTypeOfOperator(NLAIC::CTypeOfOperator::opNone));
00067 
00068         const IAgent staticAgent(NULL);
00069         CLocWordNumRef::IdLocWordNumRef = new NLAIC::CIdentType("LocWordNumRef",NLAIC::CSelfClassFactory((const NLAIC::IBasicInterface &)staticAgent),
00070                                                                                                                                                         NLAIC::CTypeOfObject(NLAIC::CTypeOfObject::tObject),
00071                                                                                                                                                         NLAIC::CTypeOfOperator(NLAIC::CTypeOfOperator::opNone));
00072 
00073         IAgent::IdAgent = new NLAIC::CIdentType("GenericAgent", NLAIC::CSelfClassFactory((const NLAIC::IBasicInterface &)staticAgent), 
00074                                                                                                                         NLAIC::CTypeOfObject(NLAIC::CTypeOfObject::tAgent),
00075                                                                                                                         NLAIC::CTypeOfOperator(NLAIC::CTypeOfOperator::opNone));
00076         
00077         
00078 }
00079 
00080 void registerLibClass()
00081 {       
00082 }
00083 
00084 void staticReleaseLibClass()
00085 {       
00086         delete IAgent::IdAgent;
00087         delete CObjectIdent::IdObjectIdent;
00088         delete CLocWordNumRef::IdLocWordNumRef; 
00089 }
00090 
00091 namespace NLAIE
00092 {               
00093         
00094         CExceptionContainer::CExceptionContainer(const CExceptionContainer &e):IException(e)
00095         {               
00096         }
00097         
00098         CExceptionContainer::CExceptionContainer(const std::string &name):IException(name)
00099         {
00100         }
00101         const IException *CExceptionContainer::clone() const
00102         {
00103                 return new CExceptionContainer(*this);
00104         }
00105 
00106         const IException *CExceptionIndexError::clone() const
00107         {
00108                 return new CExceptionIndexError();
00109         }
00110         const IException *CExceptionIndexHandeledError::clone() const
00111         {
00112                 return new CExceptionIndexHandeledError();
00113         }
00114 
00115 
00116         CExceptionUnRegisterClassError::CExceptionUnRegisterClassError(const CExceptionUnRegisterClassError &e):IException(e)
00117         {               
00118         }
00119 
00120         CExceptionUnRegisterClassError::CExceptionUnRegisterClassError(const std::string &name):IException(name)
00121         {               
00122         }
00123         const IException *CExceptionUnRegisterClassError::clone() const
00124         {
00125                 return new CExceptionUnRegisterClassError(*this);
00126         }
00127 
00128         const IException *CExceptionObjectNotFoundError::clone() const
00129         {
00130                 return new CExceptionObjectNotFoundError(*this);
00131         }
00132 
00133         CExceptionNotImplemented::CExceptionNotImplemented(const CExceptionNotImplemented &e):IException(e)
00134         {       
00135         }
00136                 
00137         CExceptionNotImplemented::CExceptionNotImplemented(const std::string &name):IException(name)
00138         {               
00139         }
00140 
00141         const IException *CExceptionNotImplemented::clone() const
00142         {
00143                 return new CExceptionNotImplemented(*this);
00144         }
00145 
00146 
00147         CExceptionUnReference::CExceptionUnReference(const CExceptionUnReference &e):IException(e)
00148         {               
00149         }
00150 
00151         CExceptionUnReference::CExceptionUnReference(const std::string &text):IException(text)
00152         {               
00153         }
00154 
00155         CExceptionUnReference::CExceptionUnReference(char *text):IException((const char *)text)
00156         {       
00157         }
00158 
00159         const IException *CExceptionUnReference::clone() const
00160         {
00161                 return new CExceptionUnReference(*this);
00162         }
00163 
00164         const IException *CExceptionAllReadyExist::clone() const
00165         {
00166                 return new CExceptionAllReadyExist(*this);
00167         }
00168 }