mirror of
https://github.com/Artemis-RGB/Artemis
synced 2026-11-12 11:56:30 +00:00
Datamodel - WIP stuff, need this on a diff. PC
This commit is contained in:
1 parent
35944e064d
commit
566bdd3a89
23 files changed
+392
-161
No files matched your search
@@ -2,10 +2,58 @@
|
||||
using Artemis.Core.Exceptions;
|
||||
using Artemis.Core.Models.Profile;
|
||||
using Artemis.Core.Models.Surface;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels;
|
||||
using Artemis.Core.Plugins.Abstract.DataModels.Attributes;
|
||||
using SkiaSharp;
|
||||
|
||||
namespace Artemis.Core.Plugins.Abstract
|
||||
{
|
||||
/// <summary>
|
||||
/// Allows you to add support for new games/applications while utilizing Artemis' profile engine and your own data model
|
||||
/// </summary>
|
||||
public abstract class ProfileModule<T> : ProfileModule where T : DataModel
|
||||
{
|
||||
/// <summary>
|
||||
/// The data model driving this module
|
||||
/// </summary>
|
||||
public T DataModel
|
||||
{
|
||||
get => (T)InternalDataModel;
|
||||
internal set => InternalDataModel = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets whether this module must also expand the main data model
|
||||
/// <para>
|
||||
/// Note: If expanding the main data model is all you want your plugin to do, create a
|
||||
/// <see cref="BaseDataModelExpansion" /> plugin instead.
|
||||
/// </para>
|
||||
/// </summary>
|
||||
public bool ExpandsDataModel
|
||||
{
|
||||
get => InternalExpandsMainDataModel;
|
||||
set => InternalExpandsMainDataModel = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Override to provide your own data model description. By default this returns a description matching your plugin
|
||||
/// name and description
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public virtual DataModelPropertyAttribute GetDataModelDescription()
|
||||
{
|
||||
return new DataModelPropertyAttribute { Name = PluginInfo.Name, Description = PluginInfo.Description };
|
||||
}
|
||||
|
||||
internal override DataModelPropertyAttribute InternalGetDataModelDescription()
|
||||
{
|
||||
return GetDataModelDescription();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Allows you to add support for new games/applications while utilizing Artemis' profile engine
|
||||
/// </summary>
|
||||
public abstract class ProfileModule : Module
|
||||
{
|
||||
public Profile ActiveProfile { get; private set; }
|
||||
|
||||
Reference in new issue
Block a user