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

#include <ice/module_query.hxx>

Inheritance diagram for ice::ModuleQuery:
ice::ModuleNegotiatorBase ice::ModuleRegister ice::ModuleNegotiatorTagged< Tag >

Public Member Functions

virtual ~ModuleQuery () noexcept=default
virtual bool query_api (ice::StringID_Arg api_name, ice::u32 version, ice::ModuleAPI &out_api) const noexcept
 Queries an API info for the given name and version.
virtual bool query_apis (ice::StringID_Arg api_name, ice::u32 version, ice::ModuleAPI *out_array, ice::u32 *inout_array_size) const noexcept=0
 Queries all API infos for the given name and version.
template<typename Type>
requires (ice::concepts::APIType<Type>)
bool query_api (Type &api_struct) const noexcept
 Queries a single API for the given API struct.
template<typename Type>
requires (ice::concepts::APIType<Type>)
bool query_apis (ice::Array< Type > &out_apis) const noexcept
 Queries all APIs for the given API struct.

Constructor & Destructor Documentation

◆ ~ModuleQuery()

virtual ice::ModuleQuery::~ModuleQuery ( )
virtualdefaultnoexcept

Member Function Documentation

◆ query_api() [1/2]

bool ice::ModuleQuery::query_api ( ice::StringID_Arg api_name,
ice::u32 version,
ice::ModuleAPI & out_api ) const
inlinevirtualnoexcept

Queries an API info for the given name and version.

Parameters
[in]api_nameThe name of the API to query.
[in]api_versionThe version of the API to query.
[out]out_api_infoThe API information if found.
Returns
True if the API was found, false otherwise.

◆ query_api() [2/2]

template<typename Type>
requires (ice::concepts::APIType<Type>)
bool ice::ModuleQuery::query_api ( Type & api_struct) const
inlinenoexcept

Queries a single API for the given API struct.

Template Parameters
TypeThe API struct type to query.
Parameters
api_structThe API struct to update if the call was successful.
Returns
True if the API was found, false otherwise.

◆ query_apis() [1/2]

template<typename Type>
requires (ice::concepts::APIType<Type>)
bool ice::ModuleQuery::query_apis ( ice::Array< Type > & out_apis) const
noexcept

Queries all APIs for the given API struct.

Warning
This function will truncate results if more than 10 APIs are found.
Template Parameters
TypeThe API struct type to query.
Parameters
[out]out_apisThe array to write the API structs into.
Returns
True if at least one API was found, false otherwise.

◆ query_apis() [2/2]

virtual bool ice::ModuleQuery::query_apis ( ice::StringID_Arg api_name,
ice::u32 version,
ice::ModuleAPI * out_array,
ice::u32 * inout_array_size ) const
pure virtualnoexcept

Queries all API infos for the given name and version.

Note
If the array is not large enough, the returned elements will be truncated without a specific order.
Parameters
[in]api_nameThe name of the APIs to query.
[in]api_versionThe version of the APIs to query.
[out]out_arrayThe array to write the API infos into.
[in,out]inout_array_sizeThe size of the array. Will be set to the required size if the array pointer is null.

Implemented in ice::ModuleNegotiatorBase, and ice::ModuleNegotiatorTagged< Tag >.


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