Vuo  2.0.0
Classes | Functions | Variables
VuoCompositionState.h File Reference

Description

VuoCompositionState interface.

Definition in file VuoCompositionState.h.

Go to the source code of this file.

Classes

struct  VuoCompositionState
 Runtime information about a composition or subcomposition. More...
 

Functions

struct VuoCompositionStatevuoCreateCompositionState (void *runtimeState, const char *compositionIdentifier)
 Creates a composition state. More...
 
void * vuoGetCompositionStateRuntimeState (struct VuoCompositionState *compositionState)
 Gets the composition state's runtimeState field. More...
 
const char * vuoGetCompositionStateCompositionIdentifier (struct VuoCompositionState *compositionState)
 Gets the composition state's compositionIdentifier field. More...
 
void vuoFreeCompositionState (struct VuoCompositionState *compositionState)
 Frees the composition state (but not its fields). More...
 
void vuoAddCompositionStateToThreadLocalStorage (const struct VuoCompositionState *compositionState)
 Stores compositionState in thread-local storage, making it available via a call to vuoCopyCompositionStateFromThreadLocalStorage() on the same thread. More...
 
void vuoRemoveCompositionStateFromThreadLocalStorage (void)
 Removes the stored composition state (if any) in thread-local storage, making it no longer available to vuoCopyCompositionStateFromThreadLocalStorage(). More...
 
void * vuoCopyCompositionStateFromThreadLocalStorage (void)
 Retrieves a copy of a composition state previously stored by vuoAddCompositionStateToThreadLocalStorage() on the current thread, or null if no composition state is found. More...
 
uint64_t vuoGetCompositionUniqueIdentifier (const struct VuoCompositionState *compositionState)
 Returns a numerical ID for the composition that is unique process-wide and persists across live-coding reloads. More...
 

Variables

pthread_key_t vuoCompositionStateKey
 Key used to store and retrieve composition state from thread-local state. More...
 

Class Documentation

◆ VuoCompositionState

struct VuoCompositionState
Class Members
const char * compositionIdentifier The identifier of this (sub)composition, unique among the top-level composition and its subcompositions.
void * runtimeState The VuoRuntimeState of the top-level composition.

Function Documentation

◆ vuoAddCompositionStateToThreadLocalStorage()

void vuoAddCompositionStateToThreadLocalStorage ( const struct VuoCompositionState compositionState)

Stores compositionState in thread-local storage, making it available via a call to vuoCopyCompositionStateFromThreadLocalStorage() on the same thread.

Stores compositionState in thread-local storage, making it available via a call to vuoCopyCompositionStateFromThreadLocalStorage() on the same thread.

Definition at line 67 of file VuoCompositionState.c.

◆ vuoCopyCompositionStateFromThreadLocalStorage()

void* vuoCopyCompositionStateFromThreadLocalStorage ( void  )

Retrieves a copy of a composition state previously stored by vuoAddCompositionStateToThreadLocalStorage() on the current thread, or null if no composition state is found.

The returned VuoCompositionState's compositionIdentifier field is null.

Definition at line 91 of file VuoCompositionState.c.

◆ vuoCreateCompositionState()

struct VuoCompositionState* vuoCreateCompositionState ( void *  runtimeState,
const char *  compositionIdentifier 
)

Creates a composition state.

The composition state does not take ownership of runtimeState or compositionIdentifier.

Definition at line 16 of file VuoCompositionState.c.

◆ vuoFreeCompositionState()

void vuoFreeCompositionState ( struct VuoCompositionState compositionState)

Frees the composition state (but not its fields).

Definition at line 43 of file VuoCompositionState.c.

◆ vuoGetCompositionStateCompositionIdentifier()

const char* vuoGetCompositionStateCompositionIdentifier ( struct VuoCompositionState compositionState)

Gets the composition state's compositionIdentifier field.

Definition at line 35 of file VuoCompositionState.c.

◆ vuoGetCompositionStateRuntimeState()

void* vuoGetCompositionStateRuntimeState ( struct VuoCompositionState compositionState)

Gets the composition state's runtimeState field.

Definition at line 27 of file VuoCompositionState.c.

◆ vuoGetCompositionUniqueIdentifier()

uint64_t vuoGetCompositionUniqueIdentifier ( const struct VuoCompositionState compositionState)

Returns a numerical ID for the composition that is unique process-wide and persists across live-coding reloads.

Definition at line 36 of file VuoRuntimeUtilities.cc.

◆ vuoRemoveCompositionStateFromThreadLocalStorage()

void vuoRemoveCompositionStateFromThreadLocalStorage ( void  )

Removes the stored composition state (if any) in thread-local storage, making it no longer available to vuoCopyCompositionStateFromThreadLocalStorage().

Definition at line 78 of file VuoCompositionState.c.

Variable Documentation

◆ vuoCompositionStateKey

pthread_key_t vuoCompositionStateKey

Key used to store and retrieve composition state from thread-local state.

Definition at line 51 of file VuoCompositionState.c.