Skip to content

Commit 91effda

Browse files
committed
fix: revert interface, add initialization
1 parent 46f0e4a commit 91effda

1 file changed

Lines changed: 15 additions & 13 deletions

File tree

include/plugify/language_module.hpp

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,16 @@ namespace plugify {
5757

5858
/**
5959
* @brief Shutdown the language module.
60-
* @return Result of the s.
60+
* @return Result of the shutdown, either void or string.
6161
*/
62-
virtual Result<void> Shutdown() = 0;
62+
virtual void Shutdown() = 0;
6363

6464
/**
6565
* @brief Handle actions to be performed on each frame.
6666
* @param deltaTime The time delta since the last update.
67+
* @return Result of the update, either void or string.
6768
*/
68-
virtual Result<void> OnUpdate(std::chrono::milliseconds deltaTime) = 0;
69-
70-
/**
71-
* @brief
72-
*/
73-
// virtual Result<void> OnPluginInitialize(const Extension& plugin) = 0;
69+
virtual void OnUpdate(std::chrono::milliseconds deltaTime) = 0;
7470

7571
/**
7672
* @brief Handle plugin load event.
@@ -79,35 +75,41 @@ namespace plugify {
7975
*/
8076
virtual Result<LoadData> OnPluginLoad(const Extension& plugin) = 0;
8177

78+
/**
79+
* @brief
80+
*/
81+
virtual Result<void> OnPluginInit(const Extension& plugin) = 0;
82+
8283
/**
8384
* @brief Handle plugin start event.
8485
* @param plugin Ref to the started plugin.
8586
*/
86-
virtual Result<void> OnPluginStart(const Extension& plugin) = 0;
87+
virtual void OnPluginStart(const Extension& plugin) = 0;
8788

8889
/**
8990
* @brief Handle plugin update event.
9091
* @param plugin Ref to the started plugin.
9192
* @param deltaTime The time delta since the last update.
93+
* @return Result of the update, either void or string.
9294
*/
93-
virtual Result<void> OnPluginUpdate(const Extension& plugin, std::chrono::milliseconds deltaTime) = 0;
95+
virtual void OnPluginUpdate(const Extension& plugin, std::chrono::milliseconds deltaTime) = 0;
9496

9597
/**
9698
* @brief Handle plugin end event.
9799
* @param plugin Ref to the ended plugin.
98100
*/
99-
virtual Result<void> OnPluginEnd(const Extension& plugin) = 0;
101+
virtual void OnPluginEnd(const Extension& plugin) = 0;
100102

101103
/**
102104
* @brief Handle method export event.
103105
* @param plugin Ref to the plugin exporting a method.
104106
*/
105-
virtual Result<void> OnMethodExport(const Extension& plugin) = 0;
107+
virtual void OnMethodExport(const Extension& plugin) = 0;
106108

107109
/**
108110
* @brief Determine if language module is build with debugging mode.
109111
* @return True if the assembly is build with debugging, false otherwise.
110112
*/
111-
virtual bool IsDebugBuild() = 0;
113+
virtual bool IsDebugBuild() const noexcept = 0;
112114
};
113115
} // namespace plugify

0 commit comments

Comments
 (0)