// Copyright 2017-2018 Alexander Luzgarev
using System;
namespace MatFileHandler
{
///
/// Raw variable read from the file.
/// This gives a way to deal with "subsystem data" which looks like
/// a variable and can only be detected by comparing its offset with
/// the value stored in the file's header.
///
internal class RawVariable
{
///
/// Initializes a new instance of the class.
///
/// Offset of the variable in the source file.
/// Data element parsed from the file.
internal RawVariable(long offset, DataElement dataElement)
{
Offset = offset;
DataElement = dataElement ?? throw new ArgumentNullException(nameof(dataElement));
}
///
/// Gets data element with the variable's contents.
///
public DataElement DataElement { get; }
///
/// Gets offset of the variable in the .mat file.
///
public long Offset { get; }
}
}