.. _program_listing_file__tmp_ws_src_fastrtps_include_fastdds_rtps_common_LocatorSelectorEntry.hpp: Program Listing for File LocatorSelectorEntry.hpp ================================================= |exhale_lsh| :ref:`Return to documentation for file ` (``/tmp/ws/src/fastrtps/include/fastdds/rtps/common/LocatorSelectorEntry.hpp``) .. |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_RTPS_COMMON_LOCATORSELECTORENTRY_HPP_ #define _FASTDDS_RTPS_COMMON_LOCATORSELECTORENTRY_HPP_ #ifndef DOXYGEN_SHOULD_SKIP_THIS_PUBLIC #include #include #include namespace eprosima { namespace fastrtps { namespace rtps { struct LocatorSelectorEntry { struct EntryState { EntryState( size_t max_unicast_locators, size_t max_multicast_locators) : unicast(ResourceLimitedContainerConfig::fixed_size_configuration(max_unicast_locators)) , multicast(ResourceLimitedContainerConfig::fixed_size_configuration(max_multicast_locators)) { } ResourceLimitedVector unicast; ResourceLimitedVector multicast; }; LocatorSelectorEntry( size_t max_unicast_locators, size_t max_multicast_locators) : remote_guid(c_Guid_Unknown) , unicast(ResourceLimitedContainerConfig::fixed_size_configuration(max_unicast_locators)) , multicast(ResourceLimitedContainerConfig::fixed_size_configuration(max_multicast_locators)) , state(max_unicast_locators, max_multicast_locators) , enabled(false) , transport_should_process(false) { } void enable( bool should_enable) { enabled = should_enable && remote_guid != c_Guid_Unknown; } void reset() { state.unicast.clear(); state.multicast.clear(); } GUID_t remote_guid; ResourceLimitedVector unicast; ResourceLimitedVector multicast; EntryState state; bool enabled; bool transport_should_process; }; } /* namespace rtps */ } /* namespace fastrtps */ } /* namespace eprosima */ #endif /* DOXYGEN_SHOULD_SKIP_THIS_PUBLIC */ #endif /* _FASTDDS_RTPS_COMMON_LOCATORSELECTORENTRY_HPP_ */