Files
SabreTools/SabreTools.Library/DatItems/Machine.cs

127 lines
2.7 KiB
C#
Raw Normal View History

2017-01-27 16:42:24 -08:00
using System;
using System.Collections.Generic;
2017-05-04 02:41:11 -07:00
using SabreTools.Library.Data;
namespace SabreTools.Library.DatItems
{
2017-10-09 12:58:46 -07:00
/// <summary>
/// Represents the information specific to a set/game/machine
/// </summary>
public class Machine : ICloneable
{
#region Publicly facing variables
// Machine information
2017-06-16 17:09:34 -07:00
public string Name;
public string Comment;
public string Description;
public string Year;
public string Manufacturer;
public string Publisher;
2017-06-16 17:09:34 -07:00
public string RomOf;
public string CloneOf;
public string SampleOf;
public bool? Supported;
2017-06-16 17:09:34 -07:00
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;
2017-06-16 17:09:34 -07:00
public MachineType MachineType;
#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;
2018-01-15 01:21:33 -08:00
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)
{
2017-06-16 17:09:34 -07:00
Name = name;
Comment = null;
Description = description;
Year = null;
Manufacturer = null;
Publisher = null;
2017-06-16 17:09:34 -07:00
RomOf = null;
CloneOf = null;
SampleOf = null;
Supported = true;
2017-06-16 17:09:34 -07:00
SourceFile = null;
Runnable = null;
Board = null;
RebuildTo = null;
Devices = null;
SlotOptions = null;
2018-01-15 01:21:33 -08:00
Infos = null;
2017-06-16 17:09:34 -07:00
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,
2018-01-15 01:21:33 -08:00
Infos = this.Infos,
MachineType = this.MachineType,
};
}
#endregion
}
}