public BBDataCache(ByteBuffer buffer, int id) { Checker.Assert(buffer != null && id != 0); _bBData = new BBData <T>(buffer.id, id); _buffer = buffer; _version = buffer.version; _headerPtrCache = buffer.FindHeaderPtrWithID(id); _dataPtrCache = buffer.GetData <T>(_headerPtrCache); }
internal BBDataCache(ByteBuffer buffer, BBDataHeader *headerPtr, T *dataPtr) { Checker.Assert(buffer != null && buffer.isValid && headerPtr != null && dataPtr != null); _bBData = new BBData <T>(buffer.id, headerPtr->id); _buffer = buffer; _version = buffer.version; _headerPtrCache = headerPtr; _dataPtrCache = dataPtr; }