Lines Matching refs:pos

43     size_t pos;  variable
48 pos = 0; in MessageBuf()
54 pos = 0; in MessageBuf()
58 void reset() { pos = 0; } in reset()
61 size_t getPos() const { return pos; } in getPos()
62 size_t getRoom() const { return size - pos; } in getRoom()
64 if (pos == size) { in readU8()
67 return data[pos++]; in readU8()
70 if (pos == size || readOnly) in writeU8()
72 data[pos++] = val; in writeU8()
75 if (pos > (size - sizeof(uint16_t))) { in readU16()
79 memcpy(&val, &data[pos], sizeof(val)); in readU16()
80 pos += sizeof(val); in readU16()
84 if (pos > (size - sizeof(uint16_t)) || readOnly) { in writeU16()
88 memcpy(&data[pos], &tmp, sizeof(tmp)); in writeU16()
89 pos += sizeof(tmp); in writeU16()
92 if (pos > (size - sizeof(uint32_t))) { in readU32()
96 memcpy(&val, &data[pos], sizeof(val)); in readU32()
97 pos += sizeof(val); in readU32()
101 if (pos > (size - sizeof(uint32_t)) || readOnly) { in writeU32()
105 memcpy(&data[pos], &tmp, sizeof(tmp)); in writeU32()
106 pos += sizeof(tmp); in writeU32()
109 if (pos > (size - sizeof(uint64_t))) { in readU64()
113 memcpy(&val, &data[pos], sizeof(val)); in readU64()
114 pos += sizeof(val); in readU64()
118 if (pos > (size - sizeof(uint64_t)) || readOnly) { in writeU64()
122 memcpy(&data[pos], &tmp, sizeof(tmp)); in writeU64()
123 pos += sizeof(tmp); in writeU64()
126 if (pos > (size - bufSize)) { in readRaw()
129 const void *buf = &data[pos]; in readRaw()
130 pos += bufSize; in readRaw()
134 if (pos > (size - bufSize) || readOnly) { in writeRaw()
137 memcpy(&data[pos], buf, bufSize); in writeRaw()
138 pos += bufSize; in writeRaw()