MayaFlux 0.4.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ add()

Layer::Slot MayaFlux::Portal::Forma::Surface::add ( Element  element)
inline

Forward an Element to layer().add() and return the Slot.

Pure passthrough. Present so that existing patterns like

const uint32_t id = layer->add(std::move(el)).relate_to(parent).id();
uint32_t id() const noexcept
Explicit id accessor, for clarity in chained expressions.
Definition Layer.hpp:70
Slot & relate_to(uint32_t primary_id)
Record that this element belongs with primary_id.
Definition Layer.hpp:83
Slot add(Element element)
Add an element to the layer.
Definition Layer.cpp:9
Layer & layer() noexcept
Access the spatial registry.
Definition Surface.hpp:107

read as

const uint32_t id = surface.add(std::move(el)).relate_to(parent).id();

without forcing the caller to reach through layer() at every step.

Definition at line 158 of file Surface.hpp.

158{ return m_layer->add(std::move(element)); }
std::shared_ptr< Layer > m_layer
Definition Surface.hpp:162