Fast DDS  Version 3.1.2
Fast DDS
Loading...
Searching...
No Matches
LocatorList Class Reference

Class LocatorList, a Locator vector that doesn't allow duplicates. More...

#include <LocatorList.hpp>

Public Types

using value_type = typename std::vector<Locator>::value_type
 

Public Member Functions

FASTDDS_EXPORTED_API LocatorList ()
 Constructor.
 
FASTDDS_EXPORTED_API ~LocatorList ()
 Destructor.
 
FASTDDS_EXPORTED_API LocatorList (const LocatorList &list)
 Copy constructor.
 
FASTDDS_EXPORTED_API LocatorList (LocatorList &&list)
 Move constructor.
 
FASTDDS_EXPORTED_API LocatorListoperator= (const LocatorList &list)
 Copy assignment.
 
FASTDDS_EXPORTED_API LocatorListoperator= (LocatorList &&list)
 Move assignment.
 
FASTDDS_EXPORTED_API bool operator== (const LocatorList &locator_list) const
 Equal to operator.
 
FASTDDS_EXPORTED_API bool operator!= (const LocatorList &locator_list) const
 Not equal to operator.
 
FASTDDS_EXPORTED_API LocatorListIterator begin ()
 Return an iterator to the beginning.
 
FASTDDS_EXPORTED_API LocatorListIterator end ()
 Return an iterator to the end.
 
FASTDDS_EXPORTED_API LocatorListConstIterator begin () const
 Return a constant iterator to the beginning.
 
FASTDDS_EXPORTED_API LocatorListConstIterator end () const
 Return a constant iterator to the end.
 
FASTDDS_EXPORTED_API size_t size () const
 Return the number of locators.
 
FASTDDS_EXPORTED_API LocatorListassign (const LocatorList &list)
 Replace the contents of the container.
 
FASTDDS_EXPORTED_API void clear ()
 Erase all locators from the container.
 
FASTDDS_EXPORTED_API void reserve (size_t num)
 Reserve storage increasing the capacity of the vector.
 
FASTDDS_EXPORTED_API void resize (size_t num)
 Resize the container to contain num locators.
 
FASTDDS_EXPORTED_API void push_back (const Locator &loc)
 Add locator to the end if not found within the list.
 
FASTDDS_EXPORTED_API void push_back (const LocatorList &locList)
 Add several locators to the end if not already present within the list.
 
FASTDDS_EXPORTED_API bool empty () const
 Check that the container has no locators.
 
FASTDDS_EXPORTED_API void erase (const Locator &loc)
 Erase the specified locator from the container.
 
FASTDDS_EXPORTED_API bool isValid () const
 Check that every locator contained in the list is not LOCATOR_KIND_INVALID.
 
FASTDDS_EXPORTED_API void swap (LocatorList &locatorList)
 exchange the content of the container.
 
template<int kind>
bool has_kind () const
 
FASTDDS_EXPORTED_API void copy_to (eprosima::fastdds::ResourceLimitedVector< Locator > &locator_list) const
 

Detailed Description

Class LocatorList, a Locator vector that doesn't allow duplicates.

Member Typedef Documentation

◆ value_type

using value_type = typename std::vector<Locator>::value_type

Constructor & Destructor Documentation

◆ LocatorList() [1/3]

FASTDDS_EXPORTED_API LocatorList ( )
inline

Constructor.

◆ ~LocatorList()

FASTDDS_EXPORTED_API ~LocatorList ( )
inline

Destructor.

◆ LocatorList() [2/3]

FASTDDS_EXPORTED_API LocatorList ( const LocatorList & list)
inline

Copy constructor.

◆ LocatorList() [3/3]

FASTDDS_EXPORTED_API LocatorList ( LocatorList && list)
inline

Move constructor.

Member Function Documentation

◆ assign()

FASTDDS_EXPORTED_API LocatorList & assign ( const LocatorList & list)
inline

Replace the contents of the container.

Parameters
listNew content to be saved into the container.
Returns
LocatorList& reference to the container with the replaced content.

◆ begin() [1/2]

FASTDDS_EXPORTED_API LocatorListIterator begin ( )
inline

Return an iterator to the beginning.

Returns
LocatorListIterator iterator to the first locator.

◆ begin() [2/2]

FASTDDS_EXPORTED_API LocatorListConstIterator begin ( ) const
inline

Return a constant iterator to the beginning.

Returns
LocatorListConstIterator iterator to the first locator.

◆ clear()

FASTDDS_EXPORTED_API void clear ( )
inline

Erase all locators from the container.

◆ copy_to()

FASTDDS_EXPORTED_API void copy_to ( eprosima::fastdds::ResourceLimitedVector< Locator > & locator_list) const
inline

◆ empty()

FASTDDS_EXPORTED_API bool empty ( ) const
inline

Check that the container has no locators.

Returns
true if the container is empty. False otherwise.

◆ end() [1/2]

FASTDDS_EXPORTED_API LocatorListIterator end ( )
inline

Return an iterator to the end.

Returns
LocatorListIterator iterator to the element following the last element.

◆ end() [2/2]

FASTDDS_EXPORTED_API LocatorListConstIterator end ( ) const
inline

Return a constant iterator to the end.

Returns
LocatorListConstIterator iterator to the element following the last element.

◆ erase()

FASTDDS_EXPORTED_API void erase ( const Locator & loc)
inline

Erase the specified locator from the container.

Parameters
locLocator to be removed.

◆ has_kind()

template<int kind>
bool has_kind ( ) const
inline

◆ isValid()

FASTDDS_EXPORTED_API bool isValid ( ) const
inline

Check that every locator contained in the list is not LOCATOR_KIND_INVALID.

Returns
true if all locators are valid. False otherwise.

◆ operator!=()

FASTDDS_EXPORTED_API bool operator!= ( const LocatorList & locator_list) const
inline

Not equal to operator.

◆ operator=() [1/2]

FASTDDS_EXPORTED_API LocatorList & operator= ( const LocatorList & list)
inline

Copy assignment.

◆ operator=() [2/2]

FASTDDS_EXPORTED_API LocatorList & operator= ( LocatorList && list)
inline

Move assignment.

◆ operator==()

FASTDDS_EXPORTED_API bool operator== ( const LocatorList & locator_list) const
inline

Equal to operator.

◆ push_back() [1/2]

FASTDDS_EXPORTED_API void push_back ( const Locator & loc)
inline

Add locator to the end if not found within the list.

Parameters
loclocator to be appended.

◆ push_back() [2/2]

FASTDDS_EXPORTED_API void push_back ( const LocatorList & locList)
inline

Add several locators to the end if not already present within the list.

Parameters
locListLocatorList with the locators to be appended.

◆ reserve()

FASTDDS_EXPORTED_API void reserve ( size_t num)
inline

Reserve storage increasing the capacity of the vector.

Parameters
numnew capacity of the vector, in number of elements.

◆ resize()

FASTDDS_EXPORTED_API void resize ( size_t num)
inline

Resize the container to contain num locators.

If the current size is greater than num, the container is reduced to its first num locators. If the current size is less than count, additional default-inserted locators are appended.

Parameters
numnew size of the container.

◆ size()

FASTDDS_EXPORTED_API size_t size ( ) const
inline

Return the number of locators.

Returns
size_t The number of locators in the container.

◆ swap()

FASTDDS_EXPORTED_API void swap ( LocatorList & locatorList)
inline

exchange the content of the container.

Parameters
locatorListcontainer to exchange the contents with.

The documentation for this class was generated from the following file: