summaryrefslogtreecommitdiff
path: root/replay/thinkmanager.h
blob: 76385ccca1526c3e52f7d3fc919e1fa1124b20c2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//========= Copyright Valve Corporation, All rights reserved. ============//
//
//=======================================================================================//

#ifndef FLUSHMANAGER_H
#define FLUSHMANAGER_H
#ifdef _WIN32
#pragma once
#endif

//----------------------------------------------------------------------------------------

#include "utllinkedlist.h"
#include "ithinkmanager.h"

//----------------------------------------------------------------------------------------

class IThinker;

//----------------------------------------------------------------------------------------

//
// Generic think manager - only worries about CGenericPersistentManagers for
// now though - not a CGenericPersistentManager's Think() can result in subtle
// bugs where files don't  get saved properly.
//
class CThinkManager : public IThinkManager
{
public:
	virtual void		AddThinker( IThinker *pThinker );
	virtual void		RemoveThinker( IThinker *pThinker );

	void				Think();

	CUtlLinkedList< IThinker *, int > m_lstManagers;
};

//----------------------------------------------------------------------------------------

extern IThinkManager *g_pThinkManager;

//----------------------------------------------------------------------------------------

#endif // FLUSHMANAGER_H