Last change
on this file since 17834 was
17834,
checked in by dpiringe, 3 years ago
|
#3026
- added ResultFormatter to add an extra layer of result transformation logic (converting a result value to a string with a defined logic, e.g. MatlabResultFormatter for ISymbolicRegressionSolution)
- extended the IResultJsonItem with two properties for result formatting
- added a new control to selected a result formatter for a result value
- refactored the Runner for the new result formatting process
|
File size:
795 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Linq;
|
---|
4 | using System.Text;
|
---|
5 | using System.Threading.Tasks;
|
---|
6 | using HeuristicLab.Core;
|
---|
7 | using HeuristicLab.Data;
|
---|
8 | using Newtonsoft.Json.Linq;
|
---|
9 |
|
---|
10 | namespace 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 Type ConvertableType { get; }
|
---|
18 |
|
---|
19 | public abstract void Inject(IItem item, IJsonItem data, IJsonItemConverter root);
|
---|
20 | public abstract IJsonItem Extract(IItem value, IJsonItemConverter root);
|
---|
21 |
|
---|
22 |
|
---|
23 | #region Helper
|
---|
24 | protected IItem Instantiate(Type type, params object[] args) =>
|
---|
25 | (IItem)Activator.CreateInstance(type,args);
|
---|
26 | #endregion
|
---|
27 | }
|
---|
28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.