Skip to content

Commit

Permalink
add Filter extension methods to entity host & query
Browse files Browse the repository at this point in the history
  • Loading branch information
sicusa committed Mar 1, 2024
1 parent d64feef commit 92a1958
Show file tree
Hide file tree
Showing 3 changed files with 983 additions and 0 deletions.
15 changes: 15 additions & 0 deletions Sia/Components/ Delegates/ComponentFilter.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace Sia;

public delegate bool ComponentFilter<C1>(ref C1 c1);
public delegate bool ComponentFilter<C1, C2>(ref C1 c1, ref C2 c2);
public delegate bool ComponentFilter<C1, C2, C3>(ref C1 c1, ref C2 c2, ref C3 c3);
public delegate bool ComponentFilter<C1, C2, C3, C4>(ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4);
public delegate bool ComponentFilter<C1, C2, C3, C4, C5>(ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4, ref C5 c5);
public delegate bool ComponentFilter<C1, C2, C3, C4, C5, C6>(ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4, ref C5 c5, ref C6 c6);

public delegate bool DataComponentFilter<TData, C1>(in TData data, ref C1 c1);
public delegate bool DataComponentFilter<TData, C1, C2>(in TData data, ref C1 c1, ref C2 c2);
public delegate bool DataComponentFilter<TData, C1, C2, C3>(in TData data, ref C1 c1, ref C2 c2, ref C3 c3);
public delegate bool DataComponentFilter<TData, C1, C2, C3, C4>(in TData data, ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4);
public delegate bool DataComponentFilter<TData, C1, C2, C3, C4, C5>(in TData data, ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4, ref C5 c5);
public delegate bool DataComponentFilter<TData, C1, C2, C3, C4, C5, C6>(in TData data, ref C1 c1, ref C2 c2, ref C3 c3, ref C4 c4, ref C5 c5, ref C6 c6);
Loading

0 comments on commit 92a1958

Please sign in to comment.