/// <summary> /// Returns the span the field value references or null. The span can be empty. /// </summary> /// <param name="file">File</param> /// <returns></returns> public virtual HexSpan?GetFieldReferenceSpan(HexBufferFile file) => null;
/// <summary> /// Returns a reference or null /// </summary> /// <param name="file">File</param> /// <param name="structure">Structure</param> /// <param name="position">Position</param> /// <returns></returns> public virtual object?GetReference(HexBufferFile file, ComplexData structure, HexPosition position) => null;
/// <summary> /// Returns the span the field value references or null. The span can be empty. /// </summary> /// <param name="file">File</param> /// <param name="structure">Structure</param> /// <param name="position">Position</param> /// <returns></returns> public virtual HexSpan?GetFieldReferenceSpan(HexBufferFile file, ComplexData structure, HexPosition position) => null;
/// <summary> /// Gets indexes of sub structures or null. The returned array must be sorted. If the array /// is empty, every field is a sub structure. /// </summary> /// <param name="file">File</param> /// <param name="structure">Structure</param> /// <param name="position">Position</param> /// <returns></returns> public virtual HexIndexes[]? GetSubStructureIndexes(HexBufferFile file, ComplexData structure, HexPosition position) => null;
/// <summary> /// Removes a file /// </summary> /// <param name="file">File to remove</param> public abstract void RemoveFile(HexBufferFile file);
/// <summary> /// Constructor /// </summary> /// <param name="file">File</param> /// <param name="structure">Structure</param> public FileAndStructure(HexBufferFile file, ComplexData structure) { File = file ?? throw new ArgumentNullException(nameof(file)); Structure = structure ?? throw new ArgumentNullException(nameof(structure)); }
/// <summary> /// Creates a <see cref="StructureProvider"/> or returns null /// </summary> /// <param name="file">Buffer file</param> /// <returns></returns> public abstract StructureProvider Create(HexBufferFile file);
/// <summary> /// Returns a tooltip or null /// </summary> /// <param name="file">File</param> /// <param name="structure">Structure</param> /// <param name="position">Position</param> /// <returns></returns> public virtual object GetToolTip(HexBufferFile file, ComplexData structure, HexPosition position) => null;