BlitzMax Extended  0.8.18
Pushing Blitz to the Max.
blitz_object.h
Go to the documentation of this file.
1 
14 #ifndef BLITZ_OBJECT_H
15 #define BLITZ_OBJECT_H
16 
17 #include "_common.h"
18 
19 #include "blitz_class.h"
20 #include "blitz_gc.h"
21 
22 BB_BEGIN_DECLS
23 
31 struct BBObject
32 {
39 
47  int refs;
48 };
49 
55 extern BBClass bbObjectClass;
56 
67 extern BBObject bbNullObject;
68 
76 #define BBNULL (&bbNullObject)
77 
78 // Alias for bbNullObject that fits to the naming scheme
79 // of BBNULLSTRING and BBNULLARRAY.
80 #define BBNULLOBJECT (&bbNullObject)
81 
94 BBObject* bbObjectNew(const BBClass *clas);
95 
105 void bbObjectFree(BBObject *obj);
106 
113 void bbObjectCtor(BBObject *obj);
114 
121 void bbObjectDtor(BBObject *obj);
122 
128 BBString* bbObjectToString(const BBObject *obj);
129 
137 BBInt bbObjectCompare(const BBObject *obj, const BBObject *rhs);
138 
147 BBObject* bbObjectSendMessage(const BBObject *obj, const BBObject *src);
148 
170 BBObject* bbObjectClone(BBObject *obj);
171 
177 void bbObjectReserved();
178 
179 BBObject* bbObjectDowncast(const BBObject *obj, const BBClass *clas);
180 
181 BB_END_DECLS
182 
183 #endif // BLITZ_OBJECT_H