#pragma once #include "Gallery_Plots_2D.hpp" #include "Gallery_Plots_3D.hpp" #include #include #include #include namespace aethera::web { enum struct Plot_Dimension : std::uint8_t { two_d, three_d }; struct Plot_Definition { std::string_view id; /* 协议和路由使用的稳定标识。 */ std::string_view title; /* 前端直接展示的业务名称。 */ std::string_view category; /* Catalog 分组名称。 */ std::string_view description; /* Plot 能力说明。 */ Plot_Dimension dimension{Plot_Dimension::two_d}; /* 渲染后端维度。 */ std::shared_ptr (*create)(); /* 创建该 Plot 唯一实例的工厂。 */ }; [[nodiscard]] std::span gallery_plot_definitions() noexcept; [[nodiscard]] const Plot_Definition* find_gallery_plot_definition(std::string_view id) noexcept; [[nodiscard]] std::string_view plot_dimension_name( Plot_Dimension dimension) noexcept; }