Coverage Report

Created: 2026-02-09 06:05

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/CMake/Source/cmDebuggerVariablesManager.h
Line
Count
Source
1
/* Distributed under the OSI-approved BSD 3-Clause License.  See accompanying
2
   file LICENSE.rst or https://cmake.org/licensing for details.  */
3
#pragma once
4
5
#include "cmConfigure.h" // IWYU pragma: keep
6
7
#include <cstdint>
8
#include <functional>
9
#include <unordered_map>
10
11
#include <cm3p/cppdap/protocol.h>
12
#include <cm3p/cppdap/types.h>
13
14
namespace cmDebugger {
15
16
class cmDebuggerVariablesManager
17
{
18
  std::unordered_map<
19
    int64_t,
20
    std::function<dap::array<dap::Variable>(dap::VariablesRequest const&)>>
21
    VariablesHandlers;
22
  void RegisterHandler(
23
    int64_t id,
24
    std::function<dap::array<dap::Variable>(dap::VariablesRequest const&)>
25
      handler);
26
  void UnregisterHandler(int64_t id);
27
  friend class cmDebuggerVariables;
28
29
public:
30
0
  cmDebuggerVariablesManager() = default;
31
  dap::array<dap::Variable> HandleVariablesRequest(
32
    dap::VariablesRequest const& request);
33
};
34
35
} // namespace cmDebugger