Example #1
0
        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);
        }
Example #2
0
        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;
        }