1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 20:07:25 +08:00
osu-lazer/osu.Game/Rulesets/Edit/Checks/Components/Check.cs
2021-04-12 15:52:18 +09:00

34 lines
1.0 KiB
C#

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System.Collections.Generic;
using osu.Game.Beatmaps;
namespace osu.Game.Rulesets.Edit.Checks.Components
{
public abstract class Check
{
/// <summary>
/// The metadata for this check.
/// </summary>
public abstract CheckMetadata Metadata();
/// <summary>
/// All possible templates for issues that this check may return.
/// </summary>
public abstract IEnumerable<IssueTemplate> Templates();
/// <summary>
/// Runs this check and returns any issues detected for the provided beatmap.
/// </summary>
/// <param name="beatmap">The beatmap to run the check on.</param>
public abstract IEnumerable<Issue> Run(IBeatmap beatmap);
protected Check()
{
foreach (var template in Templates())
template.Origin = this;
}
}
}