torture.hpp 755 B

12345678910111213141516171819202122232425262728293031
  1. // Torture header for the C++ kernel walker (R7a) — include guard, forward
  2. // declarations (skipped, #1093), extern "C" prototypes, header templates,
  3. // and a UE-reflection-shaped class recovered by the hoisted preParse.
  4. #ifndef TORTURE_HPP
  5. #define TORTURE_HPP
  6. class Forward;
  7. struct Opaque;
  8. extern "C" {
  9. int c_bridge(int value);
  10. }
  11. /// Reusable clamp helper.
  12. template <typename T>
  13. T clamp_value(T v, T lo, T hi) {
  14. return v < lo ? lo : (v > hi ? hi : v);
  15. }
  16. class MYLIB_API Meter : public Forward {
  17. public:
  18. UPROPERTY(BlueprintReadOnly)
  19. int Reading;
  20. FORCEINLINE int Peek() const { return Reading; }
  21. void Calibrate(int target);
  22. Forward *owner();
  23. };
  24. inline void Meter::Calibrate(int target) { Reading = clamp_value(target, 0, 100); }
  25. #endif