6 #include <plugify/mem_addr.hpp>
15 class IPlugifyProvider;
24 using MethodData = std::pair<MethodRef, MemAddr>;
38 std::memcpy(
error.data(), str.data(), std::min(str.length(),
error.size() - 1));
66 using InitResult = std::variant<InitResultData, ErrorData>;
74 using LoadResult = std::variant<LoadResultData, ErrorData>;
Interface for user-implemented language modules.
virtual bool IsDebugBuild()=0
Handle actions to be performed on each game frame.
virtual InitResult Initialize(std::weak_ptr< IPlugifyProvider > provider, ModuleRef module)=0
Initialize the language module.
virtual void OnPluginEnd(PluginRef plugin)=0
Handle plugin end event.
virtual void Shutdown()=0
Shutdown the language module.
virtual void OnMethodExport(PluginRef plugin)=0
Handle method export event.
virtual LoadResult OnPluginLoad(PluginRef plugin)=0
Handle plugin load event.
virtual void OnPluginStart(PluginRef plugin)=0
Handle plugin start event.
Reference wrapper to access language module's information.
Reference wrapper to access for plugin's information.
Holds information about an error.
std::array< char, 255 > error
Description of the error.
Holds information about the initialization result.
Holds information about the load result.
std::vector< MethodData > methods
Methods exported by the loaded plugin.