TickOrganizer.h 490 B

123456789101112131415161718192021222324252627
  1. #pragma once
  2. #include <Array.h>
  3. #include <Critical.h>
  4. #include "TickWorker.h"
  5. class TickOrganizer : public virtual Framework::ReferenceCounter
  6. {
  7. private:
  8. int workerCount;
  9. TickWorker** workers;
  10. Framework::Array<Tickable*> tickSources;
  11. TickQueue* queue;
  12. Framework::Critical sourceCs;
  13. public:
  14. TickOrganizer();
  15. ~TickOrganizer();
  16. void nextTick();
  17. void addTickSource(Tickable* zObj);
  18. void removeTickSource(Tickable* zObj);
  19. void exitAndWait();
  20. };