Changeset 3048 for trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs
- Timestamp:
- 03/15/10 23:49:54 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Data/3.3/ValueTypeArray.cs
r3047 r3048 28 28 29 29 namespace HeuristicLab.Data { 30 [Item("ValueTypeArray Data<T>", "A base class for representing arrays of value types.")]30 [Item("ValueTypeArray<T>", "A base class for representing arrays of value types.")] 31 31 [StorableClass] 32 public class ValueTypeArray Data<T> : Item, IEnumerable where T : struct {32 public class ValueTypeArray<T> : Item, IEnumerable where T : struct { 33 33 [Storable] 34 34 private T[] array; … … 53 53 } 54 54 55 public ValueTypeArray Data() {55 public ValueTypeArray() { 56 56 array = new T[0]; 57 57 } 58 public ValueTypeArray Data(int length) {58 public ValueTypeArray(int length) { 59 59 array = new T[length]; 60 60 } 61 public ValueTypeArray Data(T[] elements) {61 public ValueTypeArray(T[] elements) { 62 62 if (elements == null) throw new ArgumentNullException(); 63 63 array = (T[])elements.Clone(); 64 64 } 65 protected ValueTypeArray Data(ValueTypeArrayData<T> elements) {65 protected ValueTypeArray(ValueTypeArray<T> elements) { 66 66 if (elements == null) throw new ArgumentNullException(); 67 67 array = (T[])elements.array.Clone(); … … 69 69 70 70 public override IDeepCloneable Clone(Cloner cloner) { 71 ValueTypeArray Data<T> clone = (ValueTypeArrayData<T>)base.Clone(cloner);71 ValueTypeArray<T> clone = (ValueTypeArray<T>)base.Clone(cloner); 72 72 clone.array = (T[])array.Clone(); 73 73 return clone;
Note: See TracChangeset
for help on using the changeset viewer.