rmw_dds_common  master
Define a common interface between DDS implementations of ROS middleware.
gid_utils.hpp
Go to the documentation of this file.
1 // Copyright 2019 Open Source Robotics Foundation, Inc.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #ifndef RMW_DDS_COMMON__GID_UTILS_HPP_
16 #define RMW_DDS_COMMON__GID_UTILS_HPP_
17 
18 #include "rmw/types.h"
19 
21 #include "rmw_dds_common/msg/gid.hpp"
22 
23 namespace rmw_dds_common
24 {
25 
28 {
29  bool operator()(const rmw_gid_t & lhs, const rmw_gid_t & rhs) const;
30 };
31 
35 operator<<(std::ostream & ostream, const rmw_gid_t & gid);
36 
39 bool
40 operator==(const rmw_gid_t & lhs, const rmw_gid_t & rhs);
41 
43 
47 void
49  const rmw_gid_t * gid,
50  rmw_dds_common::msg::Gid * msg_gid);
51 
53 
57 void
59  const rmw_dds_common::msg::Gid * msg_gid,
60  rmw_gid_t * gid);
61 
62 } // namespace rmw_dds_common
63 
64 #endif // RMW_DDS_COMMON__GID_UTILS_HPP_
rmw_dds_common::operator<<
std::ostream & operator<<(std::ostream &ostream, const rmw_gid_t &gid)
Stream operator for rmw_gid_t.
rmw_dds_common::convert_gid_to_msg
void convert_gid_to_msg(const rmw_gid_t *gid, rmw_dds_common::msg::Gid *msg_gid)
Converts from rmw_gid_t to rmw_dds_common::msg::Gid.
rmw_dds_common
Definition: context.hpp:27
RMW_DDS_COMMON_PUBLIC
#define RMW_DDS_COMMON_PUBLIC
Definition: visibility_control.h:48
rmw_dds_common::Compare_rmw_gid_t
Comparator for rmw_gid_t, in order to use them as a key of a map.
Definition: gid_utils.hpp:27
std::ostream
rmw_dds_common::operator==
bool operator==(const rmw_gid_t &lhs, const rmw_gid_t &rhs)
operator== for rmw_gid_t
visibility_control.h
rmw_gid_t
RMW_DDS_COMMON_PUBLIC_TYPE
#define RMW_DDS_COMMON_PUBLIC_TYPE
Definition: visibility_control.h:51
rmw_dds_common::convert_msg_to_gid
void convert_msg_to_gid(const rmw_dds_common::msg::Gid *msg_gid, rmw_gid_t *gid)
Converts from rmw_dds_common::msg::Gid to rmw_gid_t.
types.h