Mirror of Svelto.ECS because we're a fan of it
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
948B

  1. using Svelto.DataStructures;
  2. namespace Svelto.ECS
  3. {
  4. public interface IEntityViewsDB
  5. {
  6. //to use with EntityViews, EntityStructs and EntityViewStructs
  7. ReadOnlyCollectionStruct<T> QueryEntities<T>() where T : IEntityData;
  8. ReadOnlyCollectionStruct<T> QueryEntities<T>(int group) where T : IEntityData;
  9. //to use with EntityStructs and EntityViewStructs
  10. T[] QueryEntitiesCacheFriendly<T>(out int count) where T : struct, IEntityData;
  11. T[] QueryEntitiesCacheFriendly<T>(int group, out int count) where T : struct, IEntityData;
  12. //to use with EntityViews
  13. bool TryQueryEntityView<T>(EGID egid, out T entityView) where T : IEntityData;
  14. T QueryEntityView<T>(EGID egid) where T : class, IEntityData;
  15. bool Exists<T>(EGID egid) where T : IEntityData;
  16. void Fetch<T>(out T entity) where T:IEntityData;
  17. bool Has<T>() where T:IEntityData;
  18. }
  19. }