MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ live_cast()

template<typename T >
std::shared_ptr< T > MayaFlux::live_cast ( const char *  key)
noexcept

Retrieves a live-arena object by key as a shared_ptr<T>.

Delegates the directory walk to live_cast_impl so the call resolves through the DLL export table on all platforms. The returned shared_ptr uses a no-op deleter; lifetime is managed by the arena or the original expose_live caller.

Template Parameters
TExpected type of the registered object.
Parameters
keyNull-terminated string used at make_live or expose_live time.
Returns
shared_ptr<T>, or nullptr if the key is not found.

Definition at line 395 of file LiveArena.hpp.

396{
397 void* ptr = live_cast_impl(key);
398 if (!ptr) {
399 return nullptr;
400 }
401 return std::shared_ptr<T>(static_cast<T*>(ptr), [](T*) { });
402}
MAYAFLUX_API void * live_cast_impl(const char *key) noexcept
Internal implementation for live_cast.
Definition LiveArena.cpp:13

References live_cast_impl().

+ Here is the call graph for this function: