carb::acquireInterfaceForBindings¶
Defined in carb/BindingsUtils.h
-
template<typename
InterfaceType
>
InterfaceType *carb
::
acquireInterfaceForBindings
(const char *pluginName = nullptr)¶ A helper function for Framework::tryAcquireInterface() that attempts to load plugins if not found.
- Template Parameters
InterfaceType – The interface to acquire (i.e.
assets::IAssets
). Must be specified and cannot be inferred.- Parameters
pluginName – An optional specific plugin to acquire the interface from. If
nullptr
, the default plugin for the given InterfaceType is used.- Throws
std::runtime_error – if the interface cannot be acquired and exceptions are enabled, otherwise this error condition results in a CARB_FATAL_UNLESS() assertion.
- Returns
A pointer to the interface.