/* ======================================== Copyright (C) 2025, Amlal El Mahrouss, licensed under the Apache 2.0 license. ======================================== */ #ifndef __NE_KIT_VETTABLE_H__ #define __NE_KIT_VETTABLE_H__ #include #include #define NE_VETTABLE \ final: \ public \ ::Kernel::IVettable namespace Kernel { struct IVettable { explicit IVettable() = default; virtual ~IVettable() = default; NE_COPY_DEFAULT(IVettable) }; template struct Vettable final { using ResultType = Type; static constexpr BOOL kValue = NO; }; template <> struct Vettable final { static constexpr BOOL kValue = YES; }; template using FallbackType = Void (*)(const PropertyResult& type_value); template OnFallback> concept IsVettable = requires() { { Vettable::kValue ? TrueResult{} : OnFallback(PropertyResult{}) }; }; } // namespace Kernel #endif // !__NE_KIT_VETTABLE_H__