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