MayaFlux 1.0.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ tasks()

InspectResult MayaFlux::Portal::Forma::Inspector::tasks ( Vruta::ProcessingToken  token,
Surface &  surface,
LayoutCursor &  cursor,
float  x_min = -0.95F,
float  x_max = 0.95F,
float  row_h = 0.05F 
)

Inspect tasks for a specific processing token.

Same per-task layout as scheduler() but filtered to one token.

Definition at line 97 of file SchedulerQuery.cpp.

102{
103 const std::string header_label = "TaskScheduler ["
104 + std::string(Reflect::enum_to_string(token)) + "]";
105
106 auto hbuf = make_header_buffer(surface.window());
107 auto root_group = make_entry_group({}, header_label, std::move(hbuf), {},
108 surface, cursor, x_min, x_max, row_h, true);
109
110 InspectResult result;
111 result.group = std::move(root_group);
112
113 const auto all = m_sched.get_all_tasks();
114 for (const auto& entry : all) {
115 if (!entry.routine)
116 continue;
117 if (entry.routine->get_processing_token() != token)
118 continue;
119
120 auto task_result = inspect_task(
121 entry, surface, cursor,
122 x_min, x_max, row_h);
123
124 result.group.header.attach(surface.layer(), task_result.group.header.header_id);
125 result.children.push_back(std::move(task_result));
126 }
127
128 return result;
129}
std::shared_ptr< Buffers::FormaBuffer > make_header_buffer(const std::shared_ptr< Core::Window > &window) const
A "text"-slotted buffer, registered with the BufferManager.
Definition Inspector.cpp:11
InspectResult inspect_task(const Vruta::TaskEntry &entry, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h)
Vruta::TaskScheduler & m_sched
const std::vector< TaskEntry > & get_all_tasks()
Get all tasks for inspection/debugging.
EntryGroup make_entry_group(std::span< const EntrySpec > entrys, std::string_view header_label, FormaTarget header_buf, std::span< const EntryBuffer > row_bufs, Surface &surface, LayoutCursor &cursor, float x_min, float x_max, float row_h, bool initially_open)
Construct a collapsible header followed by N entry rows under it.
Definition Entry.cpp:104
constexpr std::string_view enum_to_string(EnumType value) noexcept
Universal enum to string converter using magic_enum (original case)

References MayaFlux::Reflect::enum_to_string(), MayaFlux::Vruta::TaskScheduler::get_all_tasks(), MayaFlux::Portal::Forma::InspectResult::group, inspect_task(), MayaFlux::Portal::Forma::Surface::layer(), m_sched, MayaFlux::Portal::Forma::make_entry_group(), make_header_buffer(), and MayaFlux::Portal::Forma::Surface::window().

Referenced by scheduler().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: