SRS-control 0.1.4
Loading...
Searching...
No Matches
StructSerializer.cpp
Go to the documentation of this file.
4#include <cstddef>
5#include <expected>
6#include <string_view>
7#include <vector>
8
9namespace srs::process
10{
12 : ConverterTask{ "Struct deserializer", none, n_lines }
13 {
14 output_data_.resize(n_lines);
15 }
16
17 // NOLINTBEGIN
18 auto StructSerializer::convert([[maybe_unused]] const StructData* input, [[maybe_unused]] std::vector<char>& output)
19 -> std::expected<std::size_t, std::string_view>
20 {
21 // NOTE: DO NOT do any memory allocation here. If heap data is needed, please initialize it in the constructor.
22 output.clear();
23 return std::unexpected{ "not implemented" };
24 }
25 // NOLINTEND
26} // namespace srs::process
ConverterTask(std::string_view name, DataConvertOptions prev_convert, std::size_t n_lines=1)
std::vector< std::vector< char > > output_data_
auto convert(const StructData *input, std::vector< char > &output) -> std::expected< std::size_t, std::string_view >