CARLA
TransformPubSubTypes.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 TransformPubSubTypes.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_TRANSFORM_PUBSUBTYPES_H_
23 #define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TRANSFORM_PUBSUBTYPES_H_
24 
25 #include <fastdds/dds/topic/TopicDataType.hpp>
26 #include <fastrtps/utils/md5.h>
27 
28 #include "Transform.h"
29 
30 #include "Vector3PubSubTypes.h"
31 #include "QuaternionPubSubTypes.h"
32 
33 #if !defined(GEN_API_VER) || (GEN_API_VER != 1)
34 #error \
35  Generated Transform 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 
43  #ifndef SWIG
44  namespace detail {
45 
46  template<typename Tag, typename Tag::type M>
48  {
49  friend constexpr typename Tag::type get(
50  Tag)
51  {
52  return M;
53  }
54  };
55 
56  struct Transform_f
57  {
59  friend constexpr type get(
60  Transform_f);
61  };
62 
64 
65  template <typename T, typename Tag>
66  inline size_t constexpr Transform_offset_of() {
67  return ((::size_t) &reinterpret_cast<char const volatile&>((((T*)0)->*get(Tag()))));
68  }
69  }
70  #endif
71 
72  /*!
73  * @brief This class represents the TopicDataType of the type Transform defined by the user in the IDL file.
74  * @ingroup TRANSFORM
75  */
76  class TransformPubSubType : public eprosima::fastdds::dds::TopicDataType
77  {
78  public:
79 
80  typedef Transform type;
81 
83 
84  eProsima_user_DllExport virtual ~TransformPubSubType() override;
85 
86  eProsima_user_DllExport virtual bool serialize(
87  void* data,
89 
90  eProsima_user_DllExport virtual bool deserialize(
92  void* data) override;
93 
94  eProsima_user_DllExport virtual std::function<uint32_t()> getSerializedSizeProvider(
95  void* data) override;
96 
97  eProsima_user_DllExport virtual bool getKey(
98  void* data,
100  bool force_md5 = false) override;
101 
102  eProsima_user_DllExport virtual void* createData() override;
103 
104  eProsima_user_DllExport virtual void deleteData(
105  void* data) override;
106 
107  #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
108  eProsima_user_DllExport inline bool is_bounded() const override
109  {
110  return true;
111  }
112 
113  #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED
114 
115  #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
116  eProsima_user_DllExport inline bool is_plain() const override
117  {
118  return is_plain_impl();
119  }
120 
121  #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN
122 
123  #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
124  eProsima_user_DllExport inline bool construct_sample(
125  void* memory) const override
126  {
127  new (memory) Transform();
128  return true;
129  }
130 
131  #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE
132  MD5 m_md5;
133  unsigned char* m_keyBuffer;
134  private:
135  static constexpr bool is_plain_impl()
136  {
137  return 56ULL == (detail::Transform_offset_of<Transform, detail::Transform_f>() + sizeof(geometry_msgs::msg::Quaternion));
138 
139  }};
140  }
141 }
142 
143 #endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TRANSFORM_PUBSUBTYPES_H_
This class represents the TopicDataType of the type Transform defined by the user in the IDL file...
geometry_msgs::msg::Quaternion Transform::* type
eprosima::fastrtps::rtps::InstanceHandle_t InstanceHandle_t
This class represents the structure Transform defined by the user in the IDL file.
#define eProsima_user_DllExport
Definition: CameraInfo.h:44
eprosima::fastrtps::rtps::SerializedPayload_t SerializedPayload_t
size_t constexpr Transform_offset_of()
This class represents the structure Quaternion defined by the user in the IDL file.
Definition: Quaternion.h:70
geom::Transform Transform
Definition: rpc/Transform.h:16