source: branches/MPI/HeuristicLab.Operators.MPISupport/3.3/BinaryTransport/Core/VariableTransfer.cs @ 7544

Last change on this file since 7544 was 7544, checked in by svonolfe, 8 years ago

Improved performance, added MPISolutionsCreator (#1542)

File size: 965 bytes
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Core;
6
7namespace HeuristicLab.Operators.MPISupport.BinaryTransport {
8  [Serializable]
9  class VariableTransfer {
10    public string Name { get; set; }
11    public string Description { get; set; }
12    public object Value { get; set; }
13
14    public static VariableTransfer Convert(IVariable item) {
15      VariableTransfer result = new VariableTransfer();
16
17      result.Name = item.Name;
18      result.Description = item.Description;
19      result.Value = ItemTransfer.Convert(item.Value);
20
21      return result;
22    }
23
24    public static IVariable Convert(VariableTransfer item, IExecutionContext globalScope) {
25      IVariable result = new Variable();
26
27      result.Name = item.Name;
28      result.Description = item.Description;
29      result.Value = ItemTransfer.Convert(item.Value, globalScope);
30
31      return result;
32    }
33  }
34}
Note: See TracBrowser for help on using the repository browser.