Open Lighting Architecture: ola::usb::UIDSet Class Reference

| Open Lighting Architecture 0.10.9

Loading...
Searching...
No Matches
Public Types | Public Member Functions | Friends | List of all members
ola::usb::UIDSet Class Reference

## Detailed Description

Represents a set of RDM UIDs.

## Public Types
typedef std::set< UID >::const_iterator | Iterator
| the Iterator for a UIDSets

## Public Member Functions
| UIDSet ()
| Construct an empty set.
| UIDSet (const UIDSet &other)
| Copy constructor.
UIDSet & | operator= (const UIDSet &other)
| Assignment operator.
void | Clear ()
| Remove all members from the set.
unsigned int | Size () const
| Return the number of UIDs in the set.
bool | Empty () const
| Return whether the UID set is empty.
void | AddUID (const UID &uid)
| Add a UID to the set.
void | RemoveUID (const UID &uid)
| Remove a UID from the set.
bool | Contains (const UID &uid) const
| Check if the set contains a UID.
UIDSet | Union (const UIDSet &other)
| Return the union of this set and another UIDSet.
Iterator | Begin () const
| Return an Iterator to the first member of the set.
Iterator | End () const
| Return an Iterator to one-pass-the-last member of the set.
UIDSet | SetDifference (const UIDSet &other)
| Return the UIDs in this set that don't exist in other.
bool | operator== (const UIDSet &other) const
| Equality operator.
bool | operator!= (const UIDSet &other) const
| Inequality operator.
std::string | ToString () const
| Convert a UIDSet to a human readable string.

## Friends
std::ostream & | operator<< (std::ostream &out, const UIDSet &uid_set)
| A helper function to write a UIDSet to an ostream.

## Constructor & Destructor Documentation

## ◆ UIDSet()

ola::rdm::UIDSet::UIDSet | ( | const UIDSet & | other | ) |
| inline

Copy constructor.

Parameters

  other | the UIDSet to copy.

## Member Function Documentation

## ◆ AddUID()

void ola::rdm::UIDSet::AddUID | ( | const UID & | uid | ) |
| inline

Add a UID to the set.

Parameters

  uid | the UID to add.

## ◆ Contains()

bool ola::rdm::UIDSet::Contains | ( | const UID & | uid | ) | const
| inline

Check if the set contains a UID.

Parameters

  uid | the UID to check for.

Returns
  true if the set contains this UID.

## ◆ Empty()

bool ola::rdm::UIDSet::Empty | ( |  | ) | const
| inline

Return whether the UID set is empty.

Returns
  true if there are no UIDs in the set.

## ◆ operator!=()

bool ola::rdm::UIDSet::operator!= | ( | const UIDSet & | other | ) | const
| inline

Inequality operator.

Parameters

  other | the UIDSet to compare to.

## ◆ operator==()

bool ola::rdm::UIDSet::operator== | ( | const UIDSet & | other | ) | const
| inline

Equality operator.

Parameters

  other | the UIDSet to compare to.

## ◆ RemoveUID()

void ola::rdm::UIDSet::RemoveUID | ( | const UID & | uid | ) |
| inline

Remove a UID from the set.

Parameters

  uid | the UID to remove.

## ◆ SetDifference()

UIDSet ola::rdm::UIDSet::SetDifference | ( | const UIDSet & | other | ) |
| inline

Return the UIDs in this set that don't exist in other.

Parameters

  other | the UIDSet to subtract from this set.

Returns
  the difference between this UIDSet and other.

## ◆ Size()

unsigned int ola::rdm::UIDSet::Size | ( |  | ) | const
| inline

Return the number of UIDs in the set.

Returns
  the number of UIDs in the set.

## ◆ ToString()

std::string ola::rdm::UIDSet::ToString | ( |  | ) | const
| inline

Convert a UIDSet to a human readable string.

Returns
  a comma separated string with the UIDs from the set.

## ◆ Union()

UIDSet ola::rdm::UIDSet::Union | ( | const UIDSet & | other | ) |
| inline

Return the union of this set and another UIDSet.

Parameters

  other | the UIDSet to perform the union with.

Returns
  the union of the two UIDSets.

## Friends And Related Symbol Documentation

## ◆ operator<<

std::ostream & operator<< | ( | std::ostream & | out,
|  | const UIDSet & | uid_set )
| friend

A helper function to write a UIDSet to an ostream.

Parameters

  out | the ostream
  uid_set | the UIDSet to write.

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

- include/ola/rdm/UIDSet.h