QP/C++ 8.1.2
Real-Time Event Framework
Loading...
Searching...
No Matches

Set of Active Objects of up to QF_MAX_ACTIVE elements. More...

#include <qp.hpp>

Public Member Functions

void setEmpty () noexcept
 Make the priority set empty.
bool isEmpty () const noexcept
 Find out whether the priority-set is empty.
bool notEmpty () const noexcept
 Find out whether the priority-set is NOT empty.
bool hasElement (std::uint_fast8_t const n) const noexcept
 Find out whether the priority-set has element n.
void insert (std::uint_fast8_t const n) noexcept
 Insert element n into the priority-set (n = 1..QF_MAX_ACTIVE).
void remove (std::uint_fast8_t const n) noexcept
 Remove element n from the priority-set (n = 1..QF_MAX_ACTIVE).
std::uint_fast8_t findMax () const noexcept
 Find the maximum element in the set.

Private Attributes

QPSetBits m_bits0
 Bitmask for elements 1..32.
QPSetBits m_bits1
 Bitmask for elements 33..64.

Friends

class QS

Detailed Description

Set of Active Objects of up to QF_MAX_ACTIVE elements.

Details
QPSet represents the set of Active Objects in the priority order. The set is capable of storing up to QF_MAX_ACTIVE elements.

Definition at line 447 of file qp.hpp.

Member Function Documentation

◆ setEmpty()

void QP::QPSet::setEmpty ( )
noexcept

Make the priority set empty.

Definition at line 207 of file qf_qact.cpp.

◆ isEmpty()

bool QP::QPSet::isEmpty ( ) const
noexcept

Find out whether the priority-set is empty.

Returns
'true' if the priority set is empty.

Definition at line 214 of file qf_qact.cpp.

◆ notEmpty()

bool QP::QPSet::notEmpty ( ) const
noexcept

Find out whether the priority-set is NOT empty.

Returns
'true' if the priority set is NOT empty.

Definition at line 224 of file qf_qact.cpp.

◆ hasElement()

bool QP::QPSet::hasElement ( std::uint_fast8_t const n) const
noexcept

Find out whether the priority-set has element n.

Returns
'true' if the priority set has the element n.

Definition at line 234 of file qf_qact.cpp.

◆ insert()

void QP::QPSet::insert ( std::uint_fast8_t const n)
noexcept

Insert element n into the priority-set (n = 1..QF_MAX_ACTIVE).

Definition at line 245 of file qf_qact.cpp.

◆ remove()

void QP::QPSet::remove ( std::uint_fast8_t const n)
noexcept

Remove element n from the priority-set (n = 1..QF_MAX_ACTIVE).

Definition at line 259 of file qf_qact.cpp.

◆ findMax()

std::uint_fast8_t QP::QPSet::findMax ( ) const
noexcept

Find the maximum element in the set.

Returns
The current maximum element n or zero if the set is empty

Definition at line 273 of file qf_qact.cpp.

◆ QS

friend class QS
friend

Definition at line 464 of file qp.hpp.

Member Data Documentation

◆ m_bits0

QPSetBits QP::QPSet::m_bits0
private

Bitmask for elements 1..32.

Definition at line 449 of file qp.hpp.

◆ m_bits1

QPSetBits QP::QPSet::m_bits1
private

Bitmask for elements 33..64.

Definition at line 451 of file qp.hpp.


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