Class LocatorList
Defined in File LocatorList.hpp
Class Documentation
-
class LocatorList
Class LocatorList, a Locator vector that doesn’t allow duplicates.
Public Functions
-
inline RTPS_DllAPI LocatorList()
Constructor.
-
inline RTPS_DllAPI ~LocatorList()
Destructor.
-
inline RTPS_DllAPI LocatorList(const LocatorList &list)
Copy constructor.
-
inline RTPS_DllAPI LocatorList(LocatorList &&list)
Move constructor.
- inline RTPS_DllAPI LocatorList & operator= (const LocatorList &list)
Copy assignment.
- inline RTPS_DllAPI LocatorList & operator= (LocatorList &&list)
Move assignment.
- inline RTPS_DllAPI bool operator== (const LocatorList &locator_list) const
Equal to operator.
- inline RTPS_DllAPI LocatorListIterator begin ()
Return an iterator to the beginning.
- Returns:
LocatorListIterator iterator to the first locator.
- inline RTPS_DllAPI LocatorListIterator end ()
Return an iterator to the end.
- Returns:
LocatorListIterator iterator to the element following the last element.
- inline RTPS_DllAPI LocatorListConstIterator begin () const
Return a constant iterator to the beginning.
- Returns:
LocatorListConstIterator iterator to the first locator.
- inline RTPS_DllAPI LocatorListConstIterator end () const
Return a constant iterator to the end.
- Returns:
LocatorListConstIterator iterator to the element following the last element.
- inline RTPS_DllAPI size_t size () const
Return the number of locators.
- Returns:
size_t The number of locators in the container.
- inline RTPS_DllAPI LocatorList & assign (const LocatorList &list)
Replace the contents of the container.
- Parameters:
list – New content to be saved into the container.
- Returns:
LocatorList& reference to the container with the replaced content.
- inline RTPS_DllAPI void clear ()
Erase all locators from the container.
- inline RTPS_DllAPI void reserve (size_t num)
Reserve storage increasing the capacity of the vector.
- Parameters:
num – new capacity of the vector, in number of elements.
- inline RTPS_DllAPI void resize (size_t num)
Resize the container to contain
num
locators. If the current size is greater thannum
, the container is reduced to its firstnum
locators. If the current size is less than count, additional default-inserted locators are appended.- Parameters:
num – new size of the container.
- inline RTPS_DllAPI void push_back (const Locator &loc)
Add locator to the end if not found within the list.
- Parameters:
loc – locator to be appended.
- inline RTPS_DllAPI void push_back (const LocatorList &locList)
Add several locators to the end if not already present within the list.
- Parameters:
locList – LocatorList with the locators to be appended.
- inline RTPS_DllAPI bool empty () const
Check that the container has no locators.
- Returns:
true if the container is empty. False otherwise.
- inline RTPS_DllAPI void erase (const Locator &loc)
Erase the specified locator from the container.
- Parameters:
loc – Locator to be removed.
- inline FASTDDS_DEPRECATED_UNTIL (3, "eprosima::fastrtps::rtps::LocatorList::contains(const Locator&)", "Unused method.") RTPS_DllAPI bool contains(const Locator &loc)
- inline RTPS_DllAPI bool isValid () const
Check that every locator contained in the list is not LOCATOR_KIND_INVALID.
- Returns:
true if all locators are valid. False otherwise.
- inline RTPS_DllAPI void swap (LocatorList &locatorList)
exchange the content of the container.
- Parameters:
locatorList – container to exchange the contents with.
-
template<int kind>
inline bool has_kind() const
-
inline RTPS_DllAPI LocatorList()