Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Singleton.h
Go to the documentation of this file.
1/*
2Olympe Engine V2 2025
3Nicolas Chereau
4nchereau@gmail.com
5
6Purpose:
7- Singleton design pattern implementation.
8- Ensures a class has only one instance and provides a global point of access to it.
9- Base Singleton marker class (no instance managed here).
10- Individual derived classes should implement their own GetInstance()/Get() methods.
11
12*/
13
14
15/*
16* DEPRECATED : Use Object with ObjectType::Singleton instead.
17
18#pragma once
19#include <string>
20
21struct Message;
22
23class Singleton
24{
25public:
26 Singleton() = default;
27 virtual ~Singleton() = default;
28
29 virtual void Process() {};
30 virtual void Render() {};
31 virtual void OnEvent(const Message&) {};
32
33 std::string name = "unnamed singleton";
34};
35
36*/