Update
Removed Message Queue Sending and receiving is now in one thread (gotta make them separate) Created a very crude Plugin System Renamed AllAndMe to AllAndServer
This commit is contained in:
29
include/HLAPI/Plugin/PluginManager.hpp
Normal file
29
include/HLAPI/Plugin/PluginManager.hpp
Normal file
@ -0,0 +1,29 @@
|
||||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "HLAPI/Plugin/Plugin.hpp"
|
||||
|
||||
namespace std::net
|
||||
{
|
||||
class PluginManager
|
||||
{
|
||||
public:
|
||||
PluginManager();
|
||||
~PluginManager();
|
||||
|
||||
void HandleMessage(const NetworkMessage& msg)
|
||||
{
|
||||
for (size_t i = 0; i < m_plugins.size(); i++)
|
||||
m_plugins.at(i)->HandleMessage(msg);
|
||||
}
|
||||
|
||||
void AddPlugin(Plugin* p)
|
||||
{
|
||||
m_plugins.emplace_back(p);
|
||||
}
|
||||
|
||||
private:
|
||||
std::vector<Plugin*> m_plugins = std::vector<Plugin*>();
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user