rw.h
Go to the documentation of this file.
1#pragma once
2
3#include "aron_conversions.h"
5
6namespace armarx::aron
7{
8 template <class ReaderT, class T>
9
10 requires(data::isReader<ReaderT> && armarx::aron::cpp::isAronGeneratedClass<T>)
11 inline void
12 read(ReaderT& aron_r, typename ReaderT::InputType& input, T& ret)
13 {
14 ret.read(aron_r, input);
15 }
16
17 template <class WriterT, class T>
18
19 requires(data::isWriter<WriterT> && armarx::aron::cpp::isAronGeneratedClass<T>)
20 inline void
21 write(WriterT& aron_w,
22 const T& input,
23 typename WriterT::ReturnType& ret,
24 const armarx::aron::Path& aron_p = armarx::aron::Path())
25 {
26 ret = input.write(aron_w, aron_p);
27 }
28
29 template <class ReaderT, class DtoT, class BoT>
30
31 requires(data::isReader<ReaderT> && armarx::aron::cpp::isAronGeneratedClass<DtoT> &&
32 !detail::DtoAndBoAreSame<DtoT, BoT>)
33 inline void
34 read(ReaderT& aron_r, typename ReaderT::InputType& input, BoT& ret)
35 {
36 DtoT aron;
37 aron.read(aron_r, input);
38
40 }
41
42 template <class WriterT, class DtoT, class BoT>
43
44 requires(data::isWriter<WriterT> && armarx::aron::cpp::isAronGeneratedClass<DtoT> &&
45 !detail::DtoAndBoAreSame<DtoT, BoT>)
46 inline void
47 write(WriterT& aron_w,
48 const BoT& input,
49 typename WriterT::ReturnType& ret,
50 const armarx::aron::Path& aron_p = armarx::aron::Path())
51 {
52 DtoT aron;
53 armarx::toAron(aron, input);
54 ret = aron.write(aron_w, aron_p);
55 }
56} // namespace armarx::aron
The Path class.
Definition Path.h:36
void read(ReaderT &aron_r, typename ReaderT::InputType &input, Eigen::Matrix< EigenT, rows, cols, options > &ret)
Definition eigen.h:23
void write(WriterT &aron_w, const Eigen::Matrix< EigenT, rows, cols, options > &input, typename WriterT::ReturnType &ret, const armarx::aron::Path &aron_p=armarx::aron::Path())
Definition eigen.h:138
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
void fromAron(const arondto::PackagePath &dto, PackageFileLocation &bo)