Changeset 2653 for trunk/sources/HeuristicLab.Core/3.3/Interfaces
- Timestamp:
- 01/20/10 05:00:28 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3/Interfaces
- Files:
-
- 4 added
- 9 deleted
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IEngine.cs
r2474 r2653 35 35 /// Gets the operator graph of the current instance. 36 36 /// </summary> 37 IOperatorGraph OperatorGraph { get; }37 OperatorGraph OperatorGraph { get; set; } 38 38 /// <summary> 39 39 /// Gets the global scope of the current instance. 40 40 /// </summary> 41 IScope GlobalScope { get; }41 Scope GlobalScope { get; } 42 42 43 43 /// <summary> … … 51 51 bool Running { get; } 52 52 /// <summary> 53 /// Gets information whether the engine is canceled.54 /// </summary>55 bool Canceled { get; }56 /// <summary>57 53 /// Gets information whether the engine has already terminated. 58 54 /// </summary> 59 bool Terminated { get; }55 bool Finished { get; } 60 56 57 /// <summary> 58 /// Resets the current instance. 59 /// </summary> 60 void Initialize(); 61 61 /// <summary> 62 62 /// Executes the whole run. 63 63 /// </summary> 64 void Execute();64 void Start(); 65 65 /// <summary> 66 66 /// Executes one step (one operation). 67 67 /// </summary> 68 void ExecuteStep(); 69 /// <summary> 70 /// Executes the given number of steps. 71 /// </summary> 72 /// <param name="steps">The number of steps to execute.</param> 73 void ExecuteSteps(int steps); 68 void Step(); 74 69 /// <summary> 75 70 /// Aborts the engine run. 76 71 /// </summary> 77 void Abort(); 78 /// <summary> 79 /// Resets the current instance. 80 /// </summary> 81 void Reset(); 72 void Stop(); 82 73 83 /// <summary> 84 /// Occurs when the current instance is initialized. 85 /// </summary> 86 event EventHandler Initialized; 87 /// <summary> 88 /// Occurs when an operation is executed. 89 /// </summary> 90 event EventHandler<EventArgs<IOperation>> OperationExecuted; 91 /// <summary> 92 /// Occurs when an exception was thrown. 93 /// </summary> 94 event EventHandler<EventArgs<Exception>> ExceptionOccurred; 74 event EventHandler OperatorGraphChanged; 95 75 /// <summary> 96 76 /// Occurs when the execution time was changed. … … 98 78 event EventHandler ExecutionTimeChanged; 99 79 /// <summary> 80 /// Occurs when the engine is initialized. 81 /// </summary> 82 event EventHandler Initialized; 83 /// <summary> 84 /// Occurs when the engine is executed. 85 /// </summary> 86 event EventHandler Started; 87 /// <summary> 100 88 /// Occurs when the engine is finished. 101 89 /// </summary> 102 event EventHandler Finished; 90 event EventHandler Stopped; 91 /// <summary> 92 /// Occurs when an exception was thrown. 93 /// </summary> 94 event EventHandler<EventArgs<Exception>> ExceptionOccurred; 103 95 } 104 96 } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IItem.cs
r2546 r2653 22 22 using System; 23 23 using System.Collections.Generic; 24 using System.ComponentModel; 24 25 using System.Text; 25 26 using System.Drawing; … … 29 30 /// Interface to represent (almost) every HeuristicLab object (an object, an operator,...). 30 31 /// </summary> 31 public interface IItem : I Cloneable {32 string Name { get; }33 string Description { get; }34 Image I mage { get; }32 public interface IItem : IDeepCloneable { 33 string ItemName { get; } 34 string ItemDescription { get; } 35 Image ItemImage { get; } 35 36 36 /// <summary> 37 /// Creates a deep clone of this item. 38 /// </summary> 39 /// <param name="cloner">The cloner which is responsible for keeping track of all already 40 /// cloned objects.</param> 41 /// <returns>A clone of this instance.</returns> 42 IItem Clone(ICloner cloner); 43 44 /// <summary> 45 /// Fires a new <c>Changed</c> event. 46 /// </summary> 47 void FireChanged(); 48 49 /// <summary> 50 /// Occurs when the current instance has changed. 51 /// </summary> 52 event EventHandler Changed; 37 event ChangedEventHandler Changed; 53 38 } 54 39 } -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperator.cs
r2524 r2653 24 24 using System.Text; 25 25 using HeuristicLab.Common; 26 using HeuristicLab.Collections; 26 27 27 28 namespace HeuristicLab.Core { … … 30 31 /// a basic instruction of an algorithm. 31 32 /// </summary> 32 public interface IOperator : IItem { 33 /// <summary> 34 /// Gets or sets the name of the current instance. 35 /// </summary> 36 string Name { get; set; } 37 /// <summary> 38 /// Gets or sets the description of the current instance. 39 /// </summary> 40 string Description { get; } 33 public interface IOperator : INamedItem { 34 IObservableKeyedCollection<string, IParameter> Parameters { get; } 41 35 42 /// <summary>43 /// Gets information whether the current operator has been canceled.44 /// </summary>45 bool Canceled { get; }46 36 /// <summary> 47 37 /// Gets or sets a boolean value whether the engine should stop here during the run. … … 50 40 51 41 /// <summary> 52 /// Gets a list of all sub operators.53 /// </summary>54 IList<IOperator> SubOperators { get; }55 /// <summary>56 /// Gets a collection of all variable (parameter) infos.57 /// </summary>58 ICollection<IVariableInfo> VariableInfos { get; }59 /// <summary>60 /// Gets a collection of all variables of the current operator.61 /// </summary>62 ICollection<IVariable> Variables { get; }63 64 /// <summary>65 /// Adds the given sub operator to the current instance.66 /// </summary>67 /// <param name="op">The operator to add.</param>68 void AddSubOperator(IOperator op);69 /// <summary>70 /// Adds the given sub operator at a the specified <paramref name="index"/>.71 /// </summary>72 /// <param name="op">The operator to add.</param>73 /// <param name="index">The position where to add the operator.</param>74 void AddSubOperator(IOperator op, int index);75 /// <summary>76 /// Removes a sub operator at the specified <paramref name="index"/>.77 /// </summary>78 /// <param name="index">The position where to delete the operator.</param>79 void RemoveSubOperator(int index);80 81 /// <summary>82 /// Gets the variable info with the given <paramref name="formalName"/>.83 /// </summary>84 /// <param name="formalName">The formal name of the variable info.</param>85 /// <returns>The variable info with the specified formal name.</returns>86 IVariableInfo GetVariableInfo(string formalName);87 /// <summary>88 /// Adds the specified variable info to the current instance.89 /// </summary>90 /// <param name="variableInfo">The variable info to add.</param>91 void AddVariableInfo(IVariableInfo variableInfo);92 /// <summary>93 /// Removes the variable info with the given formal name.94 /// </summary>95 /// <param name="formalName">The formal name of the variable info to remove.</param>96 void RemoveVariableInfo(string formalName);97 98 /// <summary>99 /// Gets a variable with the given <paramref name="name"/>.100 /// </summary>101 /// <param name="name">The name of the variable.</param>102 /// <returns>The variable with the specified name.</returns>103 IVariable GetVariable(string name);104 /// <summary>105 /// Adds the specified <paramref name="variable"/> to the current instance.106 /// </summary>107 /// <param name="variable">The variable to add.</param>108 void AddVariable(IVariable variable);109 /// <summary>110 /// Deletes the variable with the specified <paramref name="name"/>.111 /// </summary>112 /// <param name="name">The name of the variable to delete.</param>113 void RemoveVariable(string name);114 115 /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool)"/>116 /// <typeparam name="T">The type of the value that is searched.</typeparam>117 T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup) where T : class, IItem;118 /// <inheritdoc cref="GetVariableValue(string, HeuristicLab.Core.IScope, bool, bool)"/>119 /// <typeparam name="T">The type of the value that is searched.</typeparam>120 T GetVariableValue<T>(string formalName, IScope scope, bool recursiveLookup, bool throwOnError) where T : class, IItem;121 /// <inheritdoc cref="GetVariableValue(System.String, IScope, bool, bool)"122 /// select="summary"/>123 /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>124 /// <param name="scope">The scope where to look for the variable.</param>125 /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if126 /// the variable is not found in the specified <paramref name="scope"/>.</param>127 /// <returns>The value of the searched variable or null if it is not found.</returns>128 IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup);129 /// <summary>130 /// Gets the value of the variable in the specified <paramref name="scope"/>131 /// whose variable(parameter) info has the specified <paramref name="formalName"/>.132 /// </summary>133 /// <param name="formalName">The formal name of the variable info whose variable value is searched.</param>134 /// <param name="scope">The scope where to look for the variable.</param>135 /// <param name="recursiveLookup">Boolean value, whether also the parent scopes shall be searched if136 /// the variable is not found in the specified <paramref name="scope"/>.</param>137 /// <param name="throwOnError">Boolean value, whether an exception shall be thrown, if the variable138 /// cannot be found or just <c>null</c> shall be returned.</param>139 /// <returns>The value of the searched variable (or null if the variable is not140 /// found and <paramref name="throwOnError"/> is set to false).</returns>141 IItem GetVariableValue(string formalName, IScope scope, bool recursiveLookup, bool throwOnError);142 143 /// <summary>144 42 /// Executes the current instance on the specified <paramref name="scope"/>. 145 43 /// </summary> 146 44 /// <param name="scope">The scope where to execute the current instance.</param> 147 45 /// <returns>The next operation.</returns> 148 IOperation Execute(IScope scope);46 ExecutionContextCollection Execute(ExecutionContext context); 149 47 /// <summary> 150 48 /// Aborts the current operator. … … 153 51 154 52 /// <summary> 155 /// Occurs when the name of the operator was changed.156 /// </summary>157 event EventHandler NameChanged;158 /// <summary>159 53 /// Occurs when the breakpoint flag of the current instance was changed. 160 54 /// </summary> 161 55 event EventHandler BreakpointChanged; 162 /// <summary>163 /// Occurs when a sub operator has been added.164 /// </summary>165 event EventHandler<EventArgs<IOperator, int>> SubOperatorAdded;166 /// <summary>167 /// Occurs when a sub operator has been deleted.168 /// </summary>169 event EventHandler<EventArgs<IOperator, int>> SubOperatorRemoved;170 /// <summary>171 /// Occurs when a variable info has been added.172 /// </summary>173 event EventHandler<EventArgs<IVariableInfo>> VariableInfoAdded;174 /// <summary>175 /// Occurs when a variable info has been deleted.176 /// </summary>177 event EventHandler<EventArgs<IVariableInfo>> VariableInfoRemoved;178 /// <summary>179 /// Occurs when a variable has been added.180 /// </summary>181 event EventHandler<EventArgs<IVariable>> VariableAdded;182 /// <summary>183 /// Occurs when a variable has been deleted.184 /// </summary>185 event EventHandler<EventArgs<IVariable>> VariableRemoved;186 56 /// <summary> 187 57 /// Occurs when the current instance is executed.
Note: See TracChangeset
for help on using the changeset viewer.