ReXGlue SDK
Loading...
Searching...
No Matches
rex::IInterfaceFactory Class Referenceabstract

#include <rex/module.h>

Public Member Functions

virtual IInterface * Find (std::string_view name, u32 version)=0
virtual std::vector< IInterface * > FindAll (std::string_view name, u32 version)=0
template<typename T>
T * Get ()
template<typename T>
std::vector< T * > FindAll ()

Detailed Description

Finds the interfaces the host and the modules serve.

Member Function Documentation

◆ Find()

virtual IInterface * rex::IInterfaceFactory::Find ( std::string_view name,
u32 version )
pure virtual
Parameters
versionThe version, matched exactly.
Returns
The interface, or null when nothing serves that name and version.

◆ FindAll() [1/2]

template<typename T>
std::vector< T * > rex::IInterfaceFactory::FindAll ( )
inline

Finds the interface of every module that serves it, by type.

Template Parameters
TAn interface declared with REX_DECLARE_INTERFACE.
Returns
The interfaces in list order.

◆ FindAll() [2/2]

virtual std::vector< IInterface * > rex::IInterfaceFactory::FindAll ( std::string_view name,
u32 version )
pure virtual

Finds the interface of every module that serves it, in list order.

Parameters
versionThe version, matched exactly.
Returns
The interfaces, empty when nothing serves that name and version.

◆ Get()

template<typename T>
T * rex::IInterfaceFactory::Get ( )
inline

Finds an interface by type.

Template Parameters
TAn interface declared with REX_DECLARE_INTERFACE.
Returns
The interface, or null when nothing serves its name and version.

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