2#include <Scenario/Document/Components/IntervalComponent.hpp>
3#include <Scenario/Document/Components/ScenarioComponent.hpp>
5#include <LocalTree/ScriptableProcessComponent.hpp>
7#include <ossia/detail/algorithms.hpp>
8#include <ossia/editor/scenario/time_sync.hpp>
10#include <nano_observer.hpp>
26 COMMON_COMPONENT_METADATA(
"eeb9acf5-466a-473d-baf9-861427364dcf")
28 static constexpr bool is_unique =
true;
34 ossia::net::node_base* node()
const noexcept {
return m_node; }
40 void attach(ossia::time_sync* s)
noexcept { m_sync.store(s); }
41 void detach() noexcept
43 m_sync.store(
nullptr);
44 while(m_users.load() != 0)
45 std::this_thread::yield();
47 ossia::time_sync* attached() const noexcept {
return m_sync.load(); }
52 auto sync = m_sync.load();
54 sync->start_trigger_request();
60 std::atomic<ossia::time_sync*> m_sync{};
61 std::atomic_int m_users{};
63 const std::shared_ptr<Execution>& execution() const noexcept {
return m_execution; }
68 ScriptableRoots m_roots;
70 ossia::net::node_base* m_node{};
72 std::unique_ptr<ParameterBinding> m_trigger;
73 std::shared_ptr<Execution> m_execution = std::make_shared<Execution>();
80 COMMON_COMPONENT_METADATA(
"90d9d6d6-9b98-4e2e-9c4b-8d834706472e")
82 static constexpr bool is_unique =
true;
88 ossia::net::node_base* node()
const noexcept {
return m_node; }
95 ossia::net::node_base* m_node{};
103 COMMON_COMPONENT_METADATA(
"b03c26f1-9f6d-4dcd-bdbd-6c63d70eee62")
105 static constexpr bool is_unique =
true;
114 ,
public Nano::Observer
116 COMMON_COMPONENT_METADATA(
"b49b38e4-5b79-4f24-8c58-873d8987b98e")
118 static constexpr bool is_unique =
true;
130 std::vector<std::pair<Process::ProcessModel*, ScriptableProcessBase*>> m_children;
136 COMPONENT_METADATA(
"4084de06-cbb0-4e3c-915f-6337946f37e2")
142 template <
typename Component_T,
typename Element>
143 Component_T* make(Element& elt);
145 template <
typename... Args>
146 bool removing(Args&&...)
150 template <
typename... Args>
151 void removed(Args&&...)
166 SCORE_CONCRETE(
"74f159f0-0ab8-4a3f-bf2a-16a286d95c54")
Definition Scenario/Document/Components/ScenarioComponent.hpp:198
score:/conditions/<name>: a boolean for the event's expression to read.
Definition ScriptableScenarioComponent.hpp:79
Tracks the processes of an interval, and the hierarchy below a scenario.
Definition ScriptableScenarioComponent.hpp:115
Definition ScriptableProcessComponent.hpp:198
For processes containing other processes; others use ScriptableProcessComponent.
Definition ScriptableProcessComponent.hpp:255
Definition ScriptableScenarioComponent.hpp:135
Definition ScriptableScenarioComponent.hpp:165
Registers the state in the ReferenceIndex, since it holds messages.
Definition ScriptableScenarioComponent.hpp:102
score:/triggers/<name>: an impulse that fires the sync.
Definition ScriptableScenarioComponent.hpp:25
Definition Process/ProcessComponent.hpp:34
The Process class.
Definition score-lib-process/Process/Process.hpp:80
Definition EventModel.hpp:36
Definition Scenario/Document/Components/IntervalComponent.hpp:12
Definition IntervalModel.hpp:50
The core hierarchical and temporal process of score.
Definition ScenarioModel.hpp:37
Definition StateModel.hpp:62
Definition TimeSyncModel.hpp:34
A component that has a reference to a specific context object.
Definition lib/score/model/Component.hpp:58
Components used for the execution of a score.
Definition ProcessComponent.cpp:14
Local tree provides a way to extend the tree given through the Engine::Network::LocalDevice.
Definition BaseCallbackWrapper.hpp:9
::State::Address scriptableAddress(const Process::ProcessModel &proc)
score:/controls/<process>[/<port>|/preset]; empty when not published.
Definition ScriptableProcessComponent.cpp:819
Definition ScriptableProcessComponent.hpp:143
Definition ScriptableProcessComponent.hpp:58
void attach(ossia::time_sync *s) noexcept
detach() waits for the triggers in flight; only the GUI thread calls it
Definition ScriptableScenarioComponent.hpp:40
bool trigger() noexcept
False when no execution is attached.
Definition ScriptableScenarioComponent.hpp:49
Definition ObjectMatches.hpp:6
Definition DocumentContext.hpp:18