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 SynDDSMessagePubSubTypes.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 23 #ifndef _SYNDDSMESSAGE_PUBSUBTYPES_H_ 24 #define _SYNDDSMESSAGE_PUBSUBTYPES_H_ 25 26 #include <fastdds/dds/topic/TopicDataType.hpp> 27 #include <fastrtps/utils/md5.h> 28 29 #include "SynDDSMessage.h" 30 31 #if !defined(GEN_API_VER) || (GEN_API_VER != 1) 32 #error Generated SynDDSMessage is not compatible with current installed Fast DDS. Please, regenerate it with fastddsgen. 33 #endif // GEN_API_VER 34 35 /*! 36 * @brief This class represents the TopicDataType of the type SynDDSMessage defined by the user in the IDL file. 37 * @ingroup SYNDDSMESSAGE 38 */ 39 class SynDDSMessagePubSubType : public eprosima::fastdds::dds::TopicDataType 40 { 41 public: 42 43 typedef SynDDSMessage type; 44 45 eProsima_user_DllExport SynDDSMessagePubSubType(); 46 47 eProsima_user_DllExport virtual ~SynDDSMessagePubSubType(); 48 49 eProsima_user_DllExport virtual bool serialize( 50 void* data, 51 eprosima::fastrtps::rtps::SerializedPayload_t* payload) override; 52 53 eProsima_user_DllExport virtual bool deserialize( 54 eprosima::fastrtps::rtps::SerializedPayload_t* payload, 55 void* data) override; 56 57 eProsima_user_DllExport virtual std::function<uint32_t()> getSerializedSizeProvider( 58 void* data) override; 59 60 eProsima_user_DllExport virtual bool getKey( 61 void* data, 62 eprosima::fastrtps::rtps::InstanceHandle_t* ihandle, 63 bool force_md5 = false) override; 64 65 eProsima_user_DllExport virtual void* createData() override; 66 67 eProsima_user_DllExport virtual void deleteData( 68 void* data) override; 69 70 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED is_bounded()71 eProsima_user_DllExport inline bool is_bounded() const override 72 { 73 return false; 74 } 75 76 #endif // TOPIC_DATA_TYPE_API_HAS_IS_BOUNDED 77 78 #ifdef TOPIC_DATA_TYPE_API_HAS_IS_PLAIN is_plain()79 eProsima_user_DllExport inline bool is_plain() const override 80 { 81 return false; 82 } 83 84 #endif // TOPIC_DATA_TYPE_API_HAS_IS_PLAIN 85 86 #ifdef TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE construct_sample(void * memory)87 eProsima_user_DllExport inline bool construct_sample( 88 void* memory) const override 89 { 90 (void)memory; 91 return false; 92 } 93 94 #endif // TOPIC_DATA_TYPE_API_HAS_CONSTRUCT_SAMPLE 95 96 MD5 m_md5; 97 unsigned char* m_keyBuffer; 98 }; 99 100 #endif // _SYNDDSMESSAGE_PUBSUBTYPES_H_