Lines Matching refs:flatbuf

163                 std::vector<uint8_t> *flatbuf,  in ResizeContext()  argument
165 : schema_(schema), startptr_(flatbuf->data() + start), in ResizeContext()
166 delta_(delta), buf_(*flatbuf), in ResizeContext()
167 dag_check_(flatbuf->size() / sizeof(uoffset_t), false) { in ResizeContext()
292 const String *str, std::vector<uint8_t> *flatbuf, in SetString() argument
296 reinterpret_cast<const uint8_t *>(str) - flatbuf->data()); in SetString()
300 memset(flatbuf->data() + start, 0, str->Length()); in SetString()
302 ResizeContext(schema, start, delta, flatbuf, root_table); in SetString()
304 WriteScalar(flatbuf->data() + str_start, in SetString()
308 memcpy(flatbuf->data() + start, val.c_str(), val.size() + 1); in SetString()
313 uoffset_t elem_size, std::vector<uint8_t> *flatbuf, in ResizeAnyVector() argument
317 auto vec_start = reinterpret_cast<const uint8_t *>(vec) - flatbuf->data(); in ResizeAnyVector()
325 memset(flatbuf->data() + start - size_clear, 0, size_clear); in ResizeAnyVector()
327 ResizeContext(schema, start, delta_bytes, flatbuf, root_table); in ResizeAnyVector()
328 WriteScalar(flatbuf->data() + vec_start, newsize); // Length field. in ResizeAnyVector()
331 memset(flatbuf->data() + start, 0, delta_elem * elem_size); in ResizeAnyVector()
334 return flatbuf->data() + start; in ResizeAnyVector()
337 const uint8_t *AddFlatBuffer(std::vector<uint8_t> &flatbuf, in AddFlatBuffer() argument
341 while ((flatbuf.size() & (sizeof(uoffset_t) - 1)) || in AddFlatBuffer()
342 !(flatbuf.size() & (sizeof(largest_scalar_t) - 1))) { in AddFlatBuffer()
343 flatbuf.push_back(0); in AddFlatBuffer()
345 auto insertion_point = static_cast<uoffset_t>(flatbuf.size()); in AddFlatBuffer()
347 flatbuf.insert(flatbuf.end(), newbuf + sizeof(uoffset_t), newbuf + newlen); in AddFlatBuffer()
349 return flatbuf.data() + insertion_point + root_offset; in AddFlatBuffer()