1.1 --- a/sourcehook/sourcehook_impl.h Sat Oct 13 20:15:58 2007 +0000
1.2 +++ b/sourcehook/sourcehook_impl.h Sun Oct 14 11:59:13 2007 +0000
1.3 @@ -12,11 +12,11 @@
1.4 #define __SOURCEHOOK_IMPL_H__
1.5
1.6 #include "sourcehook.h"
1.7 +#include "sh_memory.h"
1.8 #include "sh_list.h"
1.9 #include "sh_vector.h"
1.10 #include "sh_tinyhash.h"
1.11 #include "sh_stack.h"
1.12 -#include "sh_listcat.h"
1.13
1.14 /*
1.15
1.16 @@ -173,11 +173,10 @@
1.17 */
1.18
1.19 #include "sourcehook_impl_cproto.h"
1.20 +#include "sourcehook_impl_chookmaninfo.h"
1.21 #include "sourcehook_impl_chook.h"
1.22 #include "sourcehook_impl_ciface.h"
1.23 #include "sourcehook_impl_cvfnptr.h"
1.24 -#include "sourcehook_impl_chookmaninfo.h"
1.25 -#include "sourcehook_impl_chookmancont.h"
1.26 #include "sourcehook_impl_chookidman.h"
1.27
1.28 namespace SourceHook
1.29 @@ -188,15 +187,6 @@
1.30
1.31 namespace Impl
1.32 {
1.33 -
1.34 - class CHookManContainerList : public List<CHookManagerContainer>
1.35 - {
1.36 - public:
1.37 - CHookManagerContainer &GetContainer(int vtbloffs, int vtblidx, const CProto &proto);
1.38 - void RemoveHookMans(Plugin plug);
1.39 - void RemoveHookMans(Plugin plug, HookManagerPubFunc pubFunc);
1.40 - };
1.41 -
1.42 struct CHookContext : IHookContext
1.43 {
1.44 enum State
1.45 @@ -250,16 +240,25 @@
1.46 bool ShouldCallOrig();
1.47 };
1.48
1.49 + class CVfnPtrList : public List<CVfnPtr>
1.50 + {
1.51 + public:
1.52 + CVfnPtr &GetVfnPtr(void *p);
1.53 + };
1.54 +
1.55 typedef CStack<CHookContext> HookContextStack;
1.56 +
1.57
1.58 class CSourceHookImpl : public ISourceHook
1.59 {
1.60 private:
1.61 - CHookManContainerList m_HookManContainers;
1.62 + CHookManList m_HookManList;
1.63 + CVfnPtrList m_VfnPtrs;
1.64 CHookIDManager m_HookIDMan;
1.65 HookContextStack m_ContextStack;
1.66
1.67 bool SetHookPaused(int hookid, bool paused);
1.68 + CHookManList::iterator RemoveHookManager(CHookManList::iterator iter);
1.69 public:
1.70 CSourceHookImpl();
1.71 virtual ~CSourceHookImpl();