using EcsRx.Collections; namespace EcsRx.Components.Database { public interface IComponentDatabase { T Get(int componentTypeId, int allocationIndex) where T : IComponent; ref T GetRef(int componentTypeId, int allocationIndex) where T : IComponent; T[] GetComponents(int componentTypeId) where T : IComponent; void Set(int componentTypeId, int allocationIndex, T component) where T : IComponent; void Remove(int componentTypeId, int allocationIndex); int Allocate(int componentTypeId); void PreAllocateComponents(int componentTypeId, int allocationSize); IComponentPool GetPoolFor(int componentTypeId) where T : IComponent; } }