MayaFlux 1.0.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 429 of file LiveArena.hpp.

430{
431 void* ptr = live_cast_impl(key);
432 if (!ptr) {
433 return nullptr;
434 }
435 return std::shared_ptr<T>(static_cast<T*>(ptr), [](T*) { });
436}
const uint8_t * ptr
MAYAFLUX_API void * live_cast_impl(const char *key) noexcept
Internal implementation for live_cast.
Definition LiveArena.cpp:25

References live_cast_impl(), and ptr.

+ Here is the call graph for this function: