From a4c804b49ec872b71bd5a0167c3ad45704a3cc30 Mon Sep 17 00:00:00 2001 From: adiblol Date: Thu, 8 Mar 2012 19:32:05 +0100 Subject: Initial commit, Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch --- src/iman.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/iman.h (limited to 'src/iman.h') diff --git a/src/iman.h b/src/iman.h new file mode 100644 index 0000000..96a41c9 --- /dev/null +++ b/src/iman.h @@ -0,0 +1,42 @@ +// iman.h + +#ifndef _IMAN_H_ +#define _IMAN_H_ + + +#include "misc.h" + + + +typedef struct +{ + int totalPossible; + int totalUsed; + void** classPointer; +} +BaseClass; + + + +class CInstanceManager +{ +public: + CInstanceManager(); + ~CInstanceManager(); + + void Flush(); + void Flush(ClassType classType); + BOOL AddInstance(ClassType classType, void* pointer, int max=1); + BOOL DeleteInstance(ClassType classType, void* pointer); + void* SearchInstance(ClassType classType, int rank=0); + + +protected: + void Compress(ClassType classType); + +protected: + BaseClass m_table[CLASS_MAX]; +}; + + +#endif //_IMAN_H_ -- cgit v1.2.3-1-g7c22