Files
UmaViewer/Assets/Scripts/Audio/NAudio/FileFormats/SoundFont/StructureBuilder.cs
T
2022-09-10 16:59:44 +08:00

39 lines
604 B
C#

using System;
using System.Collections.Generic;
using System.IO;
using System.Collections;
namespace NAudio.SoundFont
{
/// <summary>
/// base class for structures that can read themselves
/// </summary>
internal abstract class StructureBuilder<T>
{
protected List<T> data;
public StructureBuilder()
{
Reset();
}
public abstract T Read(BinaryReader br);
public abstract void Write(BinaryWriter bw,T o);
public abstract int Length { get; }
public void Reset()
{
data = new List<T>();
}
public T[] Data
{
get
{
return data.ToArray();
}
}
}
}