forked from blurstudio/Py3dsMax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
protector.h
41 lines (29 loc) · 938 Bytes
/
protector.h
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
/*
\file protector.h
\remarks The Protector class is a Value* class that contains
a list of ValueWrapper*'s that have been created to protect
them during MAXScript garbage collection
\author Blur Studio (c) 2010
\email [email protected]
\license This software is released under the GNU General Public License. For more info, visit: http://www.gnu.org/
*/
#ifndef __PROTECTOR_H__
#define __PROTECTOR_H__
applyable_class( Protector );
struct ValueWrapper;
class Protector : public Value {
public:
Protector();
~Protector();
static Protector * sInstance;
classof_methods( Protector, Value );
void collect() { delete this; }
void gc_trace();
Value* get_property( Value** arg_list, int count );
static void protect( ValueWrapper * );
static void unprotect( ValueWrapper * );
protected:
static int mCount;
static ValueWrapper * mFirst;
};
#endif __PROTECTOR_H__