From 3cc9799b1f5786d86453346849fa7497cd1a0f5e Mon Sep 17 00:00:00 2001 From: Felix Mauch Date: Wed, 25 Sep 2019 09:10:35 +0200 Subject: [PATCH] Made visitors for DataPackage private --- .../ur_rtde_driver/rtde/data_package.h | 70 +++++++++---------- 1 file changed, 35 insertions(+), 35 deletions(-) diff --git a/ur_rtde_driver/include/ur_rtde_driver/rtde/data_package.h b/ur_rtde_driver/include/ur_rtde_driver/rtde/data_package.h index d7890c0..00c3455 100644 --- a/ur_rtde_driver/include/ur_rtde_driver/rtde/data_package.h +++ b/ur_rtde_driver/include/ur_rtde_driver/rtde/data_package.h @@ -51,41 +51,6 @@ enum class RUNTIME_STATE : uint32_t RESUMING = 5 }; -struct ParseVisitor : public boost::static_visitor<> -{ - template - void operator()(T& d, comm::BinParser& bp) const - { - bp.parse(d); - } -}; -struct StringVisitor : public boost::static_visitor -{ - template - std::string operator()(T& d) const - { - std::stringstream ss; - ss << d; - return ss.str(); - } -}; -struct SizeVisitor : public boost::static_visitor -{ - template - uint16_t operator()(T& d) const - { - return sizeof(d); - } -}; -struct SerializeVisitor : public boost::static_visitor -{ - template - size_t operator()(T& d, uint8_t* buffer) const - { - return comm::PackageSerializer::serialize(buffer, d); - } -}; - /*! * \brief The DataPackage class handles communication in the form of RTDE data packages both to and * from the robot. It contains functionality to parse and serialize packages for arbitrary recipes. @@ -230,6 +195,41 @@ private: uint8_t recipe_id_; std::unordered_map data_; std::vector recipe_; + + struct ParseVisitor : public boost::static_visitor<> + { + template + void operator()(T& d, comm::BinParser& bp) const + { + bp.parse(d); + } + }; + struct StringVisitor : public boost::static_visitor + { + template + std::string operator()(T& d) const + { + std::stringstream ss; + ss << d; + return ss.str(); + } + }; + struct SizeVisitor : public boost::static_visitor + { + template + uint16_t operator()(T& d) const + { + return sizeof(d); + } + }; + struct SerializeVisitor : public boost::static_visitor + { + template + size_t operator()(T& d, uint8_t* buffer) const + { + return comm::PackageSerializer::serialize(buffer, d); + } + }; }; } // namespace rtde_interface