Play-/Source/PadHandler.h

23 lines
484 B
C
Raw Normal View History

2024-06-18 17:00:13 -04:00
#pragma once
2023-10-31 19:50:26 +00:00
#include "PadInterface.h"
#include <list>
#include <functional>
class CPadHandler
{
public:
2018-04-30 21:01:23 +01:00
typedef std::function<CPadHandler*(void)> FactoryFunction;
2022-10-09 10:13:49 -04:00
CPadHandler() = default;
virtual ~CPadHandler() = default;
2018-04-30 21:01:23 +01:00
virtual void Update(uint8*) = 0;
2023-10-31 19:50:26 +00:00
void InsertListener(CPadInterface*);
2024-06-18 17:00:13 -04:00
bool HasListener(CPadInterface*) const;
2018-04-30 21:01:23 +01:00
void RemoveAllListeners();
protected:
2023-10-31 19:50:26 +00:00
typedef std::list<CPadInterface*> ListenerList;
ListenerList m_interfaces;
};