Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Core/Interfaces/IOperator.cs @ 182

Last change on this file since 182 was 47, checked in by swagner, 17 years ago

Fixed ticket #49

  • removed operator reset mechanism
File size: 3.6 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2008 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 System;
23using System.Collections.Generic;
24using System.Text;
25
26namespace HeuristicLab.Core {
27  public interface IOperator : IConstrainedItem {
28    string Name { get; set; }
29    string Description { get; }
30
31    bool Canceled { get; }
32    bool Breakpoint { get; set; }
33
34    IList<IOperator> SubOperators { get; }
35    ICollection<IVariableInfo> VariableInfos { get; }
36    ICollection<IVariable> Variables { get; }
37
38    void AddSubOperator(IOperator op);
39    bool TryAddSubOperator(IOperator op);
40    bool TryAddSubOperator(IOperator op, out ICollection<IConstraint> violatedConstraints);
41    void AddSubOperator(IOperator op, int index);
42    bool TryAddSubOperator(IOperator op, int index);
43    bool TryAddSubOperator(IOperator op, int index, out ICollection<IConstraint> violatedConstraints);
44    void RemoveSubOperator(int index);
45    bool TryRemoveSubOperator(int index);
46    bool TryRemoveSubOperator(int index, out ICollection<IConstraint> violatedConstraints);
47
48    IVariableInfo GetVariableInfo(string formalName);
49    void AddVariableInfo(IVariableInfo variableInfo);
50    bool TryAddVariableInfo(IVariableInfo variableInfo);
51    bool TryAddVariableInfo(IVariableInfo variableInfo, out ICollection<IConstraint> violatedConstraints);
52    void RemoveVariableInfo(string formalName);
53    bool TryRemoveVariableInfo(string formalName);
54    bool TryRemoveVariableInfo(string formalName, out ICollection<IConstraint> violatedConstraints);
55
56    IVariable GetVariable(string name);
57    void AddVariable(IVariable variable);
58    bool TryAddVariable(IVariable variable);
59    bool TryAddVariable(IVariable variable, out ICollection<IConstraint> violatedConstraints);
60    void RemoveVariable(string name);
61    bool TryRemoveVariable(string name);
62    bool TryRemoveVariable(string name, out ICollection<IConstraint> violatedConstraints);
63    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup) where T : class, IItem;
64    T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) where T : class, IItem;
65    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup);
66    IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup, bool throwOnError);
67
68    IOperation Execute(IScope scope);
69    void Abort();
70
71    event EventHandler NameChanged;
72    event EventHandler BreakpointChanged;
73    event EventHandler<OperatorIndexEventArgs> SubOperatorAdded;
74    event EventHandler<OperatorIndexEventArgs> SubOperatorRemoved;
75    event EventHandler<VariableInfoEventArgs> VariableInfoAdded;
76    event EventHandler<VariableInfoEventArgs> VariableInfoRemoved;
77    event EventHandler<VariableEventArgs> VariableAdded;
78    event EventHandler<VariableEventArgs> VariableRemoved;
79    event EventHandler Executed;
80  }
81}
Note: See TracBrowser for help on using the repository browser.