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 377 of file LiveArena.hpp.

378{
379 void* ptr = live_cast_impl(key);
380 if (!ptr) {
381 return nullptr;
382 }
383 return std::shared_ptr<T>(static_cast<T*>(ptr), [](T*) { });
384}
const uint8_t * ptr
MAYAFLUX_API void * live_cast_impl(const char *key) noexcept
Internal implementation for live_cast.
Definition LiveArena.cpp:13

References live_cast_impl(), and ptr.

+ Here is the call graph for this function: