1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-05-09 23:08:18 +08:00
CMake/Source/cmDebuggerVariablesManager.h
Brad King 241ee252ce IWYU: Update for Debian 12 CI job
`include-what-you-use` diagnostics, in practice, are specific to
the environment's compiler and standard library.  Update includes
to satisfy IWYU for our CI job under Debian 12.
2023-07-28 09:14:08 -04:00

36 lines
916 B
C++

/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#pragma once
#include "cmConfigure.h" // IWYU pragma: keep
#include <cstdint>
#include <functional>
#include <unordered_map>
#include <cm3p/cppdap/protocol.h>
#include <cm3p/cppdap/types.h>
namespace cmDebugger {
class cmDebuggerVariablesManager
{
std::unordered_map<
int64_t,
std::function<dap::array<dap::Variable>(dap::VariablesRequest const&)>>
VariablesHandlers;
void RegisterHandler(
int64_t id,
std::function<dap::array<dap::Variable>(dap::VariablesRequest const&)>
handler);
void UnregisterHandler(int64_t id);
friend class cmDebuggerVariables;
public:
cmDebuggerVariablesManager() = default;
dap::array<dap::Variable> HandleVariablesRequest(
dap::VariablesRequest const& request);
};
} // namespace cmDebugger