mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Machine] Slim down struct
This commit is contained in:
@@ -9,21 +9,6 @@ namespace SabreTools.Library.Dats
|
|||||||
{
|
{
|
||||||
#region Protected instance variables
|
#region Protected instance variables
|
||||||
|
|
||||||
// Machine information
|
|
||||||
private string _name;
|
|
||||||
private string _comment;
|
|
||||||
private string _description;
|
|
||||||
private string _year;
|
|
||||||
private string _manufacturer;
|
|
||||||
private string _romOf;
|
|
||||||
private string _cloneOf;
|
|
||||||
private string _sampleOf;
|
|
||||||
private string _sourceFile;
|
|
||||||
private bool? _runnable;
|
|
||||||
private string _board;
|
|
||||||
private string _rebuildTo;
|
|
||||||
private List<string> _devices;
|
|
||||||
private MachineType _machineType;
|
|
||||||
private Guid _guid;
|
private Guid _guid;
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
@@ -31,76 +16,20 @@ namespace SabreTools.Library.Dats
|
|||||||
#region Publicly facing variables
|
#region Publicly facing variables
|
||||||
|
|
||||||
// Machine information
|
// Machine information
|
||||||
public string Name
|
public string Name;
|
||||||
{
|
public string Comment;
|
||||||
get { return _name; }
|
public string Description;
|
||||||
set { _name = value; }
|
public string Year;
|
||||||
}
|
public string Manufacturer;
|
||||||
public string Comment
|
public string RomOf;
|
||||||
{
|
public string CloneOf;
|
||||||
get { return _comment; }
|
public string SampleOf;
|
||||||
set { _comment = value; }
|
public string SourceFile;
|
||||||
}
|
public bool? Runnable;
|
||||||
public string Description
|
public string Board;
|
||||||
{
|
public string RebuildTo;
|
||||||
get { return _description; }
|
public List<string> Devices;
|
||||||
set { _description = value; }
|
public MachineType MachineType;
|
||||||
}
|
|
||||||
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; }
|
|
||||||
}
|
|
||||||
public bool? Runnable
|
|
||||||
{
|
|
||||||
get { return _runnable; }
|
|
||||||
set { _runnable = value; }
|
|
||||||
}
|
|
||||||
public string Board
|
|
||||||
{
|
|
||||||
get { return _board; }
|
|
||||||
set { _board = value; }
|
|
||||||
}
|
|
||||||
public string RebuildTo
|
|
||||||
{
|
|
||||||
get { return _rebuildTo; }
|
|
||||||
set { _rebuildTo = value; }
|
|
||||||
}
|
|
||||||
public List<string> Devices
|
|
||||||
{
|
|
||||||
get { return _devices; }
|
|
||||||
set { _devices = value; }
|
|
||||||
}
|
|
||||||
public MachineType MachineType
|
|
||||||
{
|
|
||||||
get { return _machineType; }
|
|
||||||
set { _machineType = value; }
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
@@ -113,20 +42,20 @@ namespace SabreTools.Library.Dats
|
|||||||
/// <param name="description">Description of the machine</param>
|
/// <param name="description">Description of the machine</param>
|
||||||
public Machine(string name, string description)
|
public Machine(string name, string description)
|
||||||
{
|
{
|
||||||
_name = name;
|
Name = name;
|
||||||
_comment = null;
|
Comment = null;
|
||||||
_description = description;
|
Description = description;
|
||||||
_year = null;
|
Year = null;
|
||||||
_manufacturer = null;
|
Manufacturer = null;
|
||||||
_romOf = null;
|
RomOf = null;
|
||||||
_cloneOf = null;
|
CloneOf = null;
|
||||||
_sampleOf = null;
|
SampleOf = null;
|
||||||
_sourceFile = null;
|
SourceFile = null;
|
||||||
_runnable = null;
|
Runnable = null;
|
||||||
_board = null;
|
Board = null;
|
||||||
_rebuildTo = null;
|
RebuildTo = null;
|
||||||
_devices = null;
|
Devices = null;
|
||||||
_machineType = MachineType.NULL;
|
MachineType = MachineType.NULL;
|
||||||
_guid = new Guid();
|
_guid = new Guid();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -185,65 +114,5 @@ namespace SabreTools.Library.Dats
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Update fields
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Append a string to the description
|
|
||||||
/// </summary>
|
|
||||||
public void AppendDescription(string append)
|
|
||||||
{
|
|
||||||
UpdateDescription(this.Description + append);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Append a string to the name
|
|
||||||
/// </summary>
|
|
||||||
public void AppendName(string append)
|
|
||||||
{
|
|
||||||
UpdateName(this.Name + append);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the cloneof
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateCloneOf(string update)
|
|
||||||
{
|
|
||||||
_cloneOf = update;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the description
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateDescription(string update)
|
|
||||||
{
|
|
||||||
_description = update;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the romof
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateRomOf(string update)
|
|
||||||
{
|
|
||||||
_romOf = update;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the sampleof
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateSampleOf(string update)
|
|
||||||
{
|
|
||||||
_sampleOf = update;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Update the name
|
|
||||||
/// </summary>
|
|
||||||
public void UpdateName(string update)
|
|
||||||
{
|
|
||||||
_name = update;
|
|
||||||
}
|
|
||||||
|
|
||||||
#endregion
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user