VoltMod
C++23 framework for CS2 server plugins
Loading...
Searching...
No Matches
VoltMod::PublishedInterfaces Class Reference

#include <PublishedInterfaces.hpp>

Public Types

using OwnerId = const void *
 

Public Member Functions

void Publish (OwnerId owner, std::string_view name, void *implementation)
 
void Unpublish (OwnerId owner, std::string_view name)
 
void * Find (std::string_view name) const
 
std::vector< std::string > RemoveAll (OwnerId owner)
 

Detailed Description

Interfaces plugins publish to each other. Only the publishing owner can refresh or withdraw a name.

Definition at line 12 of file PublishedInterfaces.hpp.

Member Typedef Documentation

◆ OwnerId

Member Function Documentation

◆ Find()

void * VoltMod::PublishedInterfaces::Find ( std::string_view  name) const

Definition at line 38 of file PublishedInterfaces.cpp.

References VoltMod::ReadFile().

Referenced by VoltMod::PluginContext::Find().

◆ Publish()

void VoltMod::PublishedInterfaces::Publish ( OwnerId  owner,
std::string_view  name,
void *  implementation 
)

Add or refresh name. A peer's live pointer is never swapped out from under it.

Definition at line 9 of file PublishedInterfaces.cpp.

References VoltMod::ReadFile().

Referenced by VoltMod::PluginContext::Publish().

◆ RemoveAll()

std::vector< std::string > VoltMod::PublishedInterfaces::RemoveAll ( OwnerId  owner)

Withdraw everything owner published and report the names it was still holding.

Definition at line 44 of file PublishedInterfaces.cpp.

References VoltMod::ReadFile().

Referenced by VoltMod::PluginContext::RemoveAll().

◆ Unpublish()

void VoltMod::PublishedInterfaces::Unpublish ( OwnerId  owner,
std::string_view  name 
)

Definition at line 27 of file PublishedInterfaces.cpp.

References VoltMod::ReadFile().

Referenced by VoltMod::PluginContext::Unpublish().


The documentation for this class was generated from the following files: