Home | nevrax.com |
|
message_script.hGo 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_MESSAGE_SCRIPT_H 00026 #define NL_MESSAGE_SCRIPT_H 00027 00028 #include "nel/ai/agent/agent.h" 00029 #include "nel/ai/script/virtual_op_code.h" 00030 #include "nel/ai/agent/agent_manager.h" 00031 00032 namespace NLAISCRIPT 00033 { 00034 class CMessageClass; 00035 } 00036 00037 namespace NLAIAGENT 00038 { 00048 class CMessageScript : public IMessageBase 00049 { 00050 public: 00051 static const NLAIC::CIdentType IdMessageScript; 00052 protected: 00053 NLAISCRIPT::CMessageClass *_MessageClass; 00054 00055 public: 00057 00058 virtual sint32 getMethodIndexSize() const; 00059 virtual tQueue isMember(const IVarName *,const IVarName *,const IObjectIA &) const; 00060 virtual sint32 isClassInheritedFrom(const IVarName &) const; 00061 virtual IObjectIA::CProcessResult runMethodeMember(sint32, sint32, IObjectIA *); 00062 virtual IObjectIA::CProcessResult runMethodeMember(sint32 index,IObjectIA *); 00063 00064 virtual bool setStaticMember(sint32,IObjectIA *); 00065 virtual const IObjectIA *getStaticMember(sint32) const; 00066 virtual sint32 getStaticMemberSize() const; 00067 virtual sint32 getStaticMemberIndex(const IVarName &) const; 00068 virtual const CProcessResult &run(); 00070 00072 00073 virtual bool isEqual(const IBasicObjectIA &a) const; 00075 00077 00078 virtual void load(NLMISC::IStream &is); 00079 virtual void save(NLMISC::IStream &os); 00080 virtual const NLAIC::IBasicType *clone() const; 00081 virtual const NLAIC::IBasicType *newInstance() const; 00082 virtual void getDebugString(std::string &t) const; 00083 virtual const NLAIC::CIdentType &getType() const; 00085 00086 public: 00087 CMessageScript(const CMessageScript &); 00088 CMessageScript(NLAISCRIPT::CMessageClass *b = NULL); 00089 CMessageScript( std::list<IObjectIA *> &, NLAISCRIPT::CMessageClass *); 00090 00091 virtual ~CMessageScript(); 00092 00093 00095 NLAISCRIPT::IOpCode *getMethode(sint32 inheritance,sint32 index); 00097 NLAISCRIPT::IOpCode *getMethode(sint32 index); 00098 00100 virtual sint32 getBaseMethodCount() const; 00101 00102 const NLAISCRIPT::CMessageClass *getCreatorClass() const 00103 { 00104 return _MessageClass; 00105 } 00106 00107 virtual void setAgentManager(IAgentManager *) 00108 { 00109 } 00110 }; 00111 } 00112 #endif |