21template<
typename OutType,
typename InType>
22void reader_visitor(OutType& out,
const eprosima::xtypes::ReadableDynamicDataRef& cref) {
23 out =
static_cast<OutType
>(cref.value<InType>());
29template<
typename InType,
typename OutType>
30void writer_visitor(
const InType& in, eprosima::xtypes::WritableDynamicDataRef& ref) {
31 ref.value(
static_cast<OutType
>(in));
35inline void reader_visitor<std::string, char>(
36 std::string& out,
const eprosima::xtypes::ReadableDynamicDataRef& cref) {
37 out = std::string(1, cref.value<
char>());
41inline void writer_visitor<std::string, char>(
42 const std::string& in, eprosima::xtypes::WritableDynamicDataRef& ref) {
void writer_visitor(const InType &in, eprosima::xtypes::WritableDynamicDataRef &ref)
A writer visitor sends a value to an xtypes data reference.
Definition: visitors.hpp:30
void reader_visitor(OutType &out, const eprosima::xtypes::ReadableDynamicDataRef &cref)
A reader visitor retrieves a value from an xtypes data reference.
Definition: visitors.hpp:22
Definition: auxiliaries.cpp:26