Exemplo n.º 1
0
 public void CreateDefaultSegment()
 {
     if (SegmentDirectory.Count == 0)
     {
         SegmentDirectory.Add(new SubGridCellPassesDataSegmentInfo());
     }
 }
Exemplo n.º 2
0
        public void Read(BinaryReader reader)
        {
            if (reader.ReadBoolean())
            {
                if (GlobalLatestCells == null)
                {
                    throw new TRexSubGridIOException("Cannot read sub grid directory without global latest values available");
                }
                GlobalLatestCells.Read(reader);
            }

            // Read in the directory of segments
            int SegmentCount = reader.ReadInt32();

            for (int I = 0; I < SegmentCount; I++)
            {
                var segmentInfo = new SubGridCellPassesDataSegmentInfo();
                segmentInfo.Read(reader);

                segmentInfo.ExistsInPersistentStore = true;
                SegmentDirectory.Add(segmentInfo);
            }

            ExistsInPersistentStore = true;
        }
Exemplo n.º 3
0
        public void Clear()
        {
            // Remove the global latest cell passes
            GlobalLatestCells?.Clear();

            // Unhook all loaded segments from the segment directory
            SegmentDirectory.ForEach(x =>
            {
                x.Segment.Dispose();
                x.Segment = null;
            });
        }