1
0

gccb.h 651 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef _GCCB_H
  2. #define _GCCB_H
  3. #include "syscbi.h"
  4. namespace GarbageCollectCallback {
  5. enum {
  6. GARBAGECOLLECT=1,
  7. };
  8. };
  9. #define GARBAGECOLLECTCALLBACK_PARENT SysCallbackI
  10. class GarbageCollectCallbackI : public GARBAGECOLLECTCALLBACK_PARENT {
  11. protected:
  12. GarbageCollectCallbackI() {}
  13. public:
  14. virtual int gccb_onGarbageCollect() { return 0; }
  15. private:
  16. virtual FOURCC syscb_getEventType() { return SysCallback::GC; }
  17. virtual int syscb_notify(int msg, intptr_t param1=0, intptr_t param2=0) {
  18. switch (msg) {
  19. case GarbageCollectCallback::GARBAGECOLLECT:
  20. return gccb_onGarbageCollect();
  21. }
  22. return 0;
  23. }
  24. };
  25. #endif