Line | |
---|
1 | using System;
|
---|
2 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
3 |
|
---|
4 | namespace 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.