Last change
on this file since 584 was
584,
checked in by abeham, 16 years ago
|
merged communication framework to trunk (ticket #279)
|
File size:
972 bytes
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Collections.Generic;
|
---|
3 | using System.Text;
|
---|
4 | using HeuristicLab.Core;
|
---|
5 | using HeuristicLab.Data;
|
---|
6 | using HeuristicLab.Communication.Data;
|
---|
7 |
|
---|
8 | namespace HeuristicLab.Communication.Operators {
|
---|
9 | public class CurrentStateVariableInjector : OperatorBase {
|
---|
10 | public override string Description {
|
---|
11 | get { return @"TODO\r\n add description"; }
|
---|
12 | }
|
---|
13 |
|
---|
14 | public CurrentStateVariableInjector() {
|
---|
15 | AddVariableInfo(new VariableInfo("CurrentState", "The current state when working up a protocol", typeof(ProtocolState), VariableKind.In));
|
---|
16 | }
|
---|
17 |
|
---|
18 | public override IOperation Apply(IScope scope) {
|
---|
19 | ProtocolState currentState = GetVariableValue<ProtocolState>("CurrentState", scope, true);
|
---|
20 | ConstrainedItemList data = currentState.SendingData;
|
---|
21 | for (int i = 0 ; i < data.Count ; i++) {
|
---|
22 | scope.AddVariable((Variable)data[i].Clone(new Dictionary<Guid, object>()));
|
---|
23 | }
|
---|
24 |
|
---|
25 | return null;
|
---|
26 | }
|
---|
27 | }
|
---|
28 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.