.. _program_listing_file__tmp_ws_src_fastrtps_include_fastdds_rtps_transport_TransportDescriptorInterface.h: Program Listing for File TransportDescriptorInterface.h ======================================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/fastrtps/include/fastdds/rtps/transport/TransportDescriptorInterface.h``) .. |exhale_lsh| unicode:: U+021B0 .. UPWARDS ARROW WITH TIP LEFTWARDS .. code-block:: cpp // Copyright 2019 Proyectos y Sistemas de Mantenimiento SL (eProsima). // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. #ifndef _FASTDDS_TRANSPORT_DESCRIPTOR_INTERFACE_H_ #define _FASTDDS_TRANSPORT_DESCRIPTOR_INTERFACE_H_ #include #ifdef _WIN32 #include #endif // ifdef _WIN32 #include #include namespace eprosima { namespace fastdds { namespace rtps { class TransportInterface; struct RTPS_DllAPI TransportDescriptorInterface { TransportDescriptorInterface( uint32_t maximumMessageSize, uint32_t maximumInitialPeersRange) : maxMessageSize(maximumMessageSize) , maxInitialPeersRange(maximumInitialPeersRange) { } TransportDescriptorInterface( const TransportDescriptorInterface& t) = default; TransportDescriptorInterface& operator =( const TransportDescriptorInterface& t) = default; virtual ~TransportDescriptorInterface() = default; virtual TransportInterface* create_transport() const = 0; virtual uint32_t min_send_buffer_size() const = 0; virtual uint32_t max_message_size() const { return maxMessageSize; } virtual uint32_t max_initial_peers_range() const { return maxInitialPeersRange; } bool operator ==( const TransportDescriptorInterface& t) const { return (this->maxMessageSize == t.max_message_size() && this->maxInitialPeersRange == t.max_initial_peers_range()); } uint32_t maxMessageSize; uint32_t maxInitialPeersRange; }; } // namespace rtps } // namespace fastdds } // namespace eprosima #endif // _FASTDDS_TRANSPORT_DESCRIPTOR_INTERFACE_H_