QP/C++  8.0.2
Real-Time Embedded Framework
Loading...
Searching...
No Matches
QP::QPSet Class Reference

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

#include "qp.hpp"

Public Member Functions

void setEmpty () noexcept
 
bool isEmpty () const noexcept
 
bool notEmpty () const noexcept
 
bool hasElement (std::uint_fast8_t const n) const noexcept
 
void insert (std::uint_fast8_t const n) noexcept
 
void remove (std::uint_fast8_t const n) noexcept
 
std::uint_fast8_t findMax () const noexcept
 

Private Attributes

QPSetBits m_bits [((QF_MAX_ACTIVE+(8U *sizeof(QPSetBits))) - 1U)/(8U *sizeof(QPSetBits))]
 

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 488 of file qp.hpp.

Member Function Documentation

◆ setEmpty()

void QP::QPSet::setEmpty ( )
inlinenoexcept

Make the priority set empty

Definition at line 493 of file qp.hpp.

◆ isEmpty()

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

Find out whether the priority-set is empty.

Returns
'true' if the priority set is empty.

Definition at line 499 of file qp.hpp.

◆ notEmpty()

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

Find out whether the priority-set is NOT empty.

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

Definition at line 506 of file qp.hpp.

◆ hasElement()

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

Find out whether the priority-set has element n.

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

Definition at line 513 of file qp.hpp.

◆ insert()

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

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

Definition at line 522 of file qp.hpp.

◆ remove()

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

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

Definition at line 534 of file qp.hpp.

◆ findMax()

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

Find the maximum element in the set, returns zero if the set is empty.

Returns
The current maximum element n.

Definition at line 546 of file qp.hpp.

Member Data Documentation

◆ m_bits

QPSetBits QP::QPSet::m_bits[((QF_MAX_ACTIVE+(8U *sizeof(QPSetBits))) - 1U)/(8U *sizeof(QPSetBits))]
private

Bitmask with a bit for each element

Definition at line 490 of file qp.hpp.


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