BlitzMax Extended  0.8.11
Pushing Blitz to the Max.
blitz_object.h
Go to the documentation of this file.
00001 
00014 #ifndef BLITZ_OBJECT_H
00015 #define BLITZ_OBJECT_H
00016 
00017 #include "_common.h"
00018 
00019 #include "blitz_class.h"
00020 #include "blitz_gc.h"
00021 
00022 BB_BEGIN_DECLS
00023 
00031 struct BBObject
00032 {
00038     BBClass     *clas;
00039     
00047     int         refs;
00048 };
00049 
00055 extern  BBClass bbObjectClass;
00056 
00066 extern  BBObject bbNullObject;
00067 
00075 #define BBNULL                      (&bbNullObject)
00076 
00077 //  Alias for bbNullObject that fits to the naming scheme
00078 //  of BBNULLSTRING and BBNULLARRAY.
00079 #define BBNULLOBJECT                (&bbNullObject)
00080 
00093 BBObject* bbObjectNew(const BBClass *clas);
00094 
00104 void bbObjectFree(BBObject *obj);
00105 
00112 void bbObjectCtor(BBObject *obj);
00113 
00120 void bbObjectDtor(BBObject *obj);
00121 
00127 BBString* bbObjectToString(const BBObject *obj);
00128 
00136 BBInt bbObjectCompare(const BBObject *obj, const BBObject *rhs);
00137 
00146 BBObject* bbObjectSendMessage(const BBObject *obj, const BBObject *src);
00147 
00169 BBObject* bbObjectClone(const BBObject *obj);
00170 
00176 void bbObjectReserved();
00177 
00178 BBObject* bbObjectDowncast(const BBObject *obj, const BBClass *clas);
00179 
00180 BB_END_DECLS
00181 
00182 #endif  // BLITZ_OBJECT_H