Lines Matching refs:p

56 void PackBytesUnaligned(Payload& p, const NumericType& i)  in PackBytesUnaligned()  argument
60 p.appendBits(CHAR_BIT, static_cast<uint8_t>(i >> (8 * byteIndex))); in PackBytesUnaligned()
61 PackBytesUnaligned<NumericType, byteIndex + 1>(p, i); in PackBytesUnaligned()
81 static int op(Payload& p, const T& t) in op()
86 if (p.bitCount) in op()
88 PackBytesUnaligned<T>(p, t); in op()
93 p.raw.resize(p.raw.size() + sizeof(T)); in op()
94 uint8_t* out = p.raw.data() + p.raw.size() - sizeof(T); in op()
105 static int op(Payload& p, const std::tuple<T...>& v) in op()
107 return std::apply([&p](const T&... args) { return p.pack(args...); }, in op()
118 static int op(Payload& p, const std::string& t) in op()
128 PackSingle<uint8_t>::op(p, len); in op()
129 p.append(t.c_str(), t.c_str() + t.length()); in op()
139 static int op(Payload& p, const fixed_uint_t<N>& t) in op()
149 p.appendBits(appendCount, static_cast<uint8_t>(bits)); in op()
161 static int op(Payload& p, const bool& b) in op()
163 p.appendBits(1, b); in op()
172 static int op(Payload& p, const std::bitset<N>& t) in op()
180 p.appendBits(appendCount, static_cast<uint8_t>(bits)); in op()
192 static int op(Payload& p, const std::optional<T>& t) in op()
197 ret = PackSingle<T>::op(p, *t); in op()
207 static int op(Payload& p, const std::array<T, N>& t) in op()
212 int ret = PackSingle<T>::op(p, v); in op()
226 static int op(Payload& p, const std::vector<T>& t) in op()
231 int ret = PackSingle<T>::op(p, v); in op()
245 static int op(Payload& p, const std::vector<uint8_t>& t) in op()
247 if (p.bitCount != 0) in op()
251 p.raw.reserve(p.raw.size() + t.size()); in op()
252 p.raw.insert(p.raw.end(), t.begin(), t.end()); in op()
261 static int op(Payload& p, const SecureBuffer& t) in op()
263 if (p.bitCount != 0) in op()
267 p.raw.reserve(p.raw.size() + t.size()); in op()
268 p.raw.insert(p.raw.end(), t.begin(), t.end()); in op()
277 static int op(Payload& p, const std::span<const uint8_t>& t) in op()
279 if (p.bitCount != 0) in op()
283 p.raw.reserve(p.raw.size() + t.size()); in op()
284 p.raw.insert(p.raw.end(), t.begin(), t.end()); in op()
293 static int op(Payload& p, const std::string_view& t) in op()
295 if (p.bitCount != 0) in op()
299 p.raw.reserve(p.raw.size() + t.size()); in op()
300 p.raw.insert(p.raw.end(), t.begin(), t.end()); in op()
309 static int op(Payload& p, const std::variant<T...>& v) in op()
312 [&p](const auto& arg) { in op()
313 return PackSingle<std::decay_t<decltype(arg)>>::op(p, arg); in op()
323 static int op(Payload& p, const Payload& t) in op()
325 if (p.bitCount != 0 || t.bitCount != 0) in op()
329 p.raw.reserve(p.raw.size() + t.raw.size()); in op()
330 p.raw.insert(p.raw.end(), t.raw.begin(), t.raw.end()); in op()