/// <summary>
 /// Constructor
 /// </summary>
 /// <param name="file">File</param>
 /// <param name="structure">Structure</param>
 public FileAndStructure(HexBufferFile file, ComplexData structure)
 {
     if (file == null)
     {
         throw new ArgumentNullException(nameof(file));
     }
     if (structure == null)
     {
         throw new ArgumentNullException(nameof(structure));
     }
     File      = file;
     Structure = structure;
 }
Exemple #2
0
 /// <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;
Exemple #3
0
 /// <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;
Exemple #4
0
 /// <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>
 /// 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));
 }
Exemple #6
0
 /// <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;
Exemple #7
0
 /// <summary>
 /// Writes the field and value
 /// </summary>
 /// <param name="structure">Owner structure</param>
 /// <param name="position">Position of field within <paramref name="structure"/></param>
 public virtual void WriteFieldAndValue(ComplexData structure, HexPosition position)
 {
     WriteField(structure, position);
     WriteEquals();
     WriteValue(structure, position);
 }
Exemple #8
0
 /// <summary>
 /// Writes the field value
 /// </summary>
 /// <param name="structure">Owner structure</param>
 /// <param name="position">Position of field within <paramref name="structure"/></param>
 public abstract void WriteValue(ComplexData structure, HexPosition position);