Changeset 3376 for trunk/sources/HeuristicLab.Core
- Timestamp:
- 04/16/10 19:15:09 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Core/3.3
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Core/3.3/Engine.cs
r3289 r3376 23 23 using System.Collections.Generic; 24 24 using System.Threading; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 -
trunk/sources/HeuristicLab.Core/3.3/ExecutionContext.cs
r3317 r3376 22 22 using System; 23 23 using HeuristicLab.Collections; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 26 27 namespace HeuristicLab.Core { 27 28 [StorableClass] 28 public sealed class ExecutionContext : DeepCloneable, IExecutionContext, IAtomicOperation {29 public sealed class ExecutionContext : IDeepCloneable, IExecutionContext, IAtomicOperation { 29 30 [Storable] 30 31 private IParameterizedItem parameterizedItem; … … 62 63 } 63 64 64 public override IDeepCloneable Clone(Cloner cloner) { 65 public object Clone() { 66 return Clone(new Cloner()); 67 } 68 public IDeepCloneable Clone(Cloner cloner) { 65 69 ExecutionContext clone = new ExecutionContext(); 66 70 cloner.RegisterClonedObject(this, clone); -
trunk/sources/HeuristicLab.Core/3.3/HeuristicLab.Core-3.3.csproj
r3289 r3376 100 100 <ItemGroup> 101 101 <Compile Include="Attributes\ItemAttribute.cs" /> 102 <Compile Include="Cloner.cs" />103 102 <Compile Include="Attributes\CreatableAttribute.cs" /> 104 103 <None Include="HeuristicLabCorePlugin.cs.frame" /> … … 120 119 <Compile Include="Interfaces\ILookupParameter.cs" /> 121 120 <Compile Include="ItemArray.cs" /> 122 <Compile Include="DeepCloneable.cs" />123 121 <Compile Include="Engine.cs" /> 124 122 <Compile Include="Interfaces\IScope.cs" /> … … 141 139 <Compile Include="VariableCollection.cs" /> 142 140 <Compile Include="ScopeList.cs" /> 143 <Compile Include="Interfaces\IDeepCloneable.cs" />144 141 <Compile Include="NamedItemCollection.cs" /> 145 142 <Compile Include="Interfaces\INamedItem.cs" /> -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IExecutionContext.cs
r2834 r3376 21 21 22 22 using HeuristicLab.Collections; 23 using HeuristicLab.Common; 23 24 24 25 namespace HeuristicLab.Core { -
trunk/sources/HeuristicLab.Core/3.3/Interfaces/IOperation.cs
r2834 r3376 20 20 #endregion 21 21 22 using HeuristicLab.Common; 23 22 24 namespace HeuristicLab.Core { 23 25 /// <summary> -
trunk/sources/HeuristicLab.Core/3.3/Item.cs
r3370 r3376 22 22 using System; 23 23 using System.Drawing; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 … … 30 31 [StorableClass] 31 32 [Item("Item", "Base class for all HeuristicLab items.")] 32 public abstract class Item : DeepCloneable, IItem {33 public abstract class Item : IDeepCloneable, IItem { 33 34 public virtual string ItemName { 34 35 get { return ItemAttribute.GetName(this.GetType()); } … … 58 59 } 59 60 [StorableConstructor] 60 protected Item(bool deserializing) : base(deserializing){ }61 protected Item(bool deserializing) { } 61 62 63 64 /// <summary> 65 /// Creates a deep clone of this instance. 66 /// </summary> 67 /// <remarks> 68 /// This method is the entry point for creating a deep clone of a whole object graph. 69 /// </remarks> 70 /// <returns>A clone of this instance.</returns> 71 public object Clone() { 72 return Clone(new Cloner()); 73 } 62 74 63 75 /// <summary> … … 66 78 /// <param name="clonedObjects">Dictionary of all already cloned objects. (Needed to avoid cycles.)</param> 67 79 /// <returns>The cloned object as <see cref="Variable"/>.</returns> 68 public override IDeepCloneable Clone(Cloner cloner) { 69 Item clone = (Item)base.Clone(cloner); 80 public virtual IDeepCloneable Clone(Cloner cloner) { 81 Item clone = (Item)Activator.CreateInstance(this.GetType()); 82 cloner.RegisterClonedObject(this, clone); 70 83 clone.readOnlyView = readOnlyView; 71 84 return clone; -
trunk/sources/HeuristicLab.Core/3.3/ItemArray.cs
r3317 r3376 28 28 using System.Drawing; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common; 30 31 using HeuristicLab.Common.Resources; 31 32 using HeuristicLab.Collections; -
trunk/sources/HeuristicLab.Core/3.3/ItemCollection.cs
r3317 r3376 25 25 using System.Linq; 26 26 using HeuristicLab.Collections; 27 using HeuristicLab.Common; 27 28 using HeuristicLab.Common.Resources; 28 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; -
trunk/sources/HeuristicLab.Core/3.3/ItemList.cs
r3317 r3376 28 28 using System.Drawing; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common; 30 31 using HeuristicLab.Common.Resources; 31 32 using HeuristicLab.Collections; 32 33 33 34 34 namespace HeuristicLab.Core { -
trunk/sources/HeuristicLab.Core/3.3/ItemSet.cs
r3317 r3376 28 28 using System.Drawing; 29 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common; 30 31 using HeuristicLab.Common.Resources; 31 32 using HeuristicLab.Collections; 32 33 33 34 34 namespace HeuristicLab.Core { -
trunk/sources/HeuristicLab.Core/3.3/OperationCollection.cs
r3317 r3376 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; 25 using HeuristicLab.Common; 24 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 27 26 28 namespace HeuristicLab.Core { 27 29 [StorableClass] 28 public sealed class OperationCollection : DeepCloneable, IList<IOperation>, IOperation {30 public sealed class OperationCollection : IDeepCloneable, IList<IOperation>, IOperation { 29 31 [Storable] 30 32 private IList<IOperation> operations; … … 50 52 } 51 53 52 public override IDeepCloneable Clone(Cloner cloner) { 53 OperationCollection clone = (OperationCollection)base.Clone(cloner); 54 public object Clone() { 55 return Clone(new Cloner()); 56 } 57 public IDeepCloneable Clone(Cloner cloner) { 58 OperationCollection clone = (OperationCollection)Activator.CreateInstance(this.GetType()); 59 cloner.RegisterClonedObject(this, clone); 54 60 clone.operations = new List<IOperation>(this.Select(x => (IOperation)cloner.Clone(x))); 55 61 clone.parallel = parallel; -
trunk/sources/HeuristicLab.Core/3.3/ParameterizedNamedItem.cs
r3280 r3376 23 23 using System.Linq; 24 24 using HeuristicLab.Collections; 25 using HeuristicLab.Common; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 27 -
trunk/sources/HeuristicLab.Core/3.3/Scope.cs
r3317 r3376 21 21 22 22 using HeuristicLab.Collections; 23 using HeuristicLab.Common; 23 24 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 24 25 -
trunk/sources/HeuristicLab.Core/3.3/ScopeList.cs
r3317 r3376 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26 -
trunk/sources/HeuristicLab.Core/3.3/VariableCollection.cs
r3317 r3376 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 25 26
Note: See TracChangeset
for help on using the changeset viewer.