mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[DatItems/] Items -> DatItems for clarity
This commit is contained in:
110
SabreTools.Library/DatItems/Machine.cs
Normal file
110
SabreTools.Library/DatItems/Machine.cs
Normal file
@@ -0,0 +1,110 @@
|
||||
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
|
||||
|
||||
// Machine information
|
||||
public string Name;
|
||||
public string Comment;
|
||||
public string Description;
|
||||
public string Year;
|
||||
public string Manufacturer;
|
||||
public string RomOf;
|
||||
public string CloneOf;
|
||||
public string SampleOf;
|
||||
public string SourceFile;
|
||||
public bool? Runnable;
|
||||
public string Board;
|
||||
public string RebuildTo;
|
||||
public List<string> Devices;
|
||||
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;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = 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;
|
||||
RomOf = null;
|
||||
CloneOf = null;
|
||||
SampleOf = null;
|
||||
SourceFile = null;
|
||||
Runnable = null;
|
||||
Board = null;
|
||||
RebuildTo = null;
|
||||
Devices = 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,
|
||||
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,
|
||||
};
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user