public ChunkInd(ref ChunkPtr8 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1 + ((long)c.UniqueInt2 << 32); DnaNR = c.DnaNR; NR = c.NR; }
public ChunkInd(ref ChunkPtr4 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1; DnaNR = c.DnaNR; NR = c.NR; }
public ChunkInd(Chunk4 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1; StructIndex = c.StructIndex; NumBlocks = c.NumBlocks; }
public override void FinalizeChunk(Chunk chunk, string structType, DnaID chunkCode, IntPtr oldPtr) { if ((SerializationFlags & SerializationFlags.NoDuplicateAssert) == 0) { Debug.Assert(FindPointer(oldPtr) == IntPtr.Zero); } chunk.DnaNr = Array.IndexOf(_structs, GetReverseType(structType)); chunk.ChunkCode = (int)chunkCode; IntPtr uniquePtr = GetUniquePointer(oldPtr); _chunkP.Add(oldPtr, uniquePtr); //chunk->m_oldPtr); chunk.OldPtr = uniquePtr; //oldPtr; }
public override void FinalizeChunk(Chunk chunk, string structType, DnaID chunkCode, IntPtr oldPtr) { if ((SerializationFlags & SerializationFlags.NoDuplicateAssert) == 0) { Debug.Assert(FindPointer(oldPtr) == IntPtr.Zero); } Dna.StructDecl structDecl = _dna.GetStruct(structType); for (int i = 0; i < _dna.NumStructs; i++) { if (_dna.GetStruct(i) == structDecl) { chunk.DnaNr = i; break; } } chunk.ChunkCode = (int)chunkCode; IntPtr uniquePtr = GetUniquePointer(oldPtr); _chunkP.Add(oldPtr, uniquePtr); //chunk->m_oldPtr); chunk.OldPtr = uniquePtr; //oldPtr; }
public abstract void FinalizeChunk(Chunk chunkPtr, string structType, DnaID chunkCode, IntPtr oldPtr);
private void FinalizeChunk(IntPtr chunkPtr, string structType, DnaID chunkCode, IntPtr oldPtr) { FinalizeChunk(new Chunk(chunkPtr, true), structType, chunkCode, oldPtr); }
public override void FinalizeChunk(Chunk chunk, string structType, DnaID chunkCode, IntPtr oldPtr) { if ((SerializationFlags & SerializationFlags.NoDuplicateAssert) == 0) { Debug.Assert(FindPointer(oldPtr) == IntPtr.Zero); } chunk.DnaNr = Array.IndexOf(_structs, GetReverseType(structType)); chunk.ChunkCode = (int)chunkCode; IntPtr uniquePtr = GetUniquePointer(oldPtr); _chunkP.Add(oldPtr, uniquePtr);//chunk->m_oldPtr); chunk.OldPtr = uniquePtr;//oldPtr; }
public override void FinalizeChunk(Chunk chunk, string structType, DnaID chunkCode, IntPtr oldPtr) { if ((SerializationFlags & SerializationFlags.NoDuplicateAssert) == 0) { Debug.Assert(FindPointer(oldPtr) == IntPtr.Zero); } Dna.StructDecl structDecl = _dna.GetStruct(structType); for (int i = 0; i < _dna.NumStructs; i++) { if (_dna.GetStruct(i) == structDecl) { chunk.DnaNr = i; break; } } chunk.ChunkCode = (int)chunkCode; IntPtr uniquePtr = GetUniquePointer(oldPtr); _chunkP.Add(oldPtr, uniquePtr);//chunk->m_oldPtr); chunk.OldPtr = uniquePtr;//oldPtr; }
public ChunkInd(Chunk8 c) { Code = (DnaID)c.Code; Length = c.Length; OldPtr = c.UniqueInt1 + ((long)c.UniqueInt2 << 32); StructIndex = c.StructIndex; NumBlocks = c.NumBlocks; }