Files
WebJelly-Rescue/include/services/Service.h
T

25 lines
343 B
C++

#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