VR-Engage  2.3
Loading...
Searching...
No Matches
debugHelperFunctions.h
Go to the documentation of this file.
1/******************************************************************************
2 * Copyright (c) 2026 MAK Technologies, Inc.
3 * All rights reserved.
4 ******************************************************************************/
5
6#pragma once
7
8//! \file debugHelperFunctions.h
9//! \ingroup vreDebugManager
10//! \brief Shared ImGui attribute-store debug table helper.
11//!
12//! Provides DtRenderAttributeDebugTable(), a reusable utility for rendering
13//! a DtAttribute tree as a collapsible, filterable 9-column ImGui table.
14//! Include this header from any translation unit that needs the debug table UI.
15
17#include "vreUtil/attribute.h"
18
19#include <vrvImgui/imgui.h>
20
21#include <map>
22
23namespace makVre
24{
25
26//! \brief Renders a 9-column ImGui attribute debug table for an attribute subtree.
27//!
28//! Displays the children of \p root as a collapsible tree with columns:
29//! Name, Type, Value, Sets, Changes, Gets, Lookups, Warn, and Trace.
30//! The Trace column is hidden by default and revealed automatically when any
31//! trace checkbox is checked.
32//!
33//! When \p filter contains text, nodes whose leaf name matches are shown with
34//! their ancestors and descendants, keeping each matching subtree intact.
35//! When \p filter is empty the full tree is rendered.
36//!
37//! Handles BeginTable / EndTable internally; the caller must NOT call them.
38//!
39//! \param root Attribute node whose direct children appear as top-level rows.
40//! The root node itself is not rendered.
41//! \param tableId Unique ImGui table ID string. Must be unique within the window.
42//! \param filter Text filter. The caller owns the static instance and calls
43//! filter.Draw() before invoking this function.
44//! \param traceChecks Per-attribute checkbox state for the four traceable stat columns
45//! (Sets=0, Changes=1, Gets=2, Lookups=3). Keyed by std::hash of
46//! each attribute's full path string.
48 const DtAttributeHandle& root,
49 const char* tableId,
50 ImGuiTextFilter& filter,
51 std::map<size_t, bool[4]>& traceChecks);
52
53} // namespace makVre
Provides attribute handling system for hierarchical data storage and manipulation.
Handle class for safe access to attributes.
Definition attributeHandle.h:30
Defines export macros for the VREngage Debug Manager library.
#define DEBUGMANAGER_DLL
Export/import macro for non-Windows platforms.
Definition export.h:40
!
Definition glsVreMessageUtil.h:50
DEBUGMANAGER_DLL void DtRenderAttributeDebugTable(const DtAttributeHandle &root, const char *tableId, ImGuiTextFilter &filter, std::map< size_t, bool[4]> &traceChecks)
Renders a 9-column ImGui attribute debug table for an attribute subtree.