source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Converters/BaseConverter.cs @ 17843

Last change on this file since 17843 was 17843, checked in by dpiringe, 7 weeks ago

#3026

  • removed property ConvertableType from all converters
  • removed the option to fixate or loosen the path of JsonItems (obsolete)
  • added a abstract formatter SymbolicRegressionSolutionFormatterBase as base formatter for ISymbolicRegressionSolution
  • unified the construction of exporter controls
  • code cleanup
File size: 742 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Core;
7using HeuristicLab.Data;
8using Newtonsoft.Json.Linq;
9
10namespace HeuristicLab.JsonInterface {
11  public abstract class BaseConverter : IJsonItemConverter
12  {
13    public abstract int Priority { get; }
14
15    public abstract bool CanConvertType(Type t);
16
17    public abstract void Inject(IItem item, IJsonItem data, IJsonItemConverter root);
18    public abstract IJsonItem Extract(IItem value, IJsonItemConverter root);
19
20
21    #region Helper
22    protected IItem Instantiate(Type type, params object[] args) =>
23      (IItem)Activator.CreateInstance(type,args);
24    #endregion
25  }
26}
Note: See TracBrowser for help on using the repository browser.