[keel,nostalgia] Add id() function to Keel modules

This commit is contained in:
Gary Talent 2023-09-30 13:34:45 -05:00
parent 5cdf241321
commit 72346162a5
3 changed files with 14 additions and 2 deletions
src
keel
nostalgia/modules
core/src/keel
scene/src/keel

@ -27,6 +27,8 @@ class Module {
Module &operator=(Module&&) noexcept = delete;
constexpr virtual ~Module() noexcept = default;
[[nodiscard]]
virtual ox::String id() const noexcept = 0;
[[nodiscard]]
virtual ox::Vector<TypeDescGenerator> types() const noexcept;
[[nodiscard]]

@ -22,6 +22,11 @@ class KeelModule: public keel::Module {
TileSheetV2ToTileSheetConverter m_tileSheetV2ToTileSheetConverter;
public:
[[nodiscard]]
ox::String id() const noexcept override {
return "net.drinkingtea.nostalgia.core";
}
[[nodiscard]]
ox::Vector<keel::TypeDescGenerator> types() const noexcept final {
return {
@ -63,7 +68,7 @@ class KeelModule: public keel::Module {
}
};
static KeelModule mod;
static const KeelModule mod;
const keel::Module *keelModule() noexcept {
return &mod;
}

@ -15,6 +15,11 @@ class SceneModule: public keel::Module {
SceneDocToSceneStaticConverter m_sceneDocToSceneStaticConverter;
public:
[[nodiscard]]
ox::String id() const noexcept override {
return "net.drinkingtea.nostalgia.scene";
}
[[nodiscard]]
ox::Vector<keel::TypeDescGenerator> types() const noexcept override {
return {
@ -39,7 +44,7 @@ class SceneModule: public keel::Module {
};
static SceneModule mod;
static const SceneModule mod;
const keel::Module *keelModule() noexcept {
return &mod;
}