Lines Matching refs:offset
309 void ByteBuffer::PutInt32(int32_t offset, int32_t value)
311 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int32_t>(sizeof(value))) {
312 if (memcpy_s((buffer.get() + offset), (limit - offset), &value, sizeof(value)) != EOK) {
318 void ByteBuffer::PutInt16(int32_t offset, int16_t value)
320 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int16_t>(sizeof(value))) {
321 if (memcpy_s((buffer.get() + offset), (limit - offset), &value, sizeof(value)) != EOK) {
327 void ByteBuffer::PutByte(int32_t offset, char value)
329 if (buffer != nullptr && offset >= 0 && limit - offset >= static_cast<int32_t>(sizeof(value))) {
330 if (memcpy_s((buffer.get() + offset), (limit - offset), (&value), sizeof(value)) != EOK) {
336 void ByteBuffer::PutData(int32_t offset, const char data[], int32_t len)
338 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
339 if (memcpy_s((buffer.get() + offset), (limit - offset), data, len) != EOK) {
345 void ByteBuffer::PutData(int32_t offset, const int8_t data[], int32_t len)
347 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
348 if (memcpy_s((buffer.get() + offset), (limit - offset), data, len) != EOK) {
354 void ByteBuffer::PutData(int32_t offset, const char data[], int32_t len, int32_t type)
357 if (buffer != nullptr && data != nullptr && offset >= 0 && len > 0 && (limit - offset) >= len) {
361 offsetAdd += offset;
481 void ByteBuffer::GetData(int32_t offset, int8_t data[], uint32_t len)
483 if (0 == memcpy_s(data, len, buffer.get() + offset, len)) {