Vital
Loading...
Searching...
No Matches
WavetableOverlayFactory Class Reference

A factory class for creating and configuring overlay components for wavetable editing. More...

#include <wavetable_overlay_factory.h>

Static Public Member Functions

static WavetableComponentOverlaycreateOverlay (WavetableComponentFactory::ComponentType component_type)
 Create an overlay for a given wavetable component type.
 
static void setOverlayOwner (WavetableComponentOverlay *overlay, WavetableComponent *owner)
 Set the owner WavetableComponent of an already created overlay.
 

Detailed Description

A factory class for creating and configuring overlay components for wavetable editing.

The WavetableOverlayFactory is responsible for instantiating the appropriate overlay component based on the type of a WavetableComponent. It also supports setting the overlay's owner after creation to properly connect the overlay with the underlying wavetable component for editing.

Member Function Documentation

◆ createOverlay()

WavetableComponentOverlay * WavetableOverlayFactory::createOverlay ( WavetableComponentFactory::ComponentType component_type)
static

Create an overlay for a given wavetable component type.

Parameters
component_typeThe component type for which the overlay is needed.
Returns
A pointer to a newly created WavetableComponentOverlay, or nullptr if invalid type.

This function constructs a specialized overlay class instance corresponding to the provided WavetableComponentFactory::ComponentType. The caller is responsible for managing the lifetime of the returned overlay.

◆ setOverlayOwner()

void WavetableOverlayFactory::setOverlayOwner ( WavetableComponentOverlay * overlay,
WavetableComponent * owner )
static

Set the owner WavetableComponent of an already created overlay.

Parameters
overlayThe overlay whose owner should be set.
ownerThe WavetableComponent that this overlay will edit.

After creating an overlay with createOverlay(), this function configures it with the correct owner. The owner is the wavetable component that the overlay will modify, allowing the overlay to display and manipulate the component's parameters.


The documentation for this class was generated from the following files: