Files
SabreTools.Serialization/SabreTools.Data.Models/SGA/Directory.cs
Matt Nadareski 7689c6dd07 Libraries
This change looks dramatic, but it's just separating out the already-split namespaces into separate top-level folders. In theory, every single one could be built into their own Nuget package. `SabreTools.Serialization` still builds the normal Nuget package that is used by all other projects and includes all namespaces.
2026-03-21 16:26:56 -04:00

52 lines
1.5 KiB
C#

using System.Collections.Generic;
namespace SabreTools.Data.Models.SGA
{
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/SGAFile.h"/>
public abstract class Directory
{
/// <summary>
/// Source SGA file
/// </summary>
public Archive? File { get; set; }
}
/// <summary>
/// Specialization File7 and up where the CRC moved to the header and the CRC is of the compressed data and there are stronger hashes.
/// </summary>
/// <see href="https://github.com/RavuAlHemio/hllib/blob/master/HLLib/SGAFile.h"/>
public class Directory<THeader, TDirectoryHeader, TSection, TFolder, TFile, U> : Directory
where THeader : Header
where TDirectoryHeader : DirectoryHeader<U>
where TSection : Section<U>
where TFolder : Folder<U>
where TFile : File
where U : notnull
{
/// <summary>
/// Directory header data
/// </summary>
public TDirectoryHeader? DirectoryHeader { get; set; }
/// <summary>
/// Sections data
/// </summary>
public TSection[] Sections { get; set; } = [];
/// <summary>
/// Folders data
/// </summary>
public TFolder[] Folders { get; set; } = [];
/// <summary>
/// Files data
/// </summary>
public TFile[] Files { get; set; } = [];
/// <summary>
/// String table data
/// </summary>
public Dictionary<long, string> StringTable { get; set; } = [];
}
}