| OSSIA
    Open Scenario System for Interactive Application | 
The time_interval class. More...
The time_interval class.
time_interval is use to describe temporal structure precising which amount of time (the duration) are between two #time_events.
The duration can be fixed or between a minimal and a maximal duration.
time_interval is a #TimeProcess container.
| Public Types | |
| using | exec_callback = std::optional< smallfun::function< void(bool, ossia::time_value), 32 > > | 
| to get the interval execution back | |
| Public Member Functions | |
| auto | get_date () const noexcept | 
| auto | get_offset () const noexcept | 
| double | get_internal_speed () const noexcept | 
| double | get_speed (time_value date) const noexcept | 
| void | set_offset (ossia::time_value g) noexcept | 
| void | set_speed (double g) noexcept | 
| void | set_parent_speed (double sp) noexcept | 
| tick_transport_info | current_transport_info () const noexcept | 
| void | tick_current (ossia::time_value offset, const ossia::token_request &parent_request) | 
| void | tick (ossia::time_value, const ossia::token_request &parent_request, double ratio=1.0) | 
| void | tick_offset (ossia::time_value, ossia::time_value offset, const ossia::token_request &parent_request) | 
| void | tick_offset_speed_precomputed (ossia::time_value, ossia::time_value offset, const ossia::token_request &parent_request) | 
| time_interval (time_interval::exec_callback, time_event &, time_event &, time_value=Infinite, ossia::time_value=Zero, ossia::time_value=Infinite) | |
| ~time_interval () | |
| destructor | |
| void | start () | 
| start time_interval | |
| void | start_and_tick () | 
| void | stop () | 
| stop time_interval | |
| void | pause () | 
| start time_interval | |
| void | resume () | 
| stop time_interval | |
| void | offset (ossia::time_value) | 
| set time_interval's offset and process a state at offset date | |
| void | transport (ossia::time_value) | 
| void | set_callback (exec_callback) | 
| sets a new callback for the interval | |
| void | set_callback (smallfun::function< void(bool, ossia::time_value), 32 >) | 
| const time_value & | get_nominal_duration () const | 
| get the time_interval nominal duration | |
| time_interval & | set_nominal_duration (ossia::time_value) | 
| set the time_interval duration | |
| const time_value & | get_min_duration () const | 
| get the time_interval minimal duration | |
| time_interval & | set_min_duration (ossia::time_value) | 
| set the time_interval minimal duration | |
| const time_value & | get_max_duration () const | 
| get the time_interval maximal duration | |
| time_interval & | set_max_duration (ossia::time_value) | 
| set the time_interval maximal duration | |
| time_event & | get_start_event () const | 
| get the event from where the time_interval starts | |
| time_event & | get_end_event () const | 
| get the event from where the time_interval starts | |
| void | add_time_process (std::shared_ptr< time_process >) | 
| add a #TimeProcess | |
| void | remove_time_process (time_process *) | 
| remove a #TimeProcess | |
| void | reserve_processes (std::size_t sz) | 
| const std::vector< std::shared_ptr< time_process > > & | get_time_processes () const | 
| get time processes attached to the time_interval | |
| bool | running () const noexcept | 
| void | cleanup () | 
| void | mute (bool) | 
| void | set_time_signature_map (std::optional< time_signature_map > map) | 
| void | set_quarter_duration (double tu) | 
| Static Public Member Functions | |
| static std::shared_ptr< time_interval > | create (time_interval::exec_callback, time_event &, time_event &, time_value=Infinite, ossia::time_value=Zero, ossia::time_value=Infinite) | 
| constructor | |
| Public Attributes | |
| bool | graphal {} | 
| using ossia::time_interval::exec_callback = std::optional<smallfun::function<void(bool, ossia::time_value), 32> > | 
to get the interval execution back
| const | #TimeValue position | |
| const | #TimeValue date | |
| std::shared_ptr< | State> | 
| 
 | static | 
constructor
by default a time_interval has an infinite duration with no minimal duration and an infinite maximal duration.
| time_interval::ExecutionCallback | to use to be notified at each step | |
| std::shared_ptr<TimeEvent> | event where the time_interval starts | |
| std::shared_ptr<TimeEvent> | event where the time_interval ends | |
| const | #TimeValue& nominal duration of the time_interval | |
| const | #TimeValue& minimal duration of the time_interval | |
| const | #TimeValue& maximal duration of the time_interval | 
| void ossia::time_interval::offset | ( | ossia::time_value | date | ) | 
set time_interval's offset and process a state at offset date
the returned #State is made of as many as sub States for each TimeProcess the time_interval manages
don't call offset when the time_interval is running
| const | #TimeValue offset date | 
| void ossia::time_interval::set_callback | ( | time_interval::exec_callback | cb | ) | 
sets a new callback for the interval
| time_interval::ExecutionCallback | to use to be notified at each step | 
| const time_value & ossia::time_interval::get_nominal_duration | ( | ) | const | 
get the time_interval nominal duration
| time_interval & ossia::time_interval::set_nominal_duration | ( | ossia::time_value | durationNominal | ) | 
set the time_interval duration
| const | #TimeValue& duration | 
| const time_value & ossia::time_interval::get_min_duration | ( | ) | const | 
get the time_interval minimal duration
| time_interval & ossia::time_interval::set_min_duration | ( | ossia::time_value | durationMin | ) | 
set the time_interval minimal duration
| const | #TimeValue& minimal duration | 
| const time_value & ossia::time_interval::get_max_duration | ( | ) | const | 
get the time_interval maximal duration
| time_interval & ossia::time_interval::set_max_duration | ( | ossia::time_value | durationMax | ) | 
set the time_interval maximal duration
| const | #TimeValue& maximal duration | 
| time_event & ossia::time_interval::get_start_event | ( | ) | const | 
get the event from where the time_interval starts
| time_event & ossia::time_interval::get_end_event | ( | ) | const | 
get the event from where the time_interval starts
| void ossia::time_interval::add_time_process | ( | std::shared_ptr< time_process > | timeProcess | ) | 
add a #TimeProcess
it also stores the #TimeProcess's start and end #States into the time_interval's start and end #time_events
| std::shared_ptr< | TimeProcess> | to insert | 
| void ossia::time_interval::remove_time_process | ( | time_process * | timeProcess | ) | 
remove a #TimeProcess
it also removes the #TimeProcess's start and end #States from the time_interval's start and end #time_events
| std::shared_ptr< | TimeProcess> | to insert | 
| 
 | inline | 
get time processes attached to the time_interval