Files
fn_registry/cpp/framework/app_modules.h
T

33 lines
904 B
C++

// Module manifest visible to fn_framework's About panel.
//
// Each app gets an auto-generated <app>_modules_generated.cpp (codegen via
// python/functions/infra/codegen_app_modules.py, invoked by add_imgui_app at
// CMake configure time) that defines the array + count below from the app's
// `uses_modules:` declaration in its app.md.
//
// Apps without uses_modules still get a stub array of length 0 — links cleanly.
//
// Framework reads via:
//
// for (size_t i = 0; i < fn::app_modules_count; ++i) {
// const auto& m = fn::app_modules_array[i];
// ImGui::Text("%s v%s — %s", m.name, m.version, m.description);
// }
#pragma once
#include <cstddef>
namespace fn {
struct ModuleInfo {
const char* name;
const char* version;
const char* description;
};
extern const ModuleInfo app_modules_array[];
extern const unsigned long app_modules_count;
} // namespace fn