source: branches/2521_ProblemRefactoring/HeuristicLab.Optimization/3.3/BasicProblems/Interfaces/ISolutionContext.cs @ 17459

Last change on this file since 17459 was 17459, checked in by mkommend, 2 years ago

#2521: Added storable type attributes to interfaces.

File size: 2.2 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using HEAL.Attic;
23using HeuristicLab.Core;
24
25namespace HeuristicLab.Optimization {
26  //TODO discuss renaming to solution scope?
27  [StorableType("383A35EB-03C9-473D-A20B-EE34E00BC174")]
28  public interface ISolutionContext : IItem {
29
30    bool IsEvaluated { get; }
31    IEncodedSolution EncodedSolution { get; }
32
33    IEvaluationResult EvaluationResult { get; }
34
35
36    //TODO: make methods generic for get/set additional data
37    void SetAdditionalData(string identifier, object o);
38    object GetAdditionalData(string identifier);
39  }
40
41  public interface ISolutionContext<TEncodedSolution> : ISolutionContext
42    where TEncodedSolution : class, IEncodedSolution {
43    new TEncodedSolution EncodedSolution { get; }
44  }
45
46  [StorableType("3A5CA150-1122-4D13-B65D-55D7EC86198F")]
47  public interface ISingleObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution>
48      where TEncodedSolution : class, IEncodedSolution {
49    //TODO discuss with abeham hiding of base property
50    new ISingleObjectiveEvaluationResult EvaluationResult { get; set; }
51  }
52
53  [StorableType("3110C8C1-11FE-4A24-9B4E-E2EB3B97CBE9")]
54  public interface IMultiObjectiveSolutionContext<TEncodedSolution> : ISolutionContext<TEncodedSolution>
55      where TEncodedSolution : class, IEncodedSolution {
56    new IMultiObjectiveEvaluationResult EvaluationResult { get; set; }
57  }
58
59}
Note: See TracBrowser for help on using the repository browser.