|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
Base class for all coroutine types in the MayaFlux engine. More...
#include <Routine.hpp>
Inheritance diagram for MayaFlux::Vruta::Routine:
Collaboration diagram for MayaFlux::Vruta::Routine:Public Member Functions | |
| virtual | ~Routine ()=default |
| Destructor. | |
| virtual ProcessingToken | get_processing_token () const =0 |
| Get the processing token that determines how this routine should be scheduled. | |
| virtual bool | initialize_state (uint64_t current_context=0U)=0 |
| Initializes the coroutine's state for execution. | |
| virtual bool | is_active () const =0 |
| Checks if the coroutine is still active. | |
| virtual uint64_t | next_execution () const =0 |
| Gets the sample position when this routine should next execute. | |
| virtual bool | try_resume (uint64_t current_context)=0 |
| Attempts to resume the coroutine if it's ready to execute. | |
| virtual bool | try_resume_with_context (uint64_t current_value, DelayContext) |
| Attempts to resume the coroutine with explicit temporal context. | |
| virtual bool | requires_clock_sync () const =0 |
| Check if the routine should synchronize with a clock. | |
| virtual bool | restart ()=0 |
| Restarts the coroutine from the beginning. | |
| virtual bool | get_auto_resume () const =0 |
| Get auto_resume flag from promise. | |
| virtual void | set_auto_resume (bool auto_resume)=0 |
| Set auto_resume flag in promise. | |
| virtual bool | get_should_terminate () const =0 |
| Get should_terminate flag from promise. | |
| virtual void | set_should_terminate (bool should_terminate)=0 |
| Set should_terminate flag in promise. | |
| virtual bool | get_sync_to_clock () const =0 |
| Get sync_to_clock flag from promise. | |
| virtual uint64_t | get_next_sample () const =0 |
| Get next sample execution time (audio domain) | |
| virtual void | set_next_sample (uint64_t next_sample)=0 |
| Set next sample execution time (audio domain) | |
| virtual uint64_t | get_next_frame () const =0 |
| Get next frame execution time (graphics domain) | |
| virtual void | set_next_frame (uint64_t next_frame)=0 |
| Set next frame execution time (graphics domain) | |
| virtual DelayContext | get_delay_context () const |
| Get the active delay context for this routine. | |
| virtual void | set_delay_context (DelayContext) |
| Set the active delay context for this routine. | |
| template<typename... Args> | |
| void | update_params (Args... args) |
| Updates multiple named parameters in the coroutine's state. | |
| template<typename T > | |
| void | set_state (const std::string &key, T value) |
| Sets a named state value in the coroutine. | |
| template<typename T > | |
| T * | get_state (const std::string &key) |
| Gets a named state value from the coroutine. | |
Protected Member Functions | |
| virtual void | set_state_impl (const std::string &key, std::any value)=0 |
| virtual void * | get_state_impl_raw (const std::string &key)=0 |
| template<typename T > | |
| T * | get_state_impl (const std::string &key) |
| Implementation helper for get_state. | |
| virtual void | update_params_impl () |
| brief Implementation helper for update_params | |
| template<typename T , typename... Args> | |
| void | update_params_impl (const std::string &key, T value, Args... args) |
| Implementation helper for update_params. | |
Base class for all coroutine types in the MayaFlux engine.
This abstract base class provides the common interface and functionality for all types of coroutines, regardless of their processing domain. It enables polymorphic handling of different routine types while maintaining type safety through the template-based promise system.
Definition at line 16 of file Routine.hpp.