Files
SabreTools/SabreTools.Library/DatItems/Auxiliary.cs

153 lines
3.4 KiB
C#
Raw Normal View History

using System.Collections.Generic;
/// <summary>
2020-08-21 15:31:19 -07:00
/// This holds all of the auxiliary types needed for proper parsing
/// </summary>
namespace SabreTools.Library.DatItems
{
#region Machine
#region ListXML
/// <summary>
/// Represents one ListXML info object
/// </summary>
public class ListXmlInfo
{
public string Name { get; set; }
public string Value { get; set; }
public ListXmlInfo(string name, string value)
{
Name = name;
Value = value;
}
}
#endregion
#region OpenMSX
/// <summary>
/// Represents the OpenMSX original value
/// </summary>
public class OpenMSXOriginal
{
public string Original { get; set; }
public bool? Value { get; set; }
public OpenMSXOriginal(string original, bool? value)
{
Original = original;
Value = value;
}
}
#endregion
2020-08-22 13:31:13 -07:00
#region ListXML
2020-08-21 15:31:19 -07:00
/// <summary>
2020-08-22 13:31:13 -07:00
/// Represents one ListXML dipswitch
/// </summary>
2020-08-22 13:31:13 -07:00
/// <remarks>Also used by SoftwareList</remarks>
public class ListXMLDipSwitch
{
public string Name { get; set; }
public string Tag { get; set; }
public string Mask { get; set; }
2020-08-22 13:31:13 -07:00
public List<ListXMLDipLocation> Locations { get; set; }
public List<ListXMLDipValue> Values { get; set; }
2020-08-22 13:31:13 -07:00
public ListXMLDipSwitch(string name, string tag, string mask)
{
Name = name;
Tag = tag;
Mask = mask;
2020-08-22 13:31:13 -07:00
Locations = new List<ListXMLDipLocation>();
Values = new List<ListXMLDipValue>();
}
}
/// <summary>
/// Represents one ListXML diplocation
/// </summary>
public class ListXMLDipLocation
{
public string Name { get; set; }
public string Number { get; set; }
public bool? Inverted { get; set; }
public ListXMLDipLocation(string name, string number, bool? inverted)
{
Name = name;
Number = number;
Inverted = inverted;
}
}
/// <summary>
2020-08-22 13:31:13 -07:00
/// Represents one ListXML dipvalue
/// </summary>
2020-08-22 13:31:13 -07:00
/// <remarks>Also used by SoftwareList</remarks>
public class ListXMLDipValue
{
public string Name { get; set; }
public string Value { get; set; }
public bool? Default { get; set; }
2020-08-22 13:31:13 -07:00
public ListXMLDipValue(string name, string value, bool? def)
{
Name = name;
Value = value;
Default = def;
}
}
2020-08-22 13:31:13 -07:00
#endregion
#region SoftwareList
2020-08-21 15:31:19 -07:00
/// <summary>
/// Represents one SoftwareList shared feature object
/// </summary>
public class SoftwareListSharedFeature
{
public string Name { get; set; }
public string Value { get; set; }
public SoftwareListSharedFeature(string name, string value)
{
Name = name;
Value = value;
}
}
#endregion
#endregion // Machine
#region DatItem
#region SoftwareList
/// <summary>
/// Represents one SoftwareList feature object
/// </summary>
public class SoftwareListFeature
{
public string Name { get; set; }
public string Value { get; set; }
public SoftwareListFeature(string name, string value)
{
Name = name;
Value = value;
}
}
#endregion
#endregion //DatItem
}