blob: 96a41c9ec9c7a36ffdc9ed218e42334a43282907 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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_
|