/* * SPDX-FileCopyrightText: 2025 Felix Morgner * SPDX-License-Identifier: LGPL-2.1-only */ #ifndef TURNSMM_ENUM_HELPERS_HPP #define TURNSMM_ENUM_HELPERS_HPP #include #include #include #include #define TURNS_DECLARE_ENUM_VALUE_SPECIALIZATION(Enum) \ template<> \ class Value<::Turns::Enum> : public Glib::Value_Enum<::Turns::Enum> \ { \ public: \ auto static value_type() -> GType; \ } #define TURNS_DEFINE_VALUE_SPECIALIZATION(Enum, TurnsEnumName) \ auto Value<::Turns::Enum>::value_type() -> GType \ { \ return ::turns_##TurnsEnumName##_get_type(); \ } namespace Turns { template auto constexpr enum_matches = static_cast>(Wrapped) == static_cast>(Unwrapped); } // namespace Turns #endif