MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
LiveArena.hpp File Reference
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  MayaFlux::internal::LiveArenaEntry
 Single directory entry mapping a string key to a location within the arena. More...
 
struct  MayaFlux::internal::LiveArenaHeader
 POD header block placed at the start of the arena storage. More...
 

Namespaces

namespace  MayaFlux
 Main namespace for the Maya Flux audio engine.
 
namespace  MayaFlux::internal
 

Macros

#define MF_LIVE_EXPOSE(key, ptr)   ((void)0)
 Exposes ptr to the live arena under a user-supplied key when MAYAFLUX_LIVE is defined.
 
#define MF_LIVE_EXPOSE_AUTO(ptr)   ((void)0)
 Auto-expose variant that deduces the key prefix from the shared_ptr element type.
 
#define MF_LIVE_EXPOSE_NAMED(name, ptr)   ((void)0)
 Auto-expose variant with an explicit name prefix and per-name counter.
 
#define MF_PRETTY_FUNCTION   __PRETTY_FUNCTION__
 

Functions

uint32_t MayaFlux::internal::align_up (uint32_t value, uint32_t align) noexcept
 Aligns value up to the next multiple of align.
 
template<typename T >
bool MayaFlux::expose_live (const char *key, const std::shared_ptr< T > &obj) noexcept
 Exposes an existing shared_ptr-managed object to the live arena under key.
 
template<typename T >
bool MayaFlux::expose_live (const char *key, T *ptr) noexcept
 Exposes an existing raw pointer to the live arena under key.
 
void * MayaFlux::internal::live_arena_alloc (const char *key, uint32_t size, uint32_t alignment) noexcept
 Allocates size bytes from the arena with alignment.
 
MAYAFLUX_API void MayaFlux::live_arena_dump () noexcept
 Dumps all live arena entries to stderr.
 
bool MayaFlux::internal::live_arena_expose (const char *key, std::shared_ptr< void > shared) noexcept
 Registers an externally owned shared_ptr under key.
 
LiveArenaEntryMayaFlux::internal::live_arena_find (const char *key) noexcept
 Locates an existing directory entry by key.
 
LiveArenaHeaderMayaFlux::internal::live_arena_header () noexcept
 Returns a pointer to the header block at the start of arena storage.
 
unsigned char * MayaFlux::internal::live_arena_object_region () noexcept
 Returns a pointer to the object region (immediately after the header).
 
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>.
 
MAYAFLUX_API void * MayaFlux::live_cast_impl (const char *key) noexcept
 Internal implementation for live_cast.
 
void MayaFlux::internal::live_format_key (char *buf, std::string_view name, uint32_t count) noexcept
 Formats a live arena key as "TypeName_N" into buf.
 
template<typename T >
constexpr std::string_view MayaFlux::internal::live_type_name () noexcept
 Extracts the unqualified type name from a compiler-generated function signature.
 
template<typename T , typename... Args>
std::shared_ptr< T > MayaFlux::make_live (const char *key, Args &&... args)
 Constructs a T in-place inside the live arena and registers it under key.
 

Variables

constexpr std::size_t MayaFlux::internal::LIVE_ARENA_CAPACITY = static_cast<const std::size_t>(16 * 1024 * 1024)
 Default capacity of the live arena in bytes.
 
constexpr std::size_t MayaFlux::internal::LIVE_ARENA_KEY_MAX = 64
 Maximum length of a live arena key, including null terminator.
 
constexpr std::size_t MayaFlux::internal::LIVE_ARENA_MAX_ENTRIES = 256
 Maximum number of objects that can be registered in the live arena.