-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathServices.h
More file actions
56 lines (49 loc) · 1.34 KB
/
Services.h
File metadata and controls
56 lines (49 loc) · 1.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
// If we're going to have a global, let's at least centralise it
// and make it neat.
#ifndef SERVICES_H
#define SERVICES_H
#include "LuaInterface.h"
class LuaInterface;
#include "ProcessManager.h"
#include "ResourceManager.h"
#include "LogManager.h"
#include "ComponentManager.h"
class Services
{
private:
// Services
static ProcessManager* processManager_;
static ResourceManager* resourceManager_;
static LuaInterface* luaInterface_;
static LogManager* logManager_;
static ComponentManager* componentManager_;
public:
// Providers
static void provide(ProcessManager* processManager)
{
processManager_ = processManager;
}
static void provide(ResourceManager* resourceManager)
{
resourceManager_ = resourceManager;
}
static void provide(LuaInterface* luaInterface)
{
luaInterface_ = luaInterface;
}
static void provide(LogManager* logManager)
{
logManager_ = logManager;
}
static void provide(ComponentManager* componentManager)
{
componentManager_ = componentManager;
}
// Getters
static ProcessManager* processManager() { return processManager_; }
static ResourceManager* resourceManager() { return resourceManager_; }
static LuaInterface* luaInterface() { return luaInterface_; }
static LogManager* logManager() { return logManager_; }
static ComponentManager* componentManager() { return componentManager_; }
};
#endif