Fix encapsulation of IN_*/OUT_* in DiscSystem
these properties imply builder semantics but the classes aren't builders
This commit is contained in:
parent
21cdf5120b
commit
0706b96afe
|
@ -318,11 +318,12 @@ namespace BizHawk.Client.DiscoHawk
|
|||
sw.WriteLine("BEGIN COMPARE: {0}\nSRC {1} vs DST {2}", infile, loadDiscInterface, cmpif);
|
||||
|
||||
//reload the original disc, with new policies as needed
|
||||
var dmj = new DiscMountJob { IN_DiscInterface = loadDiscInterface, IN_FromPath = infile };
|
||||
if (cmpif == DiscInterface.MednaDisc)
|
||||
var dmj = new DiscMountJob
|
||||
{
|
||||
dmj.IN_DiscMountPolicy.CUE_PregapContradictionModeA = false;
|
||||
}
|
||||
IN_DiscInterface = loadDiscInterface,
|
||||
IN_DiscMountPolicy = new DiscMountPolicy { CUE_PregapContradictionModeA = cmpif != DiscInterface.MednaDisc },
|
||||
IN_FromPath = infile
|
||||
};
|
||||
|
||||
dmj.Run();
|
||||
|
||||
|
|
|
@ -121,33 +121,33 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
/// <summary>
|
||||
/// input: the CueFile to analyze
|
||||
/// </summary>
|
||||
public CUE_File IN_CueFile;
|
||||
public CUE_File IN_CueFile { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The context used for this compiling job
|
||||
/// TODO - rename something like context
|
||||
/// </summary>
|
||||
public CUE_Context IN_CueContext;
|
||||
public CUE_Context IN_CueContext { internal get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: high level disc info
|
||||
/// </summary>
|
||||
public CompiledDiscInfo OUT_CompiledDiscInfo;
|
||||
public CompiledDiscInfo OUT_CompiledDiscInfo { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: CD-Text set at the global level (before any track commands)
|
||||
/// </summary>
|
||||
public CompiledCDText OUT_GlobalCDText;
|
||||
public CompiledCDText OUT_GlobalCDText { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: The compiled file info
|
||||
/// </summary>
|
||||
public List<CompiledCueFile> OUT_CompiledCueFiles;
|
||||
public List<CompiledCueFile> OUT_CompiledCueFiles { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: The compiled track info
|
||||
/// </summary>
|
||||
public List<CompiledCueTrack> OUT_CompiledCueTracks;
|
||||
public List<CompiledCueTrack> OUT_CompiledCueTracks { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: An integer between 0 and 10 indicating how costly it will be to load this disc completely.
|
||||
|
@ -156,7 +156,7 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
/// 1 - Requires minimal processing (indexing ECM)
|
||||
/// 10 - Requires ages, decoding audio data, etc.
|
||||
/// </summary>
|
||||
public int OUT_LoadTime;
|
||||
public int OUT_LoadTime { get; private set; }
|
||||
|
||||
//-----------------------------------------------------------------
|
||||
|
||||
|
|
|
@ -33,12 +33,12 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
/// <summary>
|
||||
/// The results of the compile job, a prerequisite for this
|
||||
/// </summary>
|
||||
public CompileCueJob IN_CompileJob;
|
||||
public CompileCueJob IN_CompileJob { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The resulting disc
|
||||
/// </summary>
|
||||
public Disc OUT_Disc;
|
||||
public Disc OUT_Disc { get; private set; }
|
||||
|
||||
private enum BurnType
|
||||
{
|
||||
|
|
|
@ -17,17 +17,17 @@ namespace BizHawk.Emulation.DiscSystem.CUE
|
|||
/// <summary>
|
||||
/// input: the cue string to parse
|
||||
/// </summary>
|
||||
public string IN_CueString;
|
||||
public string IN_CueString { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// output: the resulting minimally-processed cue file
|
||||
/// </summary>
|
||||
public CUE_File OUT_CueFile;
|
||||
public CUE_File OUT_CueFile { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Indicates whether parsing will be strict or lenient
|
||||
/// </summary>
|
||||
public bool IN_Strict = false;
|
||||
public bool IN_Strict { private get; set; } = false;
|
||||
|
||||
|
||||
class CueLineParser
|
||||
|
|
|
@ -27,12 +27,12 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
/// <summary>
|
||||
/// Whether there were any errors
|
||||
/// </summary>
|
||||
public bool OUT_ErrorLevel = false;
|
||||
public bool OUT_ErrorLevel { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// output: log transcript of the job
|
||||
/// </summary>
|
||||
public string OUT_Log;
|
||||
public string OUT_Log { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Finishes logging. Flushes the output and closes the logging mechanism
|
||||
|
|
|
@ -14,34 +14,34 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
/// <summary>
|
||||
/// The filename to be loaded
|
||||
/// </summary>
|
||||
public string IN_FromPath;
|
||||
public string IN_FromPath { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Slow-loading cues won't finish loading if this threshold is exceeded.
|
||||
/// Set to 10 to always load a cue
|
||||
/// </summary>
|
||||
public int IN_SlowLoadAbortThreshold = 10;
|
||||
public int IN_SlowLoadAbortThreshold { private get; set; } = 10;
|
||||
|
||||
/// <summary>
|
||||
/// Cryptic policies to be used when mounting the disc.
|
||||
/// </summary>
|
||||
public DiscMountPolicy IN_DiscMountPolicy = new DiscMountPolicy();
|
||||
public DiscMountPolicy IN_DiscMountPolicy { private get; set; } = new DiscMountPolicy();
|
||||
|
||||
/// <summary>
|
||||
/// The interface to be used for loading the disc.
|
||||
/// Usually you'll want DiscInterface.BizHawk, but others can be used for A/B testing
|
||||
/// </summary>
|
||||
public DiscInterface IN_DiscInterface = DiscInterface.BizHawk;
|
||||
public DiscInterface IN_DiscInterface { private get; set; } = DiscInterface.BizHawk;
|
||||
|
||||
/// <summary>
|
||||
/// The resulting disc
|
||||
/// </summary>
|
||||
public Disc OUT_Disc;
|
||||
public Disc OUT_Disc { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether a mount operation was aborted due to being too slow
|
||||
/// </summary>
|
||||
public bool OUT_SlowLoadAborted;
|
||||
public bool OUT_SlowLoadAborted { get; private set; }
|
||||
|
||||
/// <exception cref="NotSupportedException"><see cref="IN_DiscInterface"/> is <see cref="DiscInterface.LibMirage"/></exception>
|
||||
public void Run()
|
||||
|
|
|
@ -13,12 +13,12 @@ namespace BizHawk.Emulation.DiscSystem.SBI
|
|||
/// <summary>
|
||||
/// The file to be loaded
|
||||
/// </summary>
|
||||
public string IN_Path;
|
||||
public string IN_Path { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The resulting interpreted data
|
||||
/// </summary>
|
||||
public SubQPatchData OUT_Data;
|
||||
public SubQPatchData OUT_Data { get; private set; }
|
||||
|
||||
/// <exception cref="SBIParseException">file at <see cref="IN_Path"/> does not contain valid header or contains misformatted record</exception>
|
||||
public void Run()
|
||||
|
|
|
@ -14,22 +14,22 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
/// <summary>
|
||||
/// "First Recorded Track Number" value for TOC (usually 1)
|
||||
/// </summary>
|
||||
public int IN_FirstRecordedTrackNumber;
|
||||
public int IN_FirstRecordedTrackNumber { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// "Last Recorded Track Number" value for TOC
|
||||
/// </summary>
|
||||
public int IN_LastRecordedTrackNumber;
|
||||
public int IN_LastRecordedTrackNumber { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The absolute timestamp of the lead-out track
|
||||
/// </summary>
|
||||
public int IN_LeadoutTimestamp;
|
||||
public int IN_LeadoutTimestamp { private get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The session format for this TOC
|
||||
/// </summary>
|
||||
public SessionFormat IN_Session1Format;
|
||||
public SessionFormat IN_Session1Format { private get; set; }
|
||||
|
||||
/// <summary>appends the new entries to the provided list</summary>
|
||||
/// <exception cref="InvalidOperationException"><see cref="IN_Session1Format"/> is <see cref="SessionFormat.None"/> or a non-member</exception>
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace BizHawk.Emulation.DiscSystem
|
|||
{
|
||||
class Synthesize_DiscStructure_From_DiscTOC_Job
|
||||
{
|
||||
public Disc IN_Disc;
|
||||
public Disc IN_Disc { private get; set; }
|
||||
public DiscTOC TOCRaw;
|
||||
public DiscStructure Result;
|
||||
|
||||
|
|
Loading…
Reference in New Issue