Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. //=======================================================================================//
  4. #ifndef FLUSHMANAGER_H
  5. #define FLUSHMANAGER_H
  6. #ifdef _WIN32
  7. #pragma once
  8. #endif
  9. //----------------------------------------------------------------------------------------
  10. #include "utllinkedlist.h"
  11. #include "ithinkmanager.h"
  12. //----------------------------------------------------------------------------------------
  13. class IThinker;
  14. //----------------------------------------------------------------------------------------
  15. //
  16. // Generic think manager - only worries about CGenericPersistentManagers for
  17. // now though - not a CGenericPersistentManager's Think() can result in subtle
  18. // bugs where files don't get saved properly.
  19. //
  20. class CThinkManager : public IThinkManager
  21. {
  22. public:
  23. virtual void AddThinker( IThinker *pThinker );
  24. virtual void RemoveThinker( IThinker *pThinker );
  25. void Think();
  26. CUtlLinkedList< IThinker *, int > m_lstManagers;
  27. };
  28. //----------------------------------------------------------------------------------------
  29. extern IThinkManager *g_pThinkManager;
  30. //----------------------------------------------------------------------------------------
  31. #endif // FLUSHMANAGER_H