|
OSSIA
Open Scenario System for Interactive Application
|
The time_event class. More...
The time_event class.
time_event is use to describe temporal structure to launch the start or the end of each attached #time_interval.
time_event has a #State and can also be submitted to an expression.
Public Types | |
| enum class | status : uint8_t { NONE = 0b00000000 , PENDING = 0b00000001 , HAPPENED = 0b00000010 , DISPOSED = 0b00000011 , FINISHED = 0b10000000 } |
| event status | |
| enum class | offset_behavior : uint8_t { EXPRESSION_TRUE , EXPRESSION_FALSE , EXPRESSION } |
| The OffsetBehavior enum Describes what happens when a parent scenario does an offset beyond this event. This is useful to make default cases for the scenario. More... | |
| using | exec_callback = std::function< void(status)> |
| to get the event status back | |
Public Member Functions | |
| time_event (time_event::exec_callback, time_sync &aTimeSync, expression_ptr anExpression) | |
| ~time_event () | |
| destructor | |
| void | set_callback (time_event::exec_callback) |
| changes the callback in the event | |
| void | add_time_process (std::shared_ptr< time_process >) |
| void | remove_time_process (time_process *) |
| const auto & | get_time_processes () const |
| void | tick (ossia::time_value date, ossia::time_value offset, double speed) |
| time_sync & | get_time_sync () const |
| get the #time_sync where the event is | |
| void | set_time_sync (time_sync &) |
| const expression & | get_expression () const |
| get the expression of the event | |
| time_event & | set_expression (expression_ptr) |
| set the expression of the event | |
| status | get_status () const |
| get the status of the event | |
| offset_behavior | get_offset_behavior () const |
| getOffsetValue Returns the value of the condition if we are offsetting past this time event. | |
| time_event & | set_offset_behavior (offset_behavior) |
| setOffsetValue Sets the value of the condition if we are offsetting past this time event. | |
| auto & | previous_time_intervals () |
| get previous time constraints attached to the event | |
| const auto & | previous_time_intervals () const |
| get previous time constraints attached to the event | |
| auto & | next_time_intervals () |
| get next time constraints attached to the event | |
| const auto & | next_time_intervals () const |
| get next time constraints attached to the event | |
| void | set_status (status s) |
| void | reset () |
| void | cleanup () |
| void | mute (bool m) |
| using ossia::time_event::exec_callback = std::function<void(status)> |
to get the event status back
| Status | new status |
|
strong |
| void ossia::time_event::set_callback | ( | time_event::exec_callback | callback | ) |
changes the callback in the event
| time_event::ExecutionCallback | to get time_event's status back |
this may be unsafe to do during execution
| time_sync & ossia::time_event::get_time_sync | ( | ) | const |
get the #time_sync where the event is
| const expression & ossia::time_event::get_expression | ( | ) | const |
get the expression of the event
| time_event & ossia::time_event::set_expression | ( | expression_ptr | exp | ) |
set the expression of the event
| std::shared_ptr<expression> |
| time_event::status ossia::time_event::get_status | ( | ) | const |
get the status of the event
|
inline |
get previous time constraints attached to the event
|
inline |
get previous time constraints attached to the event
|
inline |
get next time constraints attached to the event
|
inline |
get next time constraints attached to the event