mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[ALL] DatItem/Machine cleanup and descriptions
This commit is contained in:
@@ -1,126 +1,197 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using SabreTools.Library.Data;
|
||||
|
||||
namespace SabreTools.Library.DatItems
|
||||
{
|
||||
/// <summary>
|
||||
/// Represents the information specific to a set/game/machine
|
||||
/// </summary>
|
||||
public class Machine : ICloneable
|
||||
{
|
||||
#region Publicly facing variables
|
||||
/// <summary>
|
||||
/// Represents the information specific to a set/game/machine
|
||||
/// </summary>
|
||||
public class Machine : ICloneable
|
||||
{
|
||||
#region Publicly facing variables
|
||||
|
||||
// Machine information
|
||||
public string Name;
|
||||
public string Comment;
|
||||
public string Description;
|
||||
public string Year;
|
||||
public string Manufacturer;
|
||||
public string Publisher;
|
||||
public string RomOf;
|
||||
public string CloneOf;
|
||||
public string SampleOf;
|
||||
public bool? Supported;
|
||||
public string SourceFile;
|
||||
public bool? Runnable;
|
||||
public string Board;
|
||||
public string RebuildTo;
|
||||
public List<string> Devices;
|
||||
public List<string> SlotOptions;
|
||||
public List<Tuple<string, string>> Infos;
|
||||
public MachineType MachineType;
|
||||
/// <summary>
|
||||
/// Name of the machine
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Additional notes
|
||||
/// </summary>
|
||||
public string Comment { get; set; }
|
||||
|
||||
#region Constructors
|
||||
/// <summary>
|
||||
/// Extended description
|
||||
/// </summary>
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Machine object
|
||||
/// </summary>
|
||||
public Machine()
|
||||
{
|
||||
Name = null;
|
||||
Comment = null;
|
||||
Description = null;
|
||||
Year = null;
|
||||
Manufacturer = null;
|
||||
Publisher = null;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
Supported = true;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = null;
|
||||
SlotOptions = null;
|
||||
Infos = null;
|
||||
MachineType = MachineType.NULL;
|
||||
}
|
||||
/// <summary>
|
||||
/// Year(s) of release/manufacture
|
||||
/// </summary>
|
||||
public string Year { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Machine object with the included information
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the machine</param>
|
||||
/// <param name="description">Description of the machine</param>
|
||||
public Machine(string name, string description)
|
||||
{
|
||||
Name = name;
|
||||
Comment = null;
|
||||
Description = description;
|
||||
Year = null;
|
||||
Manufacturer = null;
|
||||
Publisher = null;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
Supported = true;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = null;
|
||||
SlotOptions = null;
|
||||
Infos = null;
|
||||
MachineType = MachineType.NULL;
|
||||
}
|
||||
/// <summary>
|
||||
/// Manufacturer, if available
|
||||
/// </summary>
|
||||
public string Manufacturer { get; set; }
|
||||
|
||||
#endregion
|
||||
/// <summary>
|
||||
/// Publisher, if available
|
||||
/// </summary>
|
||||
public string Publisher { get; set; }
|
||||
|
||||
#region Cloning methods
|
||||
/// <summary>
|
||||
/// fomof parent
|
||||
/// </summary>
|
||||
public string RomOf { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Create a clone of the current machine
|
||||
/// </summary>
|
||||
/// <returns>New machine with the same values as the current one</returns>
|
||||
public object Clone()
|
||||
{
|
||||
return new Machine()
|
||||
{
|
||||
Name = this.Name,
|
||||
Comment = this.Comment,
|
||||
Description = this.Description,
|
||||
Year = this.Year,
|
||||
Manufacturer = this.Manufacturer,
|
||||
Publisher = this.Publisher,
|
||||
RomOf = this.RomOf,
|
||||
CloneOf = this.CloneOf,
|
||||
SampleOf = this.SampleOf,
|
||||
Supported = this.Supported,
|
||||
SourceFile = this.SourceFile,
|
||||
Runnable = this.Runnable,
|
||||
Board = this.Board,
|
||||
RebuildTo = this.RebuildTo,
|
||||
Devices = this.Devices,
|
||||
SlotOptions = this.SlotOptions,
|
||||
Infos = this.Infos,
|
||||
MachineType = this.MachineType,
|
||||
};
|
||||
}
|
||||
/// <summary>
|
||||
/// cloneof parent
|
||||
/// </summary>
|
||||
public string CloneOf { get; set; }
|
||||
|
||||
#endregion
|
||||
}
|
||||
/// <summary>
|
||||
/// sampleof parent
|
||||
/// </summary>
|
||||
public string SampleOf { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Support status
|
||||
/// </summary>
|
||||
/// <remarks>yes = true, partial = null, no = false</remarks>
|
||||
public bool? Supported { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Emulator source file related to the machine
|
||||
/// </summary>
|
||||
public string SourceFile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Machine runnable status
|
||||
/// </summary>
|
||||
/// <remarks>yes = true, partial = null, no = false</remarks>
|
||||
public bool? Runnable { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Machine board name
|
||||
/// </summary>
|
||||
public string Board { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Rebuild location if different than machine name
|
||||
/// </summary>
|
||||
public string RebuildTo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of associated device names
|
||||
/// </summary>
|
||||
public List<string> Devices { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of slot options
|
||||
/// </summary>
|
||||
public List<string> SlotOptions { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// List of info items
|
||||
/// </summary>
|
||||
public List<Tuple<string, string>> Infos { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Type of the machine
|
||||
/// </summary>
|
||||
public MachineType MachineType { get; set; }
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constructors
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Machine object
|
||||
/// </summary>
|
||||
public Machine()
|
||||
{
|
||||
Name = null;
|
||||
Comment = null;
|
||||
Description = null;
|
||||
Year = null;
|
||||
Manufacturer = null;
|
||||
Publisher = null;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
Supported = true;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = null;
|
||||
SlotOptions = null;
|
||||
Infos = null;
|
||||
MachineType = MachineType.NULL;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create a new Machine object with the included information
|
||||
/// </summary>
|
||||
/// <param name="name">Name of the machine</param>
|
||||
/// <param name="description">Description of the machine</param>
|
||||
public Machine(string name, string description)
|
||||
{
|
||||
Name = name;
|
||||
Comment = null;
|
||||
Description = description;
|
||||
Year = null;
|
||||
Manufacturer = null;
|
||||
Publisher = null;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
Supported = true;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = null;
|
||||
SlotOptions = null;
|
||||
Infos = null;
|
||||
MachineType = MachineType.NULL;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Cloning methods
|
||||
|
||||
/// <summary>
|
||||
/// Create a clone of the current machine
|
||||
/// </summary>
|
||||
/// <returns>New machine with the same values as the current one</returns>
|
||||
public object Clone()
|
||||
{
|
||||
return new Machine()
|
||||
{
|
||||
Name = this.Name,
|
||||
Comment = this.Comment,
|
||||
Description = this.Description,
|
||||
Year = this.Year,
|
||||
Manufacturer = this.Manufacturer,
|
||||
Publisher = this.Publisher,
|
||||
RomOf = this.RomOf,
|
||||
CloneOf = this.CloneOf,
|
||||
SampleOf = this.SampleOf,
|
||||
Supported = this.Supported,
|
||||
SourceFile = this.SourceFile,
|
||||
Runnable = this.Runnable,
|
||||
Board = this.Board,
|
||||
RebuildTo = this.RebuildTo,
|
||||
Devices = this.Devices,
|
||||
SlotOptions = this.SlotOptions,
|
||||
Infos = this.Infos,
|
||||
MachineType = this.MachineType,
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user