Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.Persistence/3.3/Core/FormatBase.cs @ 2636

Last change on this file since 2636 was 1853, checked in by epitzer, 16 years ago

Fix EmptyStorableClass attributes. (#603)

File size: 809 bytes
Line 
1using System;
2using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
3
4namespace HeuristicLab.Persistence.Interfaces {
5
6  [EmptyStorableClass]
7  public abstract class FormatBase<SerialDataFormat> : IFormat<SerialDataFormat> where SerialDataFormat : ISerialData {
8
9    public abstract string Name { get; }
10
11    public Type SerialDataType { get { return typeof(SerialDataFormat); } }
12
13    public bool Equals(FormatBase<SerialDataFormat> f) {
14      if (f == null)
15        return false;
16      return f.Name == this.Name;
17    }
18
19    public override bool Equals(object obj) {
20      FormatBase<SerialDataFormat> f = obj as FormatBase<SerialDataFormat>;
21      return Equals(f);
22    }
23
24    public override int GetHashCode() {
25      return Name.GetHashCode();
26    }
27
28  }
29
30}
Note: See TracBrowser for help on using the repository browser.