MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches
MayaFlux::Nexus::Tapestry Class Reference

Owner of one or more Fabrics and the shared state they rely on. More...

#include <Tapestry.hpp>

+ Collaboration diagram for MayaFlux::Nexus::Tapestry:

Public Member Functions

const std::vector< std::shared_ptr< Fabric > > & all_fabrics () const
 All woven Fabrics, named and unnamed.
 
void commit_all ()
 Commit all woven Fabrics in insertion order.
 
std::shared_ptr< Fabriccreate_fabric (float cell_size=1.0F)
 create_fabric a new unnamed Fabric into the Tapestry.
 
std::shared_ptr< Fabriccreate_fabric (std::string name, float cell_size=1.0F)
 create_fabric a new named Fabric into the Tapestry.
 
std::shared_ptr< Fabricget_fabric (std::string_view name) const
 Look up a named Fabric.
 
Tapestryoperator= (const Tapestry &)=delete
 
Tapestryoperator= (Tapestry &&)=delete
 
void remove_fabric (const std::shared_ptr< Fabric > &fabric)
 Remove a Fabric by pointer.
 
void remove_fabric (std::string_view name)
 Remove a Fabric by name.
 
 Tapestry (const Tapestry &)=delete
 
 Tapestry (std::shared_ptr< Vruta::TaskScheduler > scheduler, std::shared_ptr< Vruta::EventManager > event_manager)
 Construct with shared scheduler and event manager.
 
 Tapestry (Tapestry &&)=delete
 
 ~Tapestry ()
 

Private Attributes

std::shared_ptr< Vruta::EventManagerm_event_manager
 
std::vector< std::shared_ptr< Fabric > > m_fabrics
 
std::unordered_map< std::string, std::weak_ptr< Fabric > > m_named_fabrics
 
std::shared_ptr< Vruta::TaskSchedulerm_scheduler
 

Detailed Description

Owner of one or more Fabrics and the shared state they rely on.

A Tapestry holds shared_ptrs to the TaskScheduler and EventManager each Fabric needs, and serves as the authoring-surface layer above raw Fabric construction. Fabrics woven through a Tapestry can be looked up by name for state encoding, cross-fabric queries, and coordinated commits.

Tapestry holds owning references to the scheduler and event manager so that every Fabric it create_fabrics is guaranteed a valid backing for the Tapestry's lifetime.

Definition at line 25 of file Tapestry.hpp.


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