00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef __NEOWTKMSGHOOK_H
00028 #define __NEOWTKMSGHOOK_H
00029
00030
00031 #include "base.h"
00032 #include "msg.h"
00033
00034 #ifdef HAVE_NEOCHUNKIO
00035 # include <neochunkio/complex.h>
00036 # include "chunktype.h"
00037 #endif
00038
00039
00046 namespace NeoWTK
00047 {
00048
00049
00050
00051 class MsgHook;
00052
00053
00058 class NEOWTK_API MsgHookMethod
00059 {
00060 public:
00061
00067 virtual void ProcessHook( MsgHook *pkHook, Msg *pkMsg ) = 0;
00068 };
00069
00070
00075 class NEOWTK_API MsgHook
00076 {
00077 public:
00078
00080 Msg::MSGID m_eID;
00081
00083 Object *m_pkSender;
00084
00086 Object *m_pkReceiver;
00087
00089 MsgHookMethod *m_pkProcessor;
00090
00092 bool m_bDeleteProcessor;
00093
00094
00097 MsgHook();
00098
00106 MsgHook( Msg::MSGID eID, Object *pkSender, Object *pkReceiver, MsgHookMethod *pkProcessor, bool bDeleteProcessor = false );
00107
00110 virtual ~MsgHook();
00111
00116 virtual bool IsHook( Msg *pkMsg );
00117 };
00118
00119
00120 #ifdef HAVE_NEOCHUNKIO
00121
00122
00127 class NEOWTK_API MsgHookChunk : public NeoChunkIO::ComplexChunk
00128 {
00129 public:
00130
00131
00133 MsgHook *m_pkHook;
00134
00135
00142 MsgHookChunk( unsigned short usType, const NeoEngine::HashString &rstrType, const NeoEngine::HashString &rstrID = "" ) : NeoChunkIO::ComplexChunk( usType, rstrType, rstrID ), m_pkHook( 0 ) { m_usFindType = NeoWTK::ChunkType::MSGHOOK; }
00143
00147 virtual ~MsgHookChunk();
00148
00155 virtual int ParseData( unsigned int uiFlags, NeoEngine::FileManager *pkFileManager );
00156 };
00157
00158
00159 #endif
00160
00161
00162 };
00163
00164
00165 #endif