CARLA
PosePubSubTypes.h
Go to the documentation of this file.
1 // Copyright 2016 Proyectos y Sistemas de Mantenimiento SL (eProsima).
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 /*!
16  * @file PosePubSubTypes.h
17  * This header file contains the declaration of the serialization functions.
18  *
19  * This file was generated by the tool fastcdrgen.
20  */
21 
22 #ifndef _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_POSE_PUBSUBTYPES_H_
23 #define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_POSE_PUBSUBTYPES_H_
24 
25 #include <fastdds/dds/topic/TopicDataType.hpp>
26 #include <fastrtps/utils/md5.h>
27 
28 #include "Pose.h"
29 
30 #include "PointPubSubTypes.h"
31 #include "QuaternionPubSubTypes.h"
32 
33 #if !defined(GEN_API_VER) || (GEN_API_VER != 1)
34 #error \
35  Generated Pose is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
36 #endif // GEN_API_VER
37 
38 namespace geometry_msgs
39 {
40  namespace msg
41  {
42  #ifndef SWIG
43  namespace detail {
44 
45  template<typename Tag, typename Tag::type M>
46  struct Pose_rob
47  {
48  friend constexpr typename Tag::type get(
49  Tag)
50  {
51  return M;
52  }
53  };
54 
55  struct Pose_f
56  {
58  friend constexpr type get(
59  Pose_f);
60  };
61 
63 
64  template <typename T, typename Tag>
65  inline size_t constexpr Pose_offset_of() {
66  return ((::size_t) &reinterpret_cast<char const volatile&>((((T*)0)->*get(Tag()))));
67  }
68  }
69  #endif
70 
71  /*!
72  * @brief This class represents the TopicDataType of the type Pose defined by the user in the IDL file.
73  * @ingroup POSE
74  */
75  class PosePubSubType : public eprosima::fastdds::dds::TopicDataType
76  {
77  public:
78 
79  typedef Pose type;
80 
82 
83  eProsima_user_DllExport virtual ~PosePubSubType() override;
84 
85  eProsima_user_DllExport virtual bool serialize(
86  void* data,
88 
89  eProsima_user_DllExport virtual bool deserialize(
91  void* data) override;
92 
93  eProsima_user_DllExport virtual std::function<uint32_t()> getSerializedSizeProvider(
94  void* data) override;
95 
96  eProsima_user_DllExport virtual bool getKey(
97  void* data,
99  bool force_md5 = false) override;
100 
101  eProsima_user_DllExport virtual void* createData() override;
102 
103  eProsima_user_DllExport virtual void deleteData(
104  void* data) override;
105 
106  #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
107  eProsima_user_DllExport inline bool is_bounded() const override
108  {
109  return true;
110  }
111 
112  #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
113 
114  #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
115  eProsima_user_DllExport inline bool is_plain() const override
116  {
117  return is_plain_impl();
118  }
119 
120  #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
121 
122  #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
123  eProsima_user_DllExport inline bool construct_sample(
124  void* memory) const override
125  {
126  new (memory) Pose();
127  return true;
128  }
129 
130  #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
131  MD5 m_md5;
132  unsigned char* m_keyBuffer;
133  private:
134  static constexpr bool is_plain_impl()
135  {
136  return 56ULL == (detail::Pose_offset_of<Pose, detail::Pose_f>() + sizeof(geometry_msgs::msg::Quaternion));
137 
138  }};
139  }
140 }
141 
142 #endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_POSE_PUBSUBTYPES_H_
size_t constexpr Pose_offset_of()
This class represents the TopicDataType of the type Pose defined by the user in the IDL file...
eprosima::fastrtps::rtps::InstanceHandle_t InstanceHandle_t
static constexpr bool is_plain_impl()
This class represents the structure Pose defined by the user in the IDL file.
Definition: Pose.h:73
#define eProsima_user_DllExport
Definition: CameraInfo.h:44
geometry_msgs::msg::Quaternion Pose::* type
eprosima::fastrtps::rtps::SerializedPayload_t SerializedPayload_t
This class represents the structure Quaternion defined by the user in the IDL file.
Definition: Quaternion.h:70