55 Wiring& every(
double interval_seconds);
61 Wiring& for_duration(
double seconds);
101 Wiring& position_from(PositionFn fn);
123 Wiring& use(SoundFactory factory);
124 Wiring& use(GraphicsFactory factory);
125 Wiring& use(ComplexFactory factory);
126 Wiring& use(EventFactory factory);
150 Wiring& bind(std::function<
void()> fn);
158 Wiring& bind(std::function<
void()> attach, std::function<
void()> detach);
164 Wiring& bind(std::string attach_name, std::function<
void()> attach,
165 std::string detach_name, std::function<
void()> detach);
190 , m_entity_id(entity_id)
222 using Trigger = std::variant<std::monostate, KeyTrigger, MouseTrigger, NetworkTrigger, EventTrigger>;
223 using Factory = std::variant<std::monostate, SoundFactory, GraphicsFactory, ComplexFactory>;
226 std::string make_name(
const char* prefix)
const;
229 bool m_has_scheduling {};
236 size_t m_times { 1 };
263 [[nodiscard]] uint32_t entity_id()
const {
return m_entity_id; }
266 [[nodiscard]] std::optional<double>
interval()
const {
return m_interval; }
269 [[nodiscard]] std::optional<double>
duration()
const {
return m_duration; }
275 [[nodiscard]]
const std::vector<MoveStep>&
move_steps()
const {
return m_move_steps; }
290 [[nodiscard]]
bool has_bind()
const {
return m_bind_attach.has_value(); }
299 [[nodiscard]]
const std::string&
factory_name()
const {
return m_factory_name; }
std::optional< size_t > times
Orchestrates spatial indexing and scheduling for Nexus objects.
std::optional< std::function< void()> > m_bind_detach
bool has_position_fn() const
True if position_from was called.
const Trigger & trigger() const
Active trigger variant set by on.
std::string m_position_fn_name
bool has_bind_detach() const
True if bind(attach, detach) was called.
std::string m_bind_attach_name
std::variant< std::monostate, KeyTrigger, MouseTrigger, NetworkTrigger, EventTrigger > Trigger
const std::string & position_fn_name() const
Name of the position function, empty if anonymous.
const std::string & bind_attach_name() const
Name of the bind attach function, empty if anonymous or none.
const std::string & factory_name() const
Name of the active factory, empty if anonymous or none.
Wiring(Wiring &&) noexcept=default
const EFactory & event_factory() const
Active event-factory, if use(EventFactory) was called.
std::function< glm::vec3()> PositionFn
std::optional< std::function< void()> > m_bind_attach
const std::vector< MoveStep > & move_steps() const
Choreography steps from move_to calls.
std::optional< double > m_duration
std::function< Vruta::ComplexRoutine(Vruta::TaskScheduler &)> ComplexFactory
std::function< Vruta::GraphicsRoutine(Vruta::TaskScheduler &)> GraphicsFactory
std::optional< EventFactory > EFactory
Wiring & operator=(const Wiring &)=delete
std::function< Vruta::Event(Vruta::TaskScheduler &)> EventFactory
const std::string & bind_detach_name() const
Name of the bind detach function, empty if anonymous or none.
std::optional< double > m_interval
const Factory & factory() const
Active factory variant set by use for non-Event factories.
bool has_bind() const
True if any bind overload was called.
std::optional< double > interval() const
Recurring interval in seconds, if every was called.
std::optional< double > duration() const
Active duration in seconds, if for_duration was called.
Wiring(const Wiring &)=delete
std::string m_bind_detach_name
std::variant< std::monostate, SoundFactory, GraphicsFactory, ComplexFactory > Factory
std::vector< MoveStep > m_move_steps
std::string m_factory_name
size_t times_count() const
Repetition count set by times, default 1.
std::function< Vruta::SoundRoutine(Vruta::TaskScheduler &)> SoundFactory
std::optional< PositionFn > m_position_fn
Wiring(Fabric &fabric, uint32_t entity_id)
Fluent builder that wires an entity into Fabric's scheduling infrastructure.
Multi-domain coroutine that can handle multiple processing rates.
Awaitable event stream for window events.
Coroutine type for event-driven suspension.
A C++20 coroutine-based graphics processing task with frame-accurate timing.
Awaitable broadcast message stream for a network endpoint.
A C++20 coroutine-based audio processing task with sample-accurate timing.
Token-based multimodal task scheduling system for unified coroutine processing.
MouseButtons
Enumeration for mouse buttons.
Vruta::EventFilter filter
Vruta::EventSource * source
std::shared_ptr< Core::Window > window
std::shared_ptr< Core::Window > window
Vruta::NetworkSource * source
Filter criteria for window events.