MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Portal::Forma::Plot::Source Class Reference

Chainable builder for PlotContainer construction. More...

#include <PlotSource.hpp>

+ Collaboration diagram for MayaFlux::Portal::Forma::Plot::Source:

Public Member Functions

Sourceas (std::string name, uint64_t count, Kakshya::DataDimension::Role role, Kakshya::DataModality modality)
 Add a named series and record its index for the next with() call.
 
std::shared_ptr< Kakshya::PlotContainerbuild ()
 Finalise and return the constructed container.
 
Sourcefrom (std::function< void(std::vector< double > &)> fn)
 Bind a callable to the last series added by as().
 
Sourcefrom (std::shared_ptr< Buffers::AudioBuffer > buf)
 Bind an AudioBuffer to the last series added by as().
 
Sourcefrom (std::shared_ptr< Nodes::Network::NodeNetwork > net)
 Bind a NodeNetwork to the last series added by as().
 
Sourcefrom (std::shared_ptr< Nodes::Node > node)
 Bind a Node to the last series added by as().
 
 Source ()
 

Private Attributes

std::shared_ptr< Kakshya::PlotContainerm_container
 
uint32_t m_last_index { 0 }
 

Detailed Description

Chainable builder for PlotContainer construction.

Eliminates manual container creation, index threading, and mark_ready_for_processing() calls. .as() adds a series and records its index; the following .with() binds a source to it. Pairs may be chained indefinitely. Call .build() as the terminal to obtain the container.

auto container = Source()
.as("fm_sine", 512, Role::SPATIAL_Y, DataModality::AUDIO_1D).with(sine)
.as("mod", 512, Role::SPATIAL_Y, DataModality::AUDIO_1D).with(mod)
.build();

Definition at line 38 of file PlotSource.hpp.


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