ScriptObjectService.cpp 595 B

1234567891011121314151617181920212223242526272829
  1. #include "ScriptObjectService.h"
  2. #include <api/script/objects/rootobjcontroller.h>
  3. #include "STimer.h"
  4. ScriptObjectController *script_root=0;
  5. extern TimerScriptController _timerController;
  6. ScriptObjectController *ScriptObjectService::getController(int n)
  7. {
  8. if (n == 0)
  9. return &_timerController;
  10. return 0;
  11. }
  12. void ScriptObjectService::onRegisterClasses(ScriptObjectController *rootController)
  13. {
  14. script_root = rootController;
  15. }
  16. #define CBCLASS ScriptObjectService
  17. START_DISPATCH;
  18. CB(GETCONTROLLER, getController);
  19. VCB(ONREGISTER, onRegisterClasses);
  20. END_DISPATCH;
  21. #undef CBCLASS