Lines Matching refs:flatbuf
180 std::vector<uint8_t> *flatbuf, in ResizeContext() argument
183 startptr_(vector_data(*flatbuf) + start), in ResizeContext()
185 buf_(*flatbuf), in ResizeContext()
186 dag_check_(flatbuf->size() / sizeof(uoffset_t), false) { in ResizeContext()
308 const String *str, std::vector<uint8_t> *flatbuf, in SetString() argument
312 reinterpret_cast<const uint8_t *>(str) - vector_data(*flatbuf)); in SetString()
316 memset(vector_data(*flatbuf) + start, 0, str->size()); in SetString()
318 ResizeContext(schema, start, delta, flatbuf, root_table); in SetString()
320 WriteScalar(vector_data(*flatbuf) + str_start, in SetString()
324 memcpy(vector_data(*flatbuf) + start, val.c_str(), val.size() + 1); in SetString()
329 uoffset_t elem_size, std::vector<uint8_t> *flatbuf, in ResizeAnyVector() argument
334 reinterpret_cast<const uint8_t *>(vec) - vector_data(*flatbuf); in ResizeAnyVector()
342 memset(vector_data(*flatbuf) + start - size_clear, 0, size_clear); in ResizeAnyVector()
344 ResizeContext(schema, start, delta_bytes, flatbuf, root_table); in ResizeAnyVector()
345 WriteScalar(vector_data(*flatbuf) + vec_start, newsize); // Length field. in ResizeAnyVector()
348 memset(vector_data(*flatbuf) + start, 0, delta_elem * elem_size); in ResizeAnyVector()
351 return vector_data(*flatbuf) + start; in ResizeAnyVector()
354 const uint8_t *AddFlatBuffer(std::vector<uint8_t> &flatbuf, in AddFlatBuffer() argument
358 while ((flatbuf.size() & (sizeof(uoffset_t) - 1)) || in AddFlatBuffer()
359 !(flatbuf.size() & (sizeof(largest_scalar_t) - 1))) { in AddFlatBuffer()
360 flatbuf.push_back(0); in AddFlatBuffer()
362 auto insertion_point = static_cast<uoffset_t>(flatbuf.size()); in AddFlatBuffer()
364 flatbuf.insert(flatbuf.end(), newbuf + sizeof(uoffset_t), newbuf + newlen); in AddFlatBuffer()
366 return vector_data(flatbuf) + insertion_point + root_offset; in AddFlatBuffer()