ScaleXDecorator done

This commit is contained in:
Иван Ивашкин
2024-10-29 23:58:25 +05:00
parent 2738b1b7b3
commit 49d04c7bcc
18 changed files with 173 additions and 78 deletions

View File

@@ -0,0 +1,46 @@
using StructureHelperCommon.Infrastructures.Enums;
using StructureHelperCommon.Models;
using StructureHelperCommon.Models.Functions;
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Infrastructures.Interfaces
{
public abstract class FunctionDecorator : IOneVariableFunction
{
protected IOneVariableFunction function;
public bool IsUser { get; set; }
public string Group { get; set; }
public FunctionType Type { get; set; }
public string Name { get; set; }
public string Description { get; set; }
public List<GraphPoint> Table { get; set; }
public double MinArg { get; set; }
public double MaxArg { get; set; }
public ObservableCollection<IOneVariableFunction> Functions { get; set; } = new ObservableCollection<IOneVariableFunction>();
public Guid Id => throw new NotImplementedException();
public IShiftTraceLogger? TraceLogger { get; set; }
public FunctionDecorator(IOneVariableFunction function)
{
this.function = function;
}
public virtual bool Check()
{
return function.Check();
}
public virtual object Clone()
{
return function.Clone();
}
public virtual double GetByX(double xValue)
{
return function.GetByX(xValue);
}
}
}

View File

@@ -1,13 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StructureHelperCommon.Infrastructures.Interfaces
{
public interface IFunctionDecorator
{
public IOneVariableFunction OneVariableFunction { get; }
}
}

View File

@@ -10,7 +10,7 @@ using System.Threading.Tasks;
namespace StructureHelperCommon.Infrastructures.Interfaces
{
public interface IOneVariableFunction : ICloneable, ISaveable
public interface IOneVariableFunction : ICloneable, ISaveable, ILogic
{
public const string GROUP_TYPE_1 = "System function";
public const string GROUP_TYPE_2 = "User function";