VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
IPluginServices.hpp
Go to the documentation of this file.
1#pragma once
2
3#include <string_view>
4
5namespace VoltMod
6{
7
8/** Interfaces plugins publish to each other. A pointer lives only while its publisher is loaded, so
9 * look it up where it is used; the host never unloads a plugin mid-dispatch. */
11{
12 virtual void Publish(std::string_view name, void* implementation) = 0;
13 virtual void Unpublish(std::string_view name) = 0;
14 virtual void* Find(std::string_view name) = 0;
15
16protected:
17 ~IPluginServices() = default;
18};
19
20} // namespace VoltMod
static std::string ReadFile(const std::filesystem::path &path)
Definition Loader.cpp:56
virtual void * Find(std::string_view name)=0
virtual void Unpublish(std::string_view name)=0
virtual void Publish(std::string_view name, void *implementation)=0