namespace SabreTools.Library.DatItems
{
///
/// Represents a (usually WAV-formatted) sample to be included for use in the set
///
public class Sample : DatItem
{
#region Constructors
///
/// Create a default, empty Sample object
///
public Sample()
{
Name = string.Empty;
ItemType = ItemType.Sample;
}
#endregion
#region Cloning Methods
public override object Clone()
{
return new Sample()
{
Name = this.Name,
ItemType = this.ItemType,
DupeType = this.DupeType,
AltName = this.AltName,
AltTitle = this.AltTitle,
PartName = this.PartName,
PartInterface = this.PartInterface,
Features = this.Features,
AreaName = this.AreaName,
AreaSize = this.AreaSize,
Machine = this.Machine.Clone() as Machine,
Source = this.Source.Clone() as Source,
Remove = this.Remove,
};
}
#endregion
#region Comparision Methods
public override bool Equals(DatItem other)
{
// If we don't have a sample, return false
if (ItemType != other.ItemType)
return false;
// Otherwise, treat it as a Sample
Sample newOther = other as Sample;
// If the archive information matches
return (Name == newOther.Name);
}
#endregion
}
}