QP/C  8.0.3
Real-Time Event Framework
Loading...
Searching...
No Matches
QPSet Class Reference

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

#include "qp.h"

Static Public Member Functions

static void QPSet_setEmpty (QPSet *const me)
 Make the priority set empty.
 
static bool QPSet_isEmpty (QPSet const *const me)
 Find out whether the priority-set is empty.
 
static bool QPSet_notEmpty (QPSet const *const me)
 Find out whether the priority-set is NOT empty.
 
static bool QPSet_hasElement (QPSet const *const me, uint_fast8_t const n)
 Find out whether the priority-set has element n
 
static void QPSet_insert (QPSet *const me, uint_fast8_t const n)
 Insert element n into the priority-set (n = 1..QF_MAX_ACTIVE)
 
static void QPSet_remove (QPSet *const me, uint_fast8_t const n)
 Remove element n from the priority-set (n = 1..QF_MAX_ACTIVE)
 
static uint_fast8_t QPSet_findMax (QPSet const *const me)
 Find the maximum element in the set–returns zero if the set is empty.
 

Private Attributes

QPSetBits bits [((QF_MAX_ACTIVE+(8U *sizeof(QPSetBits))) - 1U)/(8U *sizeof(QPSetBits))]
 Bitmask with a bit for each element.
 

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.
Backward Traceability

Definition at line 406 of file qp.h.

Member Function Documentation

◆ QPSet_setEmpty()

static void QPSet_setEmpty ( QPSet *const me)
inlinestatic

Make the priority set empty.

Definition at line 413 of file qp.h.

◆ QPSet_isEmpty()

static bool QPSet_isEmpty ( QPSet const *const me)
inlinestatic

Find out whether the priority-set is empty.

Returns
'true' if the priority set is empty.

Definition at line 421 of file qp.h.

◆ QPSet_notEmpty()

static bool QPSet_notEmpty ( QPSet const *const me)
inlinestatic

Find out whether the priority-set is NOT empty.

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

Definition at line 430 of file qp.h.

◆ QPSet_hasElement()

static bool QPSet_hasElement ( QPSet const *const me,
uint_fast8_t const n )
inlinestatic

Find out whether the priority-set has element n

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

Definition at line 439 of file qp.h.

◆ QPSet_insert()

static void QPSet_insert ( QPSet *const me,
uint_fast8_t const n )
inlinestatic

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

Definition at line 452 of file qp.h.

◆ QPSet_remove()

static void QPSet_remove ( QPSet *const me,
uint_fast8_t const n )
inlinestatic

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

Definition at line 468 of file qp.h.

◆ QPSet_findMax()

static uint_fast8_t QPSet_findMax ( QPSet const *const me)
inlinestatic

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

Returns
The current maximum element n.

Definition at line 484 of file qp.h.

Member Data Documentation

◆ bits

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

Bitmask with a bit for each element.

Definition at line 408 of file qp.h.


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