game_assert_targets.h 813 B

123456789101112131415161718192021222324
  1. #pragma once
  2. #include <span>
  3. #include "../../../patterns/registry.h"
  4. #include "../assert_handler.h"
  5. namespace sunrise::client::targets::game::assert_handler {
  6. // clang-format off
  7. /**
  8. * Derives the assert handler setter and slot from the setter copies and the assert sites that read
  9. * it.
  10. * @param image Executable ranges from the main game image.
  11. * @param output Receives the setter, slot and handler currently installed in it.
  12. * @return True when one candidate wins the vote by the required margin.
  13. */
  14. // clang-format on
  15. [[nodiscard]] bool derive(std::span<const patterns::ImageRange> image, Targets& output) noexcept;
  16. /** @param targets Validated assert table published without failure. */
  17. void publish(const Targets& targets) noexcept;
  18. } // namespace sunrise::client::targets::game::assert_handler