using System;
using System.Runtime.CompilerServices;
namespace DCFApixels.DragonECS
{
public interface IEcsTable
{
#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);
#endregion
#region Internal Methods
internal void RegisterGroup(EcsGroup group);
#endregion
}
public static class IEcsReadonlyTableExtensions
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsMaskCompatible(this IEcsTable self, int entityID) where TInc : struct, IInc
{
return self.IsMaskCompatible(entityID);
}
}
}