Initial Import of beta structs extension.
1 #ifndef _INCLUDE_SOURCEMOD_NATIVE_OWNER_H_
2 #define _INCLUDE_SOURCEMOD_NATIVE_OWNER_H_
4 #include <sp_vm_types.h>
12 WeakNative(CPlugin *plugin, uint32_t index) :
13 pl(plugin), idx(index), entry(NULL)
18 WeakNative(CPlugin *plugin, uint32_t index, NativeEntry *pEntry) :
19 pl(plugin), idx(index), entry(pEntry)
29 using namespace SourceHook;
34 virtual void DropEverything();
36 void AddNatives(const sp_nativeinfo_t *info);
38 void SetMarkSerial(unsigned int serial);
39 unsigned int GetMarkSerial();
40 void PropogateMarkSerial(unsigned int serial);
42 void AddDependent(CPlugin *pPlugin);
43 void AddWeakRef(const WeakNative & ref);
44 void DropRefsTo(CPlugin *pPlugin);
45 void AddReplacedNative(NativeEntry *pEntry);
47 void DropWeakRefsTo(CPlugin *pPlugin);
48 void UnbindWeakRef(const WeakNative & ref);
50 List<CPlugin *> m_Dependents;
51 unsigned int m_nMarkSerial;
52 List<WeakNative> m_WeakRefs;
53 List<NativeEntry *> m_Natives;
54 List<NativeEntry *> m_ReplacedNatives;
57 #endif //_INCLUDE_SOURCEMOD_NATIVE_OWNER_H_