2017-01-27 16:42:24 -08:00
|
|
|
|
using System;
|
|
|
|
|
|
using System.Collections.Generic;
|
2017-01-09 15:58:29 -08:00
|
|
|
|
|
|
|
|
|
|
using SabreTools.Helper.Data;
|
2017-01-08 22:48:19 -08:00
|
|
|
|
|
|
|
|
|
|
namespace SabreTools.Helper.Dats
|
2016-10-24 12:58:57 -07:00
|
|
|
|
{
|
2017-03-16 23:34:14 -07:00
|
|
|
|
public class Machine : ICloneable
|
2016-10-24 12:58:57 -07:00
|
|
|
|
{
|
|
|
|
|
|
#region Protected instance variables
|
|
|
|
|
|
|
|
|
|
|
|
// Machine information
|
|
|
|
|
|
protected string _name;
|
|
|
|
|
|
protected string _comment;
|
|
|
|
|
|
protected string _description;
|
|
|
|
|
|
protected string _year;
|
|
|
|
|
|
protected string _manufacturer;
|
|
|
|
|
|
protected string _romOf;
|
|
|
|
|
|
protected string _cloneOf;
|
|
|
|
|
|
protected string _sampleOf;
|
|
|
|
|
|
protected string _sourceFile;
|
2017-02-02 23:04:24 -08:00
|
|
|
|
protected bool? _runnable;
|
2016-10-24 12:58:57 -07:00
|
|
|
|
protected string _board;
|
|
|
|
|
|
protected string _rebuildTo;
|
2017-01-09 15:58:29 -08:00
|
|
|
|
protected List<string> _devices;
|
2017-01-08 22:48:19 -08:00
|
|
|
|
protected MachineType _machineType;
|
2016-10-24 12:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Publicly facing variables
|
|
|
|
|
|
|
|
|
|
|
|
// Machine information
|
|
|
|
|
|
public string Name
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _name; }
|
|
|
|
|
|
set { _name = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string Comment
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _comment; }
|
|
|
|
|
|
set { _comment = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string Description
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _description; }
|
|
|
|
|
|
set { _description = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string Year
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _year; }
|
|
|
|
|
|
set { _year = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string Manufacturer
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _manufacturer; }
|
|
|
|
|
|
set { _manufacturer = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string RomOf
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _romOf; }
|
|
|
|
|
|
set { _romOf = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string CloneOf
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _cloneOf; }
|
|
|
|
|
|
set { _cloneOf = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string SampleOf
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _sampleOf; }
|
|
|
|
|
|
set { _sampleOf = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string SourceFile
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _sourceFile; }
|
|
|
|
|
|
set { _sourceFile = value; }
|
|
|
|
|
|
}
|
2017-02-02 23:04:24 -08:00
|
|
|
|
public bool? Runnable
|
2017-01-08 22:06:46 -08:00
|
|
|
|
{
|
|
|
|
|
|
get { return _runnable; }
|
|
|
|
|
|
set { _runnable = value; }
|
|
|
|
|
|
}
|
2016-10-24 12:58:57 -07:00
|
|
|
|
public string Board
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _board; }
|
|
|
|
|
|
set { _board = value; }
|
|
|
|
|
|
}
|
|
|
|
|
|
public string RebuildTo
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _rebuildTo; }
|
|
|
|
|
|
set { _rebuildTo = value; }
|
|
|
|
|
|
}
|
2017-01-09 15:58:29 -08:00
|
|
|
|
public List<string> Devices
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _devices; }
|
|
|
|
|
|
set { _devices = value; }
|
|
|
|
|
|
}
|
2017-01-08 22:48:19 -08:00
|
|
|
|
public MachineType MachineType
|
|
|
|
|
|
{
|
|
|
|
|
|
get { return _machineType; }
|
|
|
|
|
|
set { _machineType = value; }
|
|
|
|
|
|
}
|
2016-10-24 12:58:57 -07:00
|
|
|
|
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
|
|
#region Constructors
|
|
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
|
/// Create a default, empty Machine object
|
|
|
|
|
|
/// </summary>
|
|
|
|
|
|
public Machine()
|
|
|
|
|
|
{
|
2017-01-27 16:53:29 -08:00
|
|
|
|
_name = "";
|
|
|
|
|
|
_description = "";
|
2017-02-02 23:04:24 -08:00
|
|
|
|
_runnable = null;
|
2016-10-24 12:58:57 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/// <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;
|
|
|
|
|
|
_description = description;
|
2017-02-02 23:04:24 -08:00
|
|
|
|
_runnable = null;
|
2016-10-24 12:58:57 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2017-03-16 23:34:14 -07:00
|
|
|
|
|
|
|
|
|
|
#region Cloneing
|
|
|
|
|
|
|
|
|
|
|
|
public object Clone()
|
|
|
|
|
|
{
|
|
|
|
|
|
return new Machine()
|
|
|
|
|
|
{
|
|
|
|
|
|
Name = _name,
|
|
|
|
|
|
Comment = _comment,
|
|
|
|
|
|
Description = _description,
|
|
|
|
|
|
Year = _year,
|
|
|
|
|
|
Manufacturer = _manufacturer,
|
|
|
|
|
|
RomOf = _romOf,
|
|
|
|
|
|
CloneOf = _cloneOf,
|
|
|
|
|
|
SampleOf = _sampleOf,
|
|
|
|
|
|
SourceFile = _sourceFile,
|
|
|
|
|
|
Runnable = _runnable,
|
|
|
|
|
|
Board = _board,
|
|
|
|
|
|
RebuildTo = _rebuildTo,
|
|
|
|
|
|
Devices = _devices,
|
|
|
|
|
|
MachineType = _machineType,
|
|
|
|
|
|
};
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endregion
|
2016-10-24 12:58:57 -07:00
|
|
|
|
}
|
|
|
|
|
|
}
|