using System; using System.Runtime.CompilerServices; namespace DCFApixels.DragonECS { public interface IEcsReadonlyTable { #region Properties /// Table Archetype public Type ArchetypeType { get; } public int Count { get; } public int Capacity { get; } #endregion #region Methods public EcsPool GetPool() where T : struct; public ReadOnlySpan GetAllPools(); public TQuery Query(out TQuery query) where TQuery : EcsQueryBase; public int GetComponentID(); public bool IsMaskCompatible(int entityID) where TInc : struct, IInc where TExc : struct, IExc; public bool IsMaskCompatible(EcsComponentMask mask, int entityID); public bool IsMaskCompatibleWithout(EcsComponentMask mask, int entity, int componentID); #endregion #region Internal Methods internal void RegisterGroup(EcsGroup group); #endregion } public static class IEcsReadonlyTableExtensions { [MethodImpl(MethodImplOptions.AggressiveInlining)] public static bool IsMaskCompatible(this IEcsReadonlyTable self, int entityID) where TInc : struct, IInc { return self.IsMaskCompatible(entityID); } } }