Lodestone.Core
Loading...
Searching...
No Matches
ExtensionLoader.h
Go to the documentation of this file.
1
11#ifndef LODESTONE_LIBRARYLOADER_H
12#define LODESTONE_LIBRARYLOADER_H
13#include <Lodestone.Common/event/Event.h>
14
15#include <filesystem>
16
19
22 public:
24 static constexpr auto ENTRYPOINT = "lodestoneInit";
25
26 virtual ~ExtensionLoader() = default;
27
29
30 virtual void load() = 0;
31 virtual void loadExtension(LodestoneInit entrypoint);
32
33 public:
34 common::event::CancellableEvent<const std::filesystem::path &> extensionLoadingEvent;
35 common::event::Event<core::LodestoneExtension *> extensionLoadedEvent;
36
37 protected:
39 };
40}
41
42#endif // LODESTONE_LIBRARYLOADER_H
Definition LodestoneExtension.h:11
The core Lodestone class, used for registering other plugin libs.
Definition Lodestone.h:14
common::event::CancellableEvent< const std::filesystem::path & > extensionLoadingEvent
Definition ExtensionLoader.h:34
common::event::Event< core::LodestoneExtension * > extensionLoadedEvent
Definition ExtensionLoader.h:35
core::Lodestone * m_core
Definition ExtensionLoader.h:38
ExtensionLoader(core::Lodestone *core)
Definition ExtensionLoader.cpp:14
static constexpr auto ENTRYPOINT
Definition ExtensionLoader.h:24
lodestone::core::LodestoneExtension *(*)(void) LodestoneInit
Definition ExtensionLoader.h:23
virtual void loadExtension(LodestoneInit entrypoint)
Definition ExtensionLoader.cpp:16
Definition LibraryException.cpp:10
Definition LibraryException.cpp:10