Skip to content

Commit

Permalink
Added enumerator to Signature.
Browse files Browse the repository at this point in the history
  • Loading branch information
genaray committed Jul 22, 2024
1 parent 351dc7c commit c130f9e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/Arch/Core/Query.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
using CommunityToolkit.HighPerformance;

namespace Arch.Core;

using Arch.Core;

/// <summary>
/// The <see cref="Signature"/> struct
Expand Down Expand Up @@ -115,6 +115,16 @@ public override int GetHashCode()
}
}

/// <summary>
/// Creates an <see cref="Enumerator{T}"/> which iterates over all <see cref="Components"/> in this <see cref="Signature"/>.
/// </summary>
/// <returns>An <see cref="Enumerator{T}"/>.</returns>
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public Enumerator<ComponentType> GetEnumerator()
{
return new Enumerator<ComponentType>(Components);
}

/// <summary>
/// Checks for indifference, if the internal arrays have equal elements true is returned. Otherwise false.
/// </summary>
Expand Down

0 comments on commit c130f9e

Please sign in to comment.