00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #include "nel/ai/script/compilateur.h"
00025 #include "nel/ai/script/interpret_object_message.h"
00026 #include "nel/ai/script/interpret_message_action.h"
00027 #include "nel/ai/script/interpret_message_getvalue.h"
00028 #include "nel/ai/script/interpret_message_setvalue.h"
00029 #include "nel/ai/script/interpret_message_connect.h"
00030 #include "nel/ai/script/interpret_object_manager.h"
00031 #include "nel/ai/script/interpret_actor.h"
00032 #include "nel/ai/script/goal_path_class.h"
00033 #include "nel/ai/logic/interpret_object_operator.h"
00034 #include "nel/ai/script/libcode.h"
00035 #include "nel/ai/script/test_method.h"
00036 #include "nel/ai/script/type_def.h"
00037 #include "nel/ai/script/object_unknown.h"
00038 #include "nel/ai/script/interpret_fsm.h"
00039
00040
00041
00042 namespace NLAISCRIPT
00043 {
00044 void reinitClass(const IClassInterpret &c,const NLAIC::CIdentType &type)
00045 {
00046 NLAIC::IClassFactory &f = (NLAIC::IClassFactory&)*(type.getFactory());
00047 f.setClass(c);
00048 ((IClassInterpret *)f.getClass())->setClassName(NLAIAGENT::CStringVarName((const char *)type));
00049 }
00050
00051
00052 void initExternalLib()
00053 {
00054 CCallPrint p;
00055 CLibTest c;
00056
00057 reinitClass(CAgentClass(CAgentClass::IdAgentClass), CAgentClass::IdAgentClass);
00058
00059 reinitClass(COperatorClass(COperatorClass::IdOperatorClass),COperatorClass::IdOperatorClass);
00060 reinitClass(CFsmClass(CFsmClass::IdFsmClass),CFsmClass::IdFsmClass);
00061 reinitClass(CSeqFsmClass(CSeqFsmClass::IdSeqFsmClass),CSeqFsmClass::IdSeqFsmClass);
00062 reinitClass(COperatorClass(COperatorClass::IdOperatorClass),COperatorClass::IdOperatorClass);
00063 reinitClass(CActorClass(CActorClass::IdActorClass),CActorClass::IdActorClass);
00064 reinitClass(CGoalPathClass(CGoalPathClass::IdGoalPathClass),CGoalPathClass::IdGoalPathClass);
00065 reinitClass(CMessageClass(CMessageClass::IdMessageClass),CMessageClass::IdMessageClass);
00066 reinitClass(CMsgNotifyParentClass(CMsgNotifyParentClass::IdMsgNotifyParentClass),CMsgNotifyParentClass::IdMsgNotifyParentClass);
00067 reinitClass(CGoalMsgClass(CGoalMsgClass::IdGoalMsgClass),CGoalMsgClass::IdGoalMsgClass);
00068 reinitClass(CFactMsgClass(CFactMsgClass::IdFactMsgClass),CFactMsgClass::IdFactMsgClass);
00069 reinitClass(CCancelGoalMsgClass(CCancelGoalMsgClass::IdCancelGoalMsgClass),CCancelGoalMsgClass::IdCancelGoalMsgClass);
00070 reinitClass(CSuccessMsgClass(CSuccessMsgClass::IdSuccessMsgClass),CSuccessMsgClass::IdSuccessMsgClass);
00071 reinitClass(CFailureMsgClass(CFailureMsgClass::IdFailureMsgClass),CFailureMsgClass::IdFailureMsgClass);
00072 reinitClass(CGetValueMsgClass(CGetValueMsgClass::IdGetValueMsgClass),CGetValueMsgClass::IdGetValueMsgClass);
00073 reinitClass(CSetValueMsgClass(CSetValueMsgClass::IdSetValueMsgClass),CSetValueMsgClass::IdSetValueMsgClass);
00074 reinitClass(CConnectObjectValueMsgClass(CConnectObjectValueMsgClass::IdConnectObjectValueMsgClass),CConnectObjectValueMsgClass::IdConnectObjectValueMsgClass);
00075 reinitClass(CDebugMsgClass(CDebugMsgClass::IdDebugMsgClass),CDebugMsgClass::IdDebugMsgClass);
00076 reinitClass(CManagerClass(CManagerClass::IdManagerClass),CManagerClass::IdManagerClass);
00077 reinitClass(COnChangeMsgClass(COnChangeMsgClass::IdOnChangeMsgClass),COnChangeMsgClass::IdOnChangeMsgClass);
00078
00079 NLAIAGENT::DigitalType::NullOperator.incRef();
00080 }
00081 }