|
MayaFlux 0.1.0
Digital-First Multimedia Processing Framework
|
#include <EventManager.hpp>
Collaboration diagram for MayaFlux::Vruta::EventManager:Public Member Functions | |
| EventManager ()=default | |
| void | add_event (const std::shared_ptr< Event > &event, const std::string &name="") |
| Add a event to the manager. | |
| bool | remove_event (const std::string &name) |
| Remove an event by name. | |
| std::shared_ptr< Event > | get_event (const std::string &name) const |
| Get a named event. | |
| std::vector< std::shared_ptr< Event > > | get_all_events () const |
| Get all managed events. | |
| bool | cancel_event (const std::shared_ptr< Event > &event) |
| Cancels and removes a event from the manager. | |
| bool | cancel_event (const std::string &name) |
| Cancel a event by name. | |
| template<typename... Args> | |
| bool | update_event_params (const std::string &name, Args &&... args) |
| Update parameters of a named event. | |
| template<typename T > | |
| T * | get_event_state (const std::string &name, const std::string &state_key) const |
| Get event state value by name and key. | |
| template<typename T > | |
| std::function< T()> | create_value_accessor (const std::string &name, const std::string &state_key) const |
| Create value accessor function for named event. | |
| uint64_t | get_next_event_id () const |
| Generates a unique event ID for new events. | |
| bool | has_active_events () const |
| Check if the manager has any active events. | |
| std::vector< std::string > | get_event_names () const |
| Get all event names for debugging/inspection. | |
| void | terminate_all_events () |
| Terminate and clear all events. | |
Private Member Functions | |
| std::string | auto_generate_name (const std::shared_ptr< Event > &event) const |
| Generate automatic name for a event based on its type. | |
| std::shared_ptr< Event > | find_event_by_name (const std::string &name) |
| Find event entry by name. | |
| std::shared_ptr< Event > | find_event_by_name (const std::string &name) const |
| Find event entry by name (const version) | |
| void | cleanup_completed_events () |
| Clean up completed events. | |
Private Attributes | |
| std::atomic< uint64_t > | m_next_event_id { 1 } |
| event ID counter for unique identification | |
| std::vector< std::shared_ptr< Event > > | m_events |
| std::unordered_map< std::string, std::shared_ptr< Event > > | m_named_events |
Definition at line 9 of file EventManager.hpp.