Lines Matching refs:wv
232 readval(const Valtype* wv)
233 { return Convert<size, big_endian>::convert_host(*wv); }
236 writeval(Valtype* wv, Valtype v)
237 { *wv = Convert<size, big_endian>::convert_host(v); }
240 readval(const unsigned char* wv)
241 { return readval(reinterpret_cast<const Valtype*>(wv)); }
244 writeval(unsigned char* wv, Valtype v)
245 { writeval(reinterpret_cast<Valtype*>(wv), v); }
258 readval(const Valtype* wv)
259 { return *wv; }
262 writeval(Valtype* wv, Valtype v)
263 { *wv = v; }
281 readval(const unsigned char* wv)
282 { return *wv; }
285 writeval(unsigned char* wv, Valtype v)
286 { *wv = v; }
295 readval(const unsigned char* wv)
297 return (wv[1] << 8) | wv[0];
301 writeval(unsigned char* wv, Valtype v)
303 wv[1] = v >> 8;
304 wv[0] = v;
314 readval(const unsigned char* wv)
316 return (wv[0] << 8) | wv[1];
320 writeval(unsigned char* wv, Valtype v)
322 wv[0] = v >> 8;
323 wv[1] = v;
333 readval(const unsigned char* wv)
335 return (wv[3] << 24) | (wv[2] << 16) | (wv[1] << 8) | wv[0];
339 writeval(unsigned char* wv, Valtype v)
341 wv[3] = v >> 24;
342 wv[2] = v >> 16;
343 wv[1] = v >> 8;
344 wv[0] = v;
354 readval(const unsigned char* wv)
356 return (wv[0] << 24) | (wv[1] << 16) | (wv[2] << 8) | wv[3];
360 writeval(unsigned char* wv, Valtype v)
362 wv[0] = v >> 24;
363 wv[1] = v >> 16;
364 wv[2] = v >> 8;
365 wv[3] = v;
375 readval(const unsigned char* wv)
377 return ((static_cast<Valtype>(wv[7]) << 56)
378 | (static_cast<Valtype>(wv[6]) << 48)
379 | (static_cast<Valtype>(wv[5]) << 40)
380 | (static_cast<Valtype>(wv[4]) << 32)
381 | (static_cast<Valtype>(wv[3]) << 24)
382 | (static_cast<Valtype>(wv[2]) << 16)
383 | (static_cast<Valtype>(wv[1]) << 8)
384 | static_cast<Valtype>(wv[0]));
388 writeval(unsigned char* wv, Valtype v)
390 wv[7] = v >> 56;
391 wv[6] = v >> 48;
392 wv[5] = v >> 40;
393 wv[4] = v >> 32;
394 wv[3] = v >> 24;
395 wv[2] = v >> 16;
396 wv[1] = v >> 8;
397 wv[0] = v;
407 readval(const unsigned char* wv)
409 return ((static_cast<Valtype>(wv[0]) << 56)
410 | (static_cast<Valtype>(wv[1]) << 48)
411 | (static_cast<Valtype>(wv[2]) << 40)
412 | (static_cast<Valtype>(wv[3]) << 32)
413 | (static_cast<Valtype>(wv[4]) << 24)
414 | (static_cast<Valtype>(wv[5]) << 16)
415 | (static_cast<Valtype>(wv[6]) << 8)
416 | static_cast<Valtype>(wv[7]));
420 writeval(unsigned char* wv, Valtype v)
422 wv[0] = v >> 56;
423 wv[1] = v >> 48;
424 wv[2] = v >> 40;
425 wv[3] = v >> 32;
426 wv[4] = v >> 24;
427 wv[5] = v >> 16;
428 wv[6] = v >> 8;
429 wv[7] = v;
445 readval(const unsigned char* wv)
447 reinterpret_cast<const Valtype*>(wv)); }
450 writeval(unsigned char* wv, Valtype v)
451 { Swap<size, big_endian>::writeval(reinterpret_cast<Valtype*>(wv), v); }
460 readval(const unsigned char* wv)
462 return ((static_cast<Valtype>(Swap<32, true>::readval(wv)) << 32)
463 | static_cast<Valtype>(Swap<32, true>::readval(wv + 4)));
467 writeval(unsigned char* wv, Valtype v)
471 Swap<32, true>::writeval(wv, static_cast<Valtype32>(v >> 32));
472 Swap<32, true>::writeval(wv + 4, static_cast<Valtype32>(v));
482 readval(const unsigned char* wv)
484 return ((static_cast<Valtype>(Swap<32, false>::readval(wv + 4)) << 32)
485 | static_cast<Valtype>(Swap<32, false>::readval(wv)));
489 writeval(unsigned char* wv, Valtype v)
493 Swap<32, false>::writeval(wv + 4, static_cast<Valtype32>(v >> 32));
494 Swap<32, false>::writeval(wv, static_cast<Valtype32>(v));