time.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include <RobotAPI/libraries/aron/common/aron/time.aron.generated.h>
7 
8 #include "../aron_conversions/time.h"
9 
10 namespace armarx
11 {
12  // Helper methods for code generation to convert json/aron to bo and vice versa
13  namespace aron
14  {
15  template <class ReaderT>
16  requires data::isReader<ReaderT>
17 
18  void
19  read(ReaderT& aron_r, typename ReaderT::InputType& input, armarx::core::time::DateTime& ret)
20  {
21  arondto::DateTime aron;
22  aron.read(aron_r, input);
23 
24  armarx::fromAron(aron, ret);
25  }
26 
27  template <class WriterT>
28  requires data::isWriter<WriterT>
29 
30  void
31  write(WriterT& aron_w,
33  typename WriterT::ReturnType& ret,
35  {
36  arondto::DateTime aron;
37  armarx::toAron(aron, input);
38  ret = aron.write(aron_w, aron_p);
39  }
40 
41  template <class ReaderT>
42  requires data::isReader<ReaderT>
43 
44  void
45  read(ReaderT& aron_r, typename ReaderT::InputType& input, armarx::core::time::Duration& ret)
46  {
47  arondto::Duration aron;
48  aron.read(aron_r, input);
49 
50  armarx::fromAron(aron, ret);
51  }
52 
53  template <class WriterT>
54  requires data::isWriter<WriterT>
55 
56  void
57  write(WriterT& aron_w,
59  typename WriterT::ReturnType& ret,
61  {
62  arondto::Duration aron;
63  armarx::toAron(aron, input);
64  ret = aron.write(aron_w, aron_p);
65  }
66  } // namespace aron
67 
68 } // namespace armarx
armarx::aron::ret
ReaderT::InputType T & ret
Definition: rw.h:21
armarx::aron::aron_p
const T WriterT::ReturnType const armarx::aron::Path & aron_p
Definition: rw.h:31
Reader.h
armarx::aron::Path
The Path class.
Definition: Path.h:36
armarx::aron::read
requires data::isReader< ReaderT > void read(ReaderT &aron_r, typename ReaderT::InputType &input, Eigen::Matrix< EigenT, rows, cols, options > &ret)
Definition: eigen.h:20
armarx::aron::input
ReaderT::InputType & input
Definition: rw.h:19
armarx::aron::requires
requires(!aron::detail::DtoAndBoAreSame< DtoT, BoT >) void toAron(std
Definition: aron_conversions.h:127
armarx::core::time::DateTime
Represents a point in time.
Definition: DateTime.h:24
Exception.h
armarx::core::time::Duration
Represents a duration.
Definition: Duration.h:17
armarx::fromAron
void fromAron(const arondto::PackagePath &dto, PackageFileLocation &bo)
armarx::aron::write
requires data::isWriter< WriterT > 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:134
armarx::toAron
void toAron(arondto::PackagePath &dto, const PackageFileLocation &bo)
Writer.h
armarx::armem::Duration
armarx::core::time::Duration Duration
Definition: forward_declarations.h:14
armarx
This file offers overloads of toIce() and fromIce() functions for STL container types.
Definition: ArmarXTimeserver.cpp:28