Promote DataArea, DiskArea, and Part

This commit is contained in:
Matt Nadareski
2020-09-04 14:10:35 -07:00
parent a416064bc0
commit 40ca4e39a5
14 changed files with 1011 additions and 445 deletions

View File

@@ -1,4 +1,5 @@
using System.Collections.Generic;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
@@ -32,78 +33,5 @@ namespace SabreTools.Library.DatItems
#endregion
#region SoftwareList
/// <summary>
/// Represents one SoftwareList dataarea object
/// </summary>
/// <remarks>
/// One DataArea can contain multiple Rom items
/// </remarks>
[JsonObject("dataarea")]
public class DataArea
{
/// <summary>
/// Name of the item
/// </summary>
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Name { get; set; }
/// <summary>
/// Total size of the area
/// </summary>
[JsonProperty("size", DefaultValueHandling = DefaultValueHandling.Ignore)]
public long? Size { get; set; }
/// <summary>
/// Word width for the area
/// </summary>
[JsonProperty("width", DefaultValueHandling = DefaultValueHandling.Ignore)]
public long? Width { get; set; }
/// <summary>
/// Byte endianness of the area
/// </summary>
[JsonProperty("endianness", DefaultValueHandling = DefaultValueHandling.Ignore)]
public Endianness Endianness { get; set; }
}
/// <summary>
/// Represents one SoftwareList diskarea object
/// </summary>
/// <remarks>
/// One DiskArea can contain multiple Disk items
/// </remarks>
[JsonObject("diskarea")]
public class DiskArea
{
/// <summary>
/// Name of the item
/// </summary>
[JsonProperty("name", DefaultValueHandling = DefaultValueHandling.Ignore)]
public string Name { get; set; }
}
/// <summary>
/// Represents one SoftwareList part object
/// </summary>
/// <remarks>
/// One Part can contain multiple PartFeature, DataArea, DiskArea, and DipSwitch items
/// </remarks>
[JsonObject("part")]
public class Part
{
[JsonProperty("name")]
public string Name { get; set; }
[JsonProperty("interface")]
public string Interface { get; set; }
[JsonProperty("features", DefaultValueHandling = DefaultValueHandling.Ignore)]
public List<PartFeature> Features { get; set; }
}
#endregion
#endregion //DatItem
}