Elaztek Developer Hub
Blamite Game Engine - Strings  00431.01.26.25.2126.blamite
A library containing general purpose utilities and classes for use in multiple projects.
BlamStrings::Hooks Namespace Reference

Namespace containing functions for hooking into the Strings library. More...

Functions

STRINGS_API void SetupHooks (BlamStringsHooksBundle _hooks, std::string module_name)
 Sets up hooks for a given module. More...
 
STRINGS_API void DetachHooks (std::string module_name)
 Detaches all hooks for a given module. More...
 

Detailed Description

Namespace containing functions for hooking into the Strings library.

Hooks allow for other libraries to register callback functions that will be called when certain events happen within the Strings library. Currently, this is used to monitor for configuration file reloads - but can be extended to support a wide range of other events.

Function Documentation

◆ DetachHooks()

void BlamStrings::Hooks::DetachHooks ( std::string  module_name)

Detaches all hooks for a given module.

Parameters
module_name- The name of the module to unhook. Must match the module_name provided in SetupHooks.

◆ SetupHooks()

void BlamStrings::Hooks::SetupHooks ( BlamStringsHooksBundle  _hooks,
std::string  module_name 
)

Sets up hooks for a given module.

Parameters
_hooks- The hooks bundle containing any desired callbacks.
module_name- The name of the module that is attempting to hook into Strings.