1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-24 22:07:27 +08:00
osu-lazer/osu.Game/Rulesets/Edit/Checks/Components/Check.cs

34 lines
1.0 KiB
C#
Raw Normal View History

2021-04-07 20:35:33 +08:00
// 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;
2021-04-07 20:35:33 +08:00
namespace osu.Game.Rulesets.Edit.Checks.Components
2021-04-07 20:35:33 +08:00
{
public abstract class Check
{
/// <summary>
2021-04-12 14:27:12 +08:00
/// The metadata for this check.
2021-04-07 20:35:33 +08:00
/// </summary>
public abstract CheckMetadata Metadata();
/// <summary>
2021-04-12 14:27:12 +08:00
/// All possible templates for issues that this check may return.
2021-04-07 20:35:33 +08:00
/// </summary>
public abstract IEnumerable<IssueTemplate> Templates();
/// <summary>
2021-04-12 14:27:12 +08:00
/// 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);
2021-04-07 20:35:33 +08:00
protected Check()
{
foreach (var template in Templates())
template.Origin = this;
}
}
}