//TODO - object initialization syntax cleanup
using System;
using System.Linq;
using System.Text;
using System.IO;
using System.Collections.Generic;
//http://digitalx.org/cue-sheet/index.html "all cue sheet information is a straight 1:1 copy from the cdrwin helpfile"
//http://www.gnu.org/software/libcdio/libcdio.html#Sectors
//this is actually a great reference. they use LSN instead of LBA.. maybe a good idea for us
namespace BizHawk.Emulation.DiscSystem
{
partial class CUE_Format2
{
public class ParseCueJob : LoggedJob
{
///
/// input: the cue string to parse
///
public string IN_CueString;
///
/// output: the resulting minimally-processed cue file
///
public CueFile OUT_CueFile;
}
///
/// Represents the contents of a cue file
///
public class CueFile
{
// (here are all the commands we can encounter)
public static class Command
{
//TODO - record line number origin of command? Kind of nice but inessential
public class CATALOG { public string Value; public override string ToString() { return string.Format("CATALOG: {0}", Value); } }
public class CDTEXTFILE { public string Path; public override string ToString() { return string.Format("CDTEXTFILE: {0}", Path); } }
public class FILE { public string Path; public FileType Type; public override string ToString() { return string.Format("FILE ({0}): {1}", Type, Path); } }
public class FLAGS { public TrackFlags Flags; public override string ToString() { return string.Format("FLAGS {0}", Flags); } }
public class INDEX { public int Number; public Timestamp Timestamp; public override string ToString() { return string.Format("INDEX {0,2} {1}", Number, Timestamp); } }
public class ISRC { public string Value; public override string ToString() { return string.Format("ISRC: {0}", Value); } }
public class PERFORMER { public string Value; public override string ToString() { return string.Format("PERFORMER: {0}", Value); } }
public class POSTGAP { public Timestamp Length; public override string ToString() { return string.Format("POSTGAP: {0}", Length); } }
public class PREGAP { public Timestamp Length; public override string ToString() { return string.Format("PREGAP: {0}", Length); } }
public class REM { public string Value; public override string ToString() { return string.Format("REM: {0}", Value); } }
public class COMMENT { public string Value; public override string ToString() { return string.Format("COMMENT: {0}", Value); } }
public class SONGWRITER { public string Value; public override string ToString() { return string.Format("SONGWRITER: {0}", Value); } }
public class TITLE { public string Value; public override string ToString() { return string.Format("TITLE: {0}", Value); } }
public class TRACK { public int Number; public TrackType Type; public override string ToString() { return string.Format("TRACK {0,2} ({1})", Number, Type); } }
}
///
/// Stuff other than the commands, global for the whole disc
///
public class DiscInfo
{
public Command.CATALOG Catalog;
public Command.ISRC ISRC;
public Command.CDTEXTFILE CDTextFile;
}
///
/// The sequential list of commands parsed out of the cue file
///
public List