using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace DCFApixels.DragonECS
{
public interface IEcsReadonlyTable
{
#region Properties
/// Table Archetype
public Type ArchetypeType { get; }
#endregion
#region Methods
public ReadOnlySpan GetAllPools();
public int GetComponentID();
public EcsPool GetPool() where T : struct;
public EcsPool UncheckedGetPool() where T : struct;
public bool IsMaskCompatible(int entity) where TInc : struct, IInc;
public bool IsMaskCompatible(int entity) where TInc : struct, IInc where TExc : struct, IExc;
public bool IsMaskCompatible(EcsMaskBase mask, int entity);
public bool IsMaskCompatibleWithout(EcsMaskBase mask, int entity, int otherPoolID);
#endregion
#region Properties
internal int Count { get; }
internal int Capacity { get; }
#endregion
#region Internal Methods
internal void OnEntityComponentAdded(int entityID, int changedPoolID);
internal void OnEntityComponentRemoved(int entityID, int changedPoolID);
internal void RegisterGroup(EcsGroup group);
#endregion
}
public static class IEcsReadonlyEntityComponentTableExtensions
{
public static bool IsNullOrEmpty(this IEcsReadonlyTable self)
{
return self == null || self.Count <= 0;
}
}
}