queue_has_element()

Test whether an element is part of a queue.

Synopsis:

#include <hnm/queue.h>
 
bool queue_has_element(const queue_Queue *queue, const void *element)

Arguments:

queue

The queue for which the element is being tested for membership.

element

A pointer to a specialized structure that contains a queue_Element structure as its first member. This element is tested for membership in the specified queue.

Library:

libhnm

Description:

Given a queue_element data structure, the queue_has_element() function determines whether it belongs to the specified queue. This test is performed in constant O(1) time. Both the queue and element data remain unchanged following a call to this function.

Returns:

A Boolean flag indicating whether element is (true) or is not (false) a member of queue .