45 inline bool _isInitialized(
void) __attribute__((
always_inline));
48 inline uint16_t _getCount(
void) __attribute__((
always_inline));
59 cppQueue(
const size_t size_rec,
const uint16_t nb_recs=20,
const cppQueueType type=
FIFO,
const bool overwrite=
false,
void *
const pQDat=NULL,
const size_t lenQDat=0);
125 bool push(
const void *
const record) __attribute__((nonnull));
135 bool pop(
void *
const record) __attribute__((nonnull));
147 return pop(record); }
158 bool peek(
void *
const record) __attribute__((nonnull));
180 bool peekIdx(
void *
const record,
const uint16_t idx) __attribute__((nonnull));
Class containing the required methods for handling the queue.
Definition cppQueue.h:30
uint32_t sizeOf(void)
get size of queue
bool always_inline
Definition cppQueue.h:146
bool isInitialized(void)
get initialization state of the queue
void clean(void) __attribute__((always_inline))
Clean queue, restarting from empty queue.
Definition cppQueue.h:72
bool peekIdx(void *const record, const uint16_t idx) __attribute__((nonnull))
Peek record at index from queue.
bool pop(void *const record) __attribute__((nonnull))
Pop record from queue.
uint16_t nbRecs(void) __attribute__((always_inline))
get number of records in the queue (same as getCount)
Definition cppQueue.h:111
bool isEmpty(void)
get emptiness state of the queue
cppQueue(const size_t size_rec, const uint16_t nb_recs=20, const cppQueueType type=FIFO, const bool overwrite=false, void *const pQDat=NULL, const size_t lenQDat=0)
cppQueue constructor
bool pull(void *const record) __attribute__((nonnull
Pull record from queue (same as pop)
bool isFull(void)
get fullness state of the queue
uint16_t getRemainingCount(void)
get number of records left in the queue
bool drop(void)
Drop current record from queue.
void flush(void)
Flush queue, restarting from empty queue.
bool peekPrevious(void *const record) __attribute__((nonnull))
Peek previous record from queue.
~cppQueue()
cppQueue destructor: release dynamically allocated queue
uint16_t getCount(void)
get number of records in the queue
bool push(const void *const record) __attribute__((nonnull))
Push record to queue.
bool peek(void *const record) __attribute__((nonnull))
Peek record from queue.
enumcppQueueType
cppQueue behavior enumeration (FIFO, LIFO)
Definition cppQueue.h:20
@ FIFO
First In First Out behavior.
Definition cppQueue.h:21
@ LIFO
Last In First Out behavior.
Definition cppQueue.h:22
enum enumcppQueueType cppQueueType