[Updated] Codebase to deal with wasm-style keyboard and mouse inputs
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#ifndef SERVICE_H
|
||||
#define SERVICE_H
|
||||
|
||||
template <typename T>
|
||||
class Service
|
||||
{
|
||||
public:
|
||||
Service(const Service &) = delete;
|
||||
Service &operator=(const Service &) = delete;
|
||||
|
||||
static T& getInstance()
|
||||
{
|
||||
static T instance;
|
||||
return instance;
|
||||
}
|
||||
|
||||
protected:
|
||||
static T* instance;
|
||||
Service() {}
|
||||
|
||||
private:
|
||||
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user