Type alias for NetAPIModule map

This commit is contained in:
Antoine Pilote
2024-04-18 20:22:43 -04:00
parent 9164bccd88
commit 41c07bf6d8

View File

@@ -8,10 +8,13 @@ namespace Nuake {
class NetAPIModule
{
public:
using MethodMap = std::unordered_map<std::string, void*>;
virtual const std::string GetModuleName() const = 0;
virtual void RegisterMethods() = 0;
std::unordered_map<std::string, void*> GetMethods() const { return m_Methods; }
MethodMap GetMethods() const { return m_Methods; }
protected:
void RegisterMethod(const std::string& name, void* methodPtr)
{
@@ -19,6 +22,6 @@ namespace Nuake {
}
private:
std::unordered_map<std::string, void*> m_Methods;
MethodMap m_Methods;
};
}