optoctreeparser
Loading...
Searching...
No Matches
parser.hpp
Go to the documentation of this file.
1
8#pragma once
9
11#include <span>
12
13namespace optoctreeparser {
14
67class Parser {
68 public:
76
83
91
98
99 private:
107 static uint16_t read_u16_le(std::span<const byte> buffer, size_t offset);
108
116 static int16_t read_i16_le(std::span<const byte> buffer, size_t offset);
117
125 static int32_t read_i32_le(std::span<const byte> buffer, size_t offset);
126
134 static void write_u16_le(std::span<byte> buffer, size_t offset, uint16_t value);
135
143 static void write_i32_le(std::span<byte> buffer, size_t offset, int32_t value);
144
152 static void write_i16_le(std::span<byte> buffer, size_t offset, int16_t value);
153
160 static OptocNode read_node(std::span<const byte> buffer, size_t offset);
161
168 static void write_node(std::span<byte> buffer, size_t offset, const OptocNode& node);
169};
170
171} // namespace optoctreeparser
Parser to parse optoctree.
Definition parser.hpp:67
static OptocPatchRoot parse_optoctreepatch(const OptocTreeView &optoctree)
Parses optoctreepatch from its binary representation.
static OptocTreeView pack_optoctreepatch(const OptocPatchRoot &patch)
Packs OptocPatchRoot into binary representation.
static OptocRoot parse_optoctree_batch(const OptocTreeView &optoctree)
Parses optoctree from its binary representation.
static OptocTreeView pack_optoctree_batch(const OptocRoot &batch)
Packs OptocRoot into binary representation.
Basic structures for storing optoctree data.
Definition base_struct.hpp:13
std::vector< byte > OptocTreeView
Definition base_struct.hpp:16
One Optocnode. The smallest unit of information in an Optoctree.
Definition base_struct.hpp:83
Root of optoctreepatch file.
Definition base_struct.hpp:31
Root of optoctree file.
Definition base_struct.hpp:72