CARLA
TwistWithCovariancePubSubTypes.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 TwistWithCovariancePubSubTypes.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_TWISTWITHCOVARIANCE_PUBSUBTYPES_H_
23 #define _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWISTWITHCOVARIANCE_PUBSUBTYPES_H_
24 
25 #include <fastdds/dds/topic/TopicDataType.hpp>
26 #include <fastrtps/utils/md5.h>
27 
28 #include "TwistWithCovariance.h"
29 #include "TwistPubSubTypes.h"
30 
31 #if !defined(GEN_API_VER) || (GEN_API_VER != 1)
32 #error \
33  Generated TwistWithCovariance is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen.
34 #endif // GEN_API_VER
35 
36 namespace geometry_msgs
37 {
38  namespace msg
39  {
40  typedef std::array<double, 36> geometry_msgs__TwistWithCovariance__double_array_36;
41 
42  #ifndef SWIG
43  namespace detail {
44 
45  template<typename Tag, typename Tag::type M>
47  {
48  friend constexpr typename Tag::type get(
49  Tag)
50  {
51  return M;
52  }
53  };
54 
56  {
58  friend constexpr type get(
60  };
61 
63 
64  template <typename T, typename Tag>
65  inline size_t constexpr TwistWithCovariance_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 TwistWithCovariance defined by the user in the IDL file.
73  * @ingroup TWISTWITHCOVARIANCE
74  */
75  class TwistWithCovariancePubSubType : public eprosima::fastdds::dds::TopicDataType
76  {
77  public:
78 
80 
82 
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) TwistWithCovariance();
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 336ULL == (detail::TwistWithCovariance_offset_of<TwistWithCovariance, detail::TwistWithCovariance_f>() + sizeof(geometry_msgs::msg::geometry_msgs__TwistWithCovariance__double_array_36));
137 
138  }};
139  }
140 }
141 
142 #endif // _FAST_DDS_GENERATED_GEOMETRY_MSGS_MSG_TWISTWITHCOVARIANCE_PUBSUBTYPES_H_
This class represents the structure TwistWithCovariance defined by the user in the IDL file...
eprosima::fastrtps::rtps::InstanceHandle_t InstanceHandle_t
This class represents the TopicDataType of the type TwistWithCovariance defined by the user in the ID...
#define eProsima_user_DllExport
Definition: CameraInfo.h:44
eprosima::fastrtps::rtps::SerializedPayload_t SerializedPayload_t
std::array< double, 36 > geometry_msgs__TwistWithCovariance__double_array_36
geometry_msgs::msg::geometry_msgs__TwistWithCovariance__double_array_36 TwistWithCovariance::* type