-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.h
More file actions
20 lines (16 loc) · 873 Bytes
/
Copy pathApp.h
File metadata and controls
20 lines (16 loc) · 873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#pragma once
class IApp
{
public:
virtual ~IApp() = default;
virtual std::string GetName() const = 0;
virtual bool Initialise() = 0;
virtual void Uninitialise() = 0;
virtual void Run() = 0;
};
extern std::unique_ptr<IApp> g_app;
#define REGISTER_SERVICE(appClass) \
std::unique_ptr<IApp> g_app \
{ \
static_cast<IApp *>(new appClass()) \
}