2019-06-12 02:17:05 +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.
|
|
|
|
|
|
2019-06-12 01:12:57 +08:00
|
|
|
|
using System;
|
2020-05-19 15:44:22 +08:00
|
|
|
|
using osu.Framework.Bindables;
|
2019-06-12 01:12:57 +08:00
|
|
|
|
|
|
|
|
|
namespace osu.Game.Database
|
|
|
|
|
{
|
2019-06-12 21:05:34 +08:00
|
|
|
|
/// <summary>
|
2019-11-17 20:48:23 +08:00
|
|
|
|
/// Represents a model manager that publishes events when <typeparamref name="TModel"/>s are added or removed.
|
2019-06-12 21:05:34 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
/// <typeparam name="TModel">The model type.</typeparam>
|
2020-05-19 15:44:22 +08:00
|
|
|
|
public interface IModelManager<TModel>
|
2019-06-12 21:05:34 +08:00
|
|
|
|
where TModel : class
|
2019-06-12 01:12:57 +08:00
|
|
|
|
{
|
2020-05-19 15:44:22 +08:00
|
|
|
|
IBindable<WeakReference<TModel>> ItemAdded { get; }
|
2019-06-12 01:12:57 +08:00
|
|
|
|
|
2020-05-19 15:44:22 +08:00
|
|
|
|
IBindable<WeakReference<TModel>> ItemRemoved { get; }
|
2019-06-12 01:12:57 +08:00
|
|
|
|
}
|
|
|
|
|
}
|