/
RadiantModule.h
46 lines (35 loc) · 1.09 KB
/
RadiantModule.h
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
#pragma once
#include "iradiant.h"
#include <memory>
namespace radiant
{
/// IRadiant implementation class.
class RadiantModule :
public IRadiantBase
{
// Our signals
sigc::signal<void> _radiantStarted;
sigc::signal<void> _radiantShutdown;
public:
/// Broadcast shutdwon signal and clear all listeners
void broadcastShutdownEvent();
/// Broadcasts startup signal
void broadcastStartupEvent();
// IRadiant implementation
sigc::signal<void> signal_radiantStarted() const override;
sigc::signal<void> signal_radiantShutdown() const override;
// RegisterableModule implementation
const std::string& getName() const override;
const StringSet& getDependencies() const override;
void initialiseModule(const IApplicationContext& ctx) override;
void shutdownModule() override;
// Stuff to be done after the modules have been loaded
void postModuleInitialisation();
};
typedef std::shared_ptr<RadiantModule> RadiantModulePtr;
/**
* Return the global Radiant module (for use internally, not by other
* modules).
*/
RadiantModulePtr getGlobalRadiant();
} // namespace radiant