ProcessFlags.hpp
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 
4 #include <cinttypes>
5 namespace Process
6 {
7 class ProcessModel;
8 class ProcessModelFactory;
9 class LayerFactory;
10 class EffectFactory;
11 
12 #define SCORE_FLAG(i) (1 << i)
16 enum ProcessFlags : int64_t
17 {
19  SupportsTemporal = SCORE_FLAG(0),
20 
22  TimeIndependent = SCORE_FLAG(1),
23 
25  SupportsState = SCORE_FLAG(2),
26 
28  RequiresCustomData = SCORE_FLAG(3),
29 
31  PutInNewSlot = SCORE_FLAG(4),
32 
34  HandlesLooping = SCORE_FLAG(5),
35 
37  ControlSurface = SCORE_FLAG(6),
38 
40  FullyCustomItem = SCORE_FLAG(7),
41 
44  CanCreateControls = SCORE_FLAG(8),
45 
47  CreateControls = SCORE_FLAG(9),
48 
50  Snapshottable = SCORE_FLAG(10),
51 
53  Recordable = SCORE_FLAG(11),
54 
55  SupportsLasting = SupportsTemporal | TimeIndependent,
56  ExternalEffect
59 };
60 
61 constexpr ProcessFlags operator|(ProcessFlags a, ProcessFlags b) noexcept
62 {
63  return ProcessFlags((int64_t)a | (int64_t)b);
64 }
65 
66 constexpr ProcessFlags operator|=(ProcessFlags& a, ProcessFlags b) noexcept
67 {
68  return a = a | b;
69 }
70 
75 class ProcessFlags_k;
76 }
Metadata to retrieve the ProcessFlags of a process.
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
ProcessFlags
Various settings for processes.
Definition: ProcessFlags.hpp:17
@ ControlSurface
The process supports being exposed to the ControlSurface.
Definition: ProcessFlags.hpp:37
@ SupportsState
Can be loaded in a state.
Definition: ProcessFlags.hpp:25
@ HandlesLooping
The presenter / view already handles rendering when the model loops.
Definition: ProcessFlags.hpp:34
@ Snapshottable
The process is snapshottable.
Definition: ProcessFlags.hpp:50
@ CreateControls
The process is currently creating new controls (the runtime state changed by the user)
Definition: ProcessFlags.hpp:47
@ SupportsTemporal
Can be loaded as a process of an interval.
Definition: ProcessFlags.hpp:19
@ Recordable
The process is recordable.
Definition: ProcessFlags.hpp:53
@ CanCreateControls
Definition: ProcessFlags.hpp:44
@ PutInNewSlot
When created in an interval, go on the top slot or in a new slot.
Definition: ProcessFlags.hpp:31
@ FullyCustomItem
The process's item handles all the decoration (won't be title, etc)
Definition: ProcessFlags.hpp:40
@ RequiresCustomData
Action from the user required upon creation.
Definition: ProcessFlags.hpp:28
@ TimeIndependent
The process won't change if the parent duration changes (eg it's a filter)
Definition: ProcessFlags.hpp:22