2016-01-04 14:58:00 -05:00
|
|
|
#include "STDInclude.hpp"
|
2015-12-23 08:45:53 -05:00
|
|
|
|
|
|
|
namespace Components
|
|
|
|
{
|
|
|
|
std::vector<Component*> Loader::Components;
|
|
|
|
|
|
|
|
void Loader::Initialize()
|
|
|
|
{
|
2016-01-03 18:00:07 -05:00
|
|
|
Loader::Register(new Flags());
|
2015-12-31 07:37:25 -05:00
|
|
|
Loader::Register(new Singleton());
|
2015-12-27 14:05:43 -05:00
|
|
|
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new Dvar());
|
2015-12-25 20:51:58 -05:00
|
|
|
Loader::Register(new Maps());
|
2015-12-30 18:55:08 -05:00
|
|
|
Loader::Register(new News());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new Menus());
|
2015-12-25 15:42:35 -05:00
|
|
|
Loader::Register(new Party());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new Colors());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new Logger());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new Window());
|
|
|
|
Loader::Register(new Command());
|
|
|
|
Loader::Register(new Console());
|
2015-12-31 07:37:25 -05:00
|
|
|
Loader::Register(new IPCPipe());
|
2015-12-24 10:55:38 -05:00
|
|
|
Loader::Register(new Network());
|
2016-01-09 14:56:28 -05:00
|
|
|
Loader::Register(new Theatre());
|
2016-01-08 21:21:59 -05:00
|
|
|
Loader::Register(new Download());
|
2016-01-01 20:28:09 -05:00
|
|
|
Loader::Register(new Playlist());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new RawFiles());
|
2015-12-23 10:56:02 -05:00
|
|
|
Loader::Register(new Renderer());
|
2015-12-28 08:08:46 -05:00
|
|
|
Loader::Register(new UIFeeder());
|
|
|
|
Loader::Register(new UIScript());
|
2016-01-03 18:00:07 -05:00
|
|
|
Loader::Register(new Dedicated());
|
2016-01-03 13:28:47 -05:00
|
|
|
Loader::Register(new Discovery());
|
2016-01-08 14:10:35 -05:00
|
|
|
Loader::Register(new Exception());
|
2016-01-03 18:00:07 -05:00
|
|
|
Loader::Register(new FastFiles());
|
2015-12-23 10:56:02 -05:00
|
|
|
Loader::Register(new Materials());
|
2015-12-23 21:26:46 -05:00
|
|
|
Loader::Register(new FileSystem());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Register(new QuickPatch());
|
2016-01-07 20:20:55 -05:00
|
|
|
Loader::Register(new ServerInfo());
|
2015-12-27 22:02:30 -05:00
|
|
|
Loader::Register(new ServerList());
|
2016-01-04 18:49:34 -05:00
|
|
|
Loader::Register(new ZoneBuilder());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new AssetHandler());
|
2015-12-25 17:17:29 -05:00
|
|
|
Loader::Register(new Localization());
|
2015-12-23 16:21:03 -05:00
|
|
|
Loader::Register(new MusicalTalent());
|
2015-12-29 18:16:33 -05:00
|
|
|
Loader::Register(new ConnectProtocol());
|
2015-12-23 08:45:53 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
void Loader::Uninitialize()
|
|
|
|
{
|
|
|
|
for (auto component : Loader::Components)
|
|
|
|
{
|
2015-12-23 16:21:03 -05:00
|
|
|
Logger::Print("Unregistering component: %s", component->GetName());
|
2015-12-23 08:45:53 -05:00
|
|
|
delete component;
|
|
|
|
}
|
|
|
|
|
|
|
|
Loader::Components.clear();
|
|
|
|
}
|
|
|
|
|
|
|
|
void Loader::Register(Component* component)
|
|
|
|
{
|
|
|
|
if (component)
|
|
|
|
{
|
2015-12-23 16:21:03 -05:00
|
|
|
Logger::Print("Component registered: %s", component->GetName());
|
2015-12-23 08:45:53 -05:00
|
|
|
Loader::Components.push_back(component);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|