OSSIA
Open Scenario System for Interactive Application
|
The time_process class. More...
Inherited by ossia::looping_process< node_process_raw >, ossia::looping_process< node_chain_process >, ossia::looping_process< scenario >, ossia::looping_process< T >, and ossia::qt::qml_script_process.
The time_process class.
#TimeProcess is the parent class used to describe temporal content.
Public Member Functions | |
virtual | ~time_process () |
destructor | |
void | offset (ossia::time_value date) |
get a #StateElement from the process on its parent #time_interval offset More... | |
void | transport (ossia::time_value date) |
virtual void | state (const ossia::token_request &)=0 |
get a #StateElement from the process depending on its parent #time_interval date More... | |
virtual void | start () |
start More... | |
virtual void | stop () |
stop More... | |
virtual void | pause () |
stop More... | |
virtual void | resume () |
resume More... | |
void | mute (bool m) |
mute Mutes or unmute the process. More... | |
bool | unmuted () const |
True if the process is not currently muted. | |
void | enable (bool m) |
Enables or disable the process. More... | |
bool | enabled () const |
True if the process is enabled. | |
void | set_loops (bool b) |
Enables looping of the process after every loop_duration. | |
void | set_start_offset (time_value v) |
Make the process's data be displaced of v units. | |
void | set_loop_duration (time_value v) |
Set how long a single loop lasts. More... | |
Protected Member Functions | |
virtual void | mute_impl (bool) |
Reimplement this to have a special behaviour on mute. | |
virtual void | offset_impl (ossia::time_value date)=0 |
virtual void | transport_impl (ossia::time_value date)=0 |
Protected Attributes | |
time_value | m_loop_duration {} |
time_value | m_start_offset {} |
bool | m_loops = false |
bool | m_unmuted = true |
bool | m_enabled = true |
void ossia::time_process::offset | ( | ossia::time_value | date | ) |
get a #StateElement from the process on its parent #time_interval offset
don't call offset when the parent #time_interval is running
date | offset date |
pos | offset position (in [0;1] relative to parent nominal duration) |
|
pure virtual |
get a #StateElement from the process depending on its parent #time_interval date
don't call state when the parent #time_interval is not running
|
virtual |
start
Will be called when the parent time interval is started.
|
virtual |
stop
Will be called when the parent time interval is stopped.
|
virtual |
stop
Will be called when the parent time interval is paused.
|
virtual |
resume
Will be called when the parent time interval is resumed.
void ossia::time_process::mute | ( | bool | m | ) |
mute Mutes or unmute the process.
mute(true)
mutes the process. A muted process executes itself but does not send its state.
void ossia::time_process::enable | ( | bool | m | ) |
Enables or disable the process.
Unlike a muted process, a disabled process does not execute at all.
void ossia::time_process::set_loop_duration | ( | time_value | v | ) |
Set how long a single loop lasts.
Only relevant if loops have been enabled.