scaffolder: auto-wire fn_table_viz in new C++ apps (issue 0081-M)
- CMakeLists.txt template: adds target_link_libraries fn_table_viz with if(TARGET fn_table_viz) guard (compiles even without vendor/lua). - main.cpp template: adds commented include + data_table::render() panel block in render(). Also fixes include to use app_base.h + panel_menu.h (matching convention of chart_demo, shaders_lab). - app.md template: uses_functions lists all 12 fn_table_viz stack IDs commented out; uncomment when activating data_table::render(). - Bump version 0.1.0 -> 1.1.0. Add capability growth log entry. - Tag cpp-tables added to capability group. - Verified: test app test_scaffolder_default compiled clean, residues removed (dir + CMakeLists entry). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -69,9 +69,11 @@ init_cpp_app() {
|
||||
# ---------- main.cpp ----------
|
||||
cat > "$abs_dir/main.cpp" <<EOF
|
||||
#include <imgui.h>
|
||||
#include "framework/app_base.h"
|
||||
#include "app_base.h"
|
||||
#include "core/panel_menu.h"
|
||||
#include "core/icons_tabler.h"
|
||||
#include "core/logger.h"
|
||||
// #include "viz/data_table.h" // uncomment to enable data_table::render() panel
|
||||
|
||||
// Toggles de paneles (visibles desde el menu View del menubar canonico)
|
||||
static bool g_show_main = true;
|
||||
@@ -90,6 +92,11 @@ static void render() {
|
||||
// DockSpaceOverViewport central (auto_dockspace=true por defecto).
|
||||
// Aqui solo se dibujan los paneles propios de la app.
|
||||
if (g_show_main) draw_main();
|
||||
|
||||
// === Data panel (uncomment to enable) ===
|
||||
// static data_table::State data_state;
|
||||
// static std::vector<data_table::TableInput> data_tables; // populate from your source
|
||||
// data_table::render("main_data", data_tables, data_state);
|
||||
}
|
||||
|
||||
int main(int /*argc*/, char** /*argv*/) {
|
||||
@@ -115,6 +122,12 @@ add_imgui_app($name
|
||||
)
|
||||
target_include_directories($name PRIVATE \${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
||||
# fn_table_viz: provides data_table::render(), viz_render, TQL engine, Lua, LLM.
|
||||
# Guard keeps the app compilable in builds where vendor/lua is absent.
|
||||
if(TARGET fn_table_viz)
|
||||
target_link_libraries($name PRIVATE fn_table_viz)
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
set_target_properties($name PROPERTIES WIN32_EXECUTABLE TRUE)
|
||||
endif()
|
||||
@@ -135,7 +148,20 @@ lang: cpp
|
||||
domain: $domain
|
||||
description: "$desc"
|
||||
tags: $tags_yaml
|
||||
uses_functions: []
|
||||
uses_functions:
|
||||
# Uncomment when using data_table::render() — provided via fn_table_viz:
|
||||
# - data_table_cpp_viz
|
||||
# - viz_render_cpp_viz
|
||||
# - compute_stage_cpp_core
|
||||
# - compute_pipeline_cpp_core
|
||||
# - compute_column_stats_cpp_core
|
||||
# - auto_detect_type_cpp_core
|
||||
# - tql_emit_cpp_core
|
||||
# - tql_apply_cpp_core
|
||||
# - lua_engine_cpp_core
|
||||
# - join_tables_cpp_core
|
||||
# - tql_to_sql_cpp_core
|
||||
# - llm_anthropic_cpp_core
|
||||
uses_types: []
|
||||
framework: "imgui"
|
||||
entry_point: "main.cpp"
|
||||
|
||||
Reference in New Issue
Block a user