mirror of
https://github.com/geode-sdk/geode.git
synced 2024-11-14 19:15:05 -05:00
schedule function system
This commit is contained in:
parent
c39ae373fd
commit
2bedb68c31
1 changed files with 5 additions and 1 deletions
|
@ -57,6 +57,8 @@ namespace geode {
|
|||
using exportmemfn_t = void(Mod::*)(std::string const&, unknownmemfn_t);
|
||||
using exportfn_t = void(Mod::*)(std::string const&, unknownfn_t);
|
||||
|
||||
using loadfn_t = void(*)(Mod*);
|
||||
|
||||
struct ScheduledExport {
|
||||
std::string m_selector;
|
||||
std::variant<unknownmemfn_t, unknownfn_t> m_func;
|
||||
|
@ -66,7 +68,7 @@ namespace geode {
|
|||
std::vector<ScheduledHook> m_scheduledHooks;
|
||||
std::vector<ScheduledLog> m_scheduledLogs;
|
||||
std::vector<ScheduledExport> m_scheduledExports;
|
||||
|
||||
std::vector<loadfn_t> m_scheduledFunctions;
|
||||
public:
|
||||
|
||||
|
||||
|
@ -121,6 +123,8 @@ namespace geode {
|
|||
*/
|
||||
GEODE_DLL void logInfo(std::string const& info, Severity severity);
|
||||
|
||||
GEODE_DLL void scheduleOnLoad(loadfn_t fn);
|
||||
|
||||
protected:
|
||||
GEODE_DLL void exportAPIFunctionInternal(std::string const& selector, unknownmemfn_t fn);
|
||||
GEODE_DLL void exportAPIFunctionInternal(std::string const& selector, unknownfn_t fn);
|
||||
|
|
Loading…
Reference in a new issue