Skip to content

iox::cxx::set🔗

Functions🔗

Name
template \<typename Container ,typename Type =typename Container::value_type>
void
add(Container & container, const Type & entry)
template \<typename Container ,typename Type =typename Container::value_type>
void
remove(Container & container, const Type & entry)
template \<typename Container ,typename Type =typename Container::value_type>
bool
hasElement(Container & container, const Type & entry)
template \<typename Container >
Container &
unify(Container & set1, const Container & set2)

Functions Documentation🔗

function add🔗

template <typename Container ,
typename Type  =typename Container::value_type>
void add(
    Container & container,
    const Type & entry
)

Parameters:

  • container container to be added to
  • entry element to be added

Adds entry to a container with set semantics. The entry type must provide operator==. If the entry already exists it is not added.

function remove🔗

template <typename Container ,
typename Type  =typename Container::value_type>
void remove(
    Container & container,
    const Type & entry
)

Parameters:

  • container container to be removed from
  • entry element to be removed

Removes entry from a container if it exists. The entry type must provide operator==.

function hasElement🔗

template <typename Container ,
typename Type  =typename Container::value_type>
bool hasElement(
    Container & container,
    const Type & entry
)

Parameters:

  • container container to check
  • entry element whose existence is checked

Return: true if the container contains entry, false otherwise

Checks whether a container contains some specified entry. The entry type must provide operator==.

function unify🔗

template <typename Container >
Container & unify(
    Container & set1,
    const Container & set2
)

Parameters:

  • set1 first set operand for union operation, also holds the union result after operation
  • set2 second set operand for union operation

Return: reference to the union of both sets stored in set1

union of set1 and set2, set1 is the union after the operation and returned as result


Updated on 17 June 2021 at 11:15:26 CEST