#pragma once // IWYU pragma: private, include "rlbox.hpp" // IWYU pragma: friend "rlbox_.*\.hpp" namespace rlbox { template class tainted_opaque { private: T data{ 0 }; public: template void set_zero() { data = 0; } }; template class tainted; template class tainted_volatile; class tainted_boolean_hint; class tainted_int_hint; template class rlbox_sandbox; template class sandbox_callback; template class app_pointer; class rlbox_noop_sandbox; class rlbox_dylib_sandbox; } #define RLBOX_DEFINE_BASE_TYPES_FOR(SBXNAME, SBXTYPE) \ namespace rlbox { \ class rlbox_##SBXTYPE##_sandbox; \ } \ using rlbox_##SBXNAME##_sandbox_type = rlbox::rlbox_##SBXTYPE##_sandbox; \ using rlbox_sandbox_##SBXNAME = \ rlbox::rlbox_sandbox; \ template \ using sandbox_callback_##SBXNAME = \ rlbox::sandbox_callback; \ template \ using tainted_##SBXNAME = rlbox::tainted; \ template \ using tainted_opaque_##SBXNAME = \ rlbox::tainted_opaque; \ template \ using tainted_volatile_##SBXNAME = \ rlbox::tainted_volatile; \ using rlbox::tainted_boolean_hint; \ template \ using app_pointer_##SBXNAME = \ rlbox::app_pointer; // This is like RLBOX_DEFINE_BASE_TYPES_FOR but with an explicit sandbox type #define RLBOX_DEFINE_BASE_TYPES_FOR_TYPE(SBXNAME, SBXTYPE) \ using rlbox_##SBXNAME##_sandbox_type = SBXTYPE; \ using rlbox_sandbox_##SBXNAME = \ rlbox::rlbox_sandbox; \ template \ using sandbox_callback_##SBXNAME = \ rlbox::sandbox_callback; \ template \ using tainted_##SBXNAME = rlbox::tainted; \ template \ using tainted_opaque_##SBXNAME = \ rlbox::tainted_opaque; \ template \ using tainted_volatile_##SBXNAME = \ rlbox::tainted_volatile; \ using rlbox::tainted_boolean_hint; \ template \ using app_pointer_##SBXNAME = \ rlbox::app_pointer;