diff --git a/SabreTools.Library/DatItems/Blank.cs b/SabreTools.Library/DatItems/Blank.cs new file mode 100644 index 00000000..b34e2b0e --- /dev/null +++ b/SabreTools.Library/DatItems/Blank.cs @@ -0,0 +1,85 @@ +using SabreTools.Library.Data; + +namespace SabreTools.Library.DatItems +{ + /// + /// Represents a blank set from an input DAT + /// + public class Blank : DatItem + { + #region Constructors + + /// + /// Create a default, empty Archive object + /// + public Blank() + { + _name = ""; + _itemType = ItemType.Blank; + } + + #endregion + + #region Cloning Methods + + public override object Clone() + { + return new Blank() + { + Name = this.Name, + Type = this.Type, + Dupe = this.Dupe, + + Supported = this.Supported, + Publisher = this.Publisher, + Infos = this.Infos, + PartName = this.PartName, + PartInterface = this.PartInterface, + Features = this.Features, + AreaName = this.AreaName, + AreaSize = this.AreaSize, + + MachineName = this.MachineName, + Comment = this.Comment, + MachineDescription = this.MachineDescription, + Year = this.Year, + Manufacturer = this.Manufacturer, + RomOf = this.RomOf, + CloneOf = this.CloneOf, + SampleOf = this.SampleOf, + SourceFile = this.SourceFile, + Runnable = this.Runnable, + Board = this.Board, + RebuildTo = this.RebuildTo, + Devices = this.Devices, + MachineType = this.MachineType, + + SystemID = this.SystemID, + System = this.System, + SourceID = this.SourceID, + Source = this.Source, + }; + } + + #endregion + + #region Comparision Methods + + public override bool Equals(DatItem other) + { + // If we don't have a blank, return false + if (_itemType != other.Type) + { + return false; + } + + // Otherwise, treat it as a + Blank newOther = (Blank)other; + + // If the archive information matches + return (_machine == newOther._machine); + } + + #endregion + } +} diff --git a/SabreTools.Library/Data/Enums.cs b/SabreTools.Library/Data/Enums.cs index 4819c9ed..017ba47e 100644 --- a/SabreTools.Library/Data/Enums.cs +++ b/SabreTools.Library/Data/Enums.cs @@ -345,6 +345,8 @@ Release = 3, BiosSet = 4, Archive = 5, + + Blank = 99, // This is not a real type, only used internally } #endregion diff --git a/SabreTools.Library/SabreTools.Library.csproj b/SabreTools.Library/SabreTools.Library.csproj index adaba46a..9319ac23 100644 --- a/SabreTools.Library/SabreTools.Library.csproj +++ b/SabreTools.Library/SabreTools.Library.csproj @@ -130,6 +130,7 @@ +