Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3026_IntegrationIntoSymSpace/HeuristicLab.JsonInterface/Interfaces/IJsonItemConverter.cs @ 17353

Last change on this file since 17353 was 17353, checked in by dpiringe, 3 years ago

#3026:

  • relocated GetMaxValue and GetMinValue from ValueTypeValueConverter into BaseConverter
  • fixed a bug in ConstrainedValueParameterConverter (from GetType().Name to ToString())
  • printing now PrettyNames for types
  • added comments
  • added StorableConverter.cs (not finished, maybe not a good converter)
  • added ValueRangeConverter.cs for DoubleRange and IntRange
  • added ParameterConverter.cs for default parameter conversion
File size: 928 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using System.Threading.Tasks;
6using HeuristicLab.Core;
7using Newtonsoft.Json.Linq;
8
9namespace HeuristicLab.JsonInterface {
10  public interface IJsonItemConverter {
11    /// <summary>
12    /// Injects the saved infos from the JsonItem into the IItem.
13    /// (Sets the necessary values.)
14    /// </summary>
15    /// <param name="item">The IItem which get the data injected.</param>
16    /// <param name="data">The JsonItem with the saved values.</param>
17    void Inject(IItem item, JsonItem data);
18
19    /// <summary>
20    /// Extracts all infos out of an IItem to create a JsonItem.
21    /// (For template generation.)
22    /// </summary>
23    /// <param name="value">The IItem to extract infos.</param>
24    /// <returns>JsonItem with infos to reinitialise the IItem.</returns>
25    JsonItem Extract(IItem value);
26  }
27}
28
Note: See TracBrowser for help on using the repository browser.