3#include <ossia/detail/config.hpp>
5#include <ossia/dataflow/token_request.hpp>
6#include <ossia/dataflow/transport.hpp>
27#if defined(OSSIA_SCENARIO_DATAFLOW)
28 std::shared_ptr<ossia::graph_node> node;
51 virtual void state(
const ossia::token_request&) = 0;
83 virtual void resume();
96 [[nodiscard]]
bool unmuted()
const;
108 [[nodiscard]]
bool enabled()
const;
113 void set_loops(
bool b);
129 virtual void mute_impl(
bool);
135 virtual void transport_impl(
138 (void)transport_info;
139 transport_impl(date);
143 time_value m_start_offset{};
144 bool m_loops =
false;
145 bool m_unmuted =
true;
146 bool m_enabled =
true;
150class looping_process :
public time_process
153 using time_process::time_process;
154 void state(
const ossia::token_request& tok)
override
158 if(this->m_start_offset == 0_tv)
159 static_cast<T*
>(
this)->state_impl(tok);
161 static_cast<T*
>(
this)->state_impl(tok.add_offset(this->m_start_offset));
166 this->m_start_offset, this->m_loop_duration,
167 [
this](
const token_request& tr) {
static_cast<T*
>(
this)->state_impl(tr); },
168 [
this](
const time_value& t) {
static_cast<T*
>(
this)->transport_impl(t); });
173enum class sync_status
The time_process class.
Definition time_process.hpp:25
virtual void state(const ossia::token_request &)=0
get a #StateElement from the process depending on its parent #time_interval date
virtual ~time_process()
destructor
The time_value class.
Definition ossia/editor/scenario/time_value.hpp:30