enforce ctx in constructor
Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
3 files changed
+29
-22
No files matched your search
@@ -8,15 +8,12 @@ namespace vl::mod {
|
||||
// Registration record stored in the module's custom section.
|
||||
// Core will scan this in the loaded .so to find available mods.
|
||||
struct Registration {
|
||||
// magic helps Core validate the record
|
||||
const void* magic;
|
||||
// factory that constructs a ModBase-derived object with Context
|
||||
std::unique_ptr<Base> (*factory)(const Context&);
|
||||
// an optional RTTI-ish string (e.g., typeid(T).name())
|
||||
const char* typeName;
|
||||
const char* typeName; // e.g., typeid(T).name()
|
||||
const char* name; // COMPILE-TIME mod name (from T::Name())
|
||||
const char* version; // COMPILE-TIME mod version (from T::Version())
|
||||
};
|
||||
|
||||
inline constexpr std::uintptr_t kModRegMagicValue = 0xBADC0FFEEULL;
|
||||
inline const void* kModRegMagic = reinterpret_cast<const void*>(kModRegMagicValue);
|
||||
|
||||
inline constexpr std::uintptr_t kModRegMagicRaw = 0xBADC0FFEEULL;
|
||||
inline const void* kModRegMagic = reinterpret_cast<const void*>(kModRegMagicRaw);
|
||||
} // namespace vl::log
|
||||
Reference in new issue
Block a user