mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-14 03:19:56 +00:00
Public release of the DLU server code!
Have fun!
This commit is contained in:
19
dPhysics/Singleton.h
Normal file
19
dPhysics/Singleton.h
Normal file
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
template <typename T>
|
||||
class Singleton {
|
||||
public:
|
||||
static T& Instance() {
|
||||
static T instance{};
|
||||
return instance;
|
||||
}
|
||||
|
||||
virtual ~Singleton() = default;
|
||||
Singleton(const Singleton& other) = delete;
|
||||
Singleton(Singleton&& other) = delete;
|
||||
Singleton& operator=(const Singleton& other) = delete;
|
||||
Singleton& operator=(Singleton&& other) = delete;
|
||||
|
||||
protected:
|
||||
Singleton() = default;
|
||||
};
|
Reference in New Issue
Block a user