IceShard 1
A personal game engine project, with development focused on 2D/2.5D games.
Loading...
Searching...
No Matches
ice::ModuleNegotiatorAPI Struct Reference

Negotiation API used to register and query modules for their APIs. More...

#include <ice/module_negotiator.hxx>

Public Types

using FnModuleInAppContext
using FnModuleSelectAPIs
 Used to return API pointers into the given array.
using FnModuleRegisterAPI
 Registers an API selector function for the given API name.

Public Attributes

FnModuleInAppContext fn_is_app_context
FnModuleSelectAPIs fn_select_apis
FnModuleRegisterAPI fn_register_api

Detailed Description

Negotiation API used to register and query modules for their APIs.

Allows to register and query APIs independent if the module is dynamically or statically linked.

Member Typedef Documentation

◆ FnModuleInAppContext

Initial value:
bool(*)(
ice::ModuleNegotiatorAPIContext*
) noexcept
Returns
'true' if the module is loaded from a shared library. Can be used to load system modules only from the executable.

◆ FnModuleRegisterAPI

Initial value:
bool (*)(
ice::ModuleNegotiatorAPIContext*,
ice::FnModuleSelectAPI* fn_api_selector
) noexcept
bool(ice::StringID_Hash, ice::u32, ice::ModuleAPI *) FnModuleSelectAPI
Definition module_types.hxx:25
Internal hash type representing the hashed string value.
Definition stringid.hxx:34

Registers an API selector function for the given API name.

Note
A single selector may return multiple versions of the same API.

◆ FnModuleSelectAPIs

Initial value:
bool (*)(
ice::ModuleNegotiatorAPIContext*,
ice::u32 api_version,
ice::ModuleAPI* out_array,
ice::u32* inout_array_size
) noexcept
std::uint32_t u32
Definition types.hxx:26
Stores information about a single API entry.
Definition module_info.hxx:33

Used to return API pointers into the given array.

Note
If the array pointer is null, the size pointer will be set to the required size.
If the array is not large enough, the returned elements will be truncated without a specific order.

Member Data Documentation

◆ fn_is_app_context

FnModuleInAppContext ice::ModuleNegotiatorAPI::fn_is_app_context

◆ fn_register_api

FnModuleRegisterAPI ice::ModuleNegotiatorAPI::fn_register_api

◆ fn_select_apis

FnModuleSelectAPIs ice::ModuleNegotiatorAPI::fn_select_apis

The documentation for this struct was generated from the following file: