11#include "mem_addr.hpp"
12#include "date_time.hpp"
18 class IPlugifyProvider;
30 error.assign(str.begin(), str.end());
31 if (
error.back() != 0) {
32 error.emplace_back(
'\0');
65 using InitResult = std::variant<InitResultData, ErrorData>;
73 using LoadResult = std::variant<LoadResultData, ErrorData>;
Interface for user-implemented language modules.
virtual bool IsDebugBuild()=0
Determine if language module is build with debugging mode.
virtual void OnPluginUpdate(PluginHandle plugin, DateTime dt)=0
Handle plugin update event.
virtual void Shutdown()=0
Shutdown the language module.
virtual void OnPluginEnd(PluginHandle plugin)=0
Handle plugin end event.
virtual LoadResult OnPluginLoad(PluginHandle plugin)=0
Handle plugin load event.
virtual void OnMethodExport(PluginHandle plugin)=0
Handle method export event.
virtual void OnUpdate(DateTime dt)=0
Handle actions to be performed on each frame.
virtual void OnPluginStart(PluginHandle plugin)=0
Handle plugin start event.
virtual InitResult Initialize(std::weak_ptr< IPlugifyProvider > provider, ModuleHandle module)=0
Initialize the language module.
A wrapper class for memory addresses, providing utility functions for pointer manipulation.
Handle wrapper to access language module's information.
Handle wrapper to access plugin's information.
Holds information about an error.
std::vector< char > error
Description of the error.
Holds information about the initialization result.
Holds information about the load result.
MethodTable table
User data.
std::vector< MethodData > methods
Methods exported by the loaded plugin.
Represents a table of method availability flags.