2019-07-25 23:21:03 +02:00
|
|
|
#ifndef __INCLUDED_HOOK_BASE_H__
|
|
|
|
#define __INCLUDED_HOOK_BASE_H__
|
|
|
|
|
2019-08-14 14:55:31 +02:00
|
|
|
#include "Base_Hook.h"
|
|
|
|
|
2019-08-14 15:09:57 +02:00
|
|
|
#ifndef NO_OVERLAY
|
2019-08-14 14:55:31 +02:00
|
|
|
|
2019-08-26 16:38:01 +02:00
|
|
|
#include <set>
|
2019-08-16 10:36:44 +02:00
|
|
|
|
|
|
|
/*
|
|
|
|
*
|
|
|
|
*/
|
2019-07-25 23:21:03 +02:00
|
|
|
class Hook_Manager
|
|
|
|
{
|
|
|
|
friend class Base_Hook;
|
|
|
|
|
|
|
|
protected:
|
2019-08-16 10:36:44 +02:00
|
|
|
// TODO: If needed, create a second vector with only the renderers hook
|
|
|
|
// Cause actually, a call to FoundRenderer will unhook everything registered except the renderer hook
|
|
|
|
// If you do that, you should consider moving the renderer hooks to its own class and keep this one generic ?
|
2019-08-26 16:38:01 +02:00
|
|
|
std::set<Base_Hook*> _hooks;
|
2019-07-25 23:21:03 +02:00
|
|
|
|
|
|
|
Hook_Manager();
|
|
|
|
virtual ~Hook_Manager();
|
|
|
|
|
|
|
|
public:
|
|
|
|
static Hook_Manager& Inst();
|
|
|
|
|
2019-08-27 15:38:07 +02:00
|
|
|
void AddHook(Base_Hook* hook);
|
|
|
|
void RemoveHook(Base_Hook* hook);
|
2019-07-25 23:21:03 +02:00
|
|
|
};
|
|
|
|
|
2019-08-14 15:09:57 +02:00
|
|
|
#endif//NO_OVERLAY
|
2019-07-25 23:21:03 +02:00
|
|
|
|
|
|
|
#endif//__INCLUDED_HOOK_BASE_H__
|