1#ifndef GAPSPARSERS_H_INCLUDED
2#define GAPSPARSERS_H_INCLUDED
4#include "tof_typedefs.h"
9 Vec<T> slice(
const Vec<T>& vec, usize start, usize end) {
10 if (start >= vec.size()) {
13 end = std::min(end, vec.size());
14 return Vec<T>(vec.begin() + start, vec.begin() + end);
17 bool parse_bool(
const Vec<u8> &bytestream,
**
Definition caraspace.hpp:8
i32 parse_i32(const Vec< u8 > &bytestream, usize &pos)
get a signed 32bit int from a vector of bytes, advancing pos by 4
f64 parse_f64(const Vec< u8 > &bytestream, usize &pos)
get a signed long float (64) from a vector of bytes, advancing pos by 8
u16 parse_u16(const Vec< u8 > &bytestream, usize &pos)
get an unsigned short from a vector of bytes, advancing pos by 2
f32 parse_f32(const Vec< u8 > &bytestream, usize &pos)
get a signed float32 from a vector of bytes, advancning pos by 4
u64 parse_u64(const Vec< u8 > &bytestream, usize &pos)
get an unsigned long64 from a vector of bytes, advancing pos by 8
std::string parse_string(const Vec< u8 > &bytestream, usize &pos)
u32 parse_u32(const Vec< u8 > &bytestream, usize &pos)
get an unsigned 32bit int from a vector of bytes, advancing pos by 4
f32 parse_f16(const Vec< u8 > &bytestream, usize &pos)
u8 parse_u8(const Vec< u8 > &bytestream, usize &pos)
get an unsigned char from a vector of bytes, advancing pos by 1