Example #1
0
        /// <summary>
        /// Load from file.
        /// </summary>
        public override void LoadFromFile(string directory, string name)
        {
            Offsets.Clear();
            MultiValues.Clear();

            base.LoadFromFile(directory, name);

            FileSpanUtilities.LoadFromFile(directory, InsertSuffix(name, "MultiValue"), MultiValues);

            Offsets.Fill(Count, default);
            CalculateOffsets();
        }
Example #2
0
        /// <summary>
        /// Save to file.
        /// </summary>
        public override void SaveToFile(string directory, string name)
        {
            // Only save it if it's known to be ordered
            if (MayBeUnordered)
            {
                // TODO: make a way to reorder it!
                throw new Exception("Can't save MultiValueTable that may contain unordered data");
            }

            base.SaveToFile(directory, name);
            // we don't need to save Offsets since it is calculated from the counts in SingleValues
            FileSpanUtilities.SaveToFile(directory, InsertSuffix(name, "MultiValue"), MultiValues);
        }
Example #3
0
 /// <summary>
 /// Save to file.
 /// </summary>
 public override void SaveToFile(string directory, string name)
 {
     base.SaveToFile(directory, name);
     // we don't need to save m_offsets since it is calculated from the counts in SingleValues
     FileSpanUtilities.SaveToFile(directory, InsertSuffix(name, "MultiValue"), MultiValues);
 }