diff options
Diffstat (limited to 'include/BH/Queue.h')
| -rw-r--r-- | include/BH/Queue.h | 65 |
1 files changed, 31 insertions, 34 deletions
diff --git a/include/BH/Queue.h b/include/BH/Queue.h index 5d6af58..48d2ce9 100644 --- a/include/BH/Queue.h +++ b/include/BH/Queue.h @@ -9,42 +9,42 @@ typedef struct BH_Queue BH_Queue; /** - * Creates the new queue object. + * Creates the new queue. * - * \return On success, returns the pointer to the new queue object. + * \return On success, returns the queue pointer. * \return On failure, returns a null pointer. */ BH_Queue *BH_QueueNew(void); /** - * Frees the \a queue object. + * Frees the \a queue. * - * \param queue Pointer to the queue object to be freed + * \param queue Queue pointer */ void BH_QueueFree(BH_Queue *queue); /** - * Clears the \a queue object. + * Clears the \a queue. * - * \param queue Pointer to the queue object to be cleared + * \param queue Queue pointer */ void BH_QueueClear(BH_Queue *queue); /** - * Reserves the space for \a size elements in the \a queue. + * Reserves the space for \a size amount of value in the \a queue. * - * This function can both expand and shrink the available space in \a queue. + * This function can both expand and shrink the available space in queue. * - * \param queue Pointer to the queue object to be resized in terms of capacity - * \param size New capacity of the queue + * \param queue Queue pointer + * \param size Capacity * * \note Calling this function will invalidate iterators. - * \note Actual hashmap capacity can be bigger then requested. + * \note Actual queue capacity can be bigger then requested. * - * \return On success, returns zero value. + * \return On success, returns zero. * \return On failure, returns error code. */ int BH_QueueReserve(BH_Queue *queue, @@ -54,12 +54,12 @@ int BH_QueueReserve(BH_Queue *queue, /** * Inserts the \a value into the \a queue. * - * \param queue Pointer to the queue object - * \param value Value to be inserted + * \param queue Queue pointer + * \param value Value * * \note Calling this function will invalidate iterators. * - * \return On success, returns zero value. + * \return On success, returns zero. * \return On failure, returns error code. */ int BH_QueueInsert(BH_Queue *queue, @@ -69,7 +69,7 @@ int BH_QueueInsert(BH_Queue *queue, /** * Removes front value from the \a queue. * - * \param queue Pointer to the queue object + * \param queue Queue pointer * * \note Calling this function will invalidate iterators. */ @@ -77,12 +77,13 @@ void BH_QueueRemove(BH_Queue *queue); /** - * Returns front value from the \a queue. + * Returns front \a value from the \a queue. * - * \param queue Pointer to the queue object + * \param queue Queue pointer + * \param value Value * - * \return On success, returns front value from the queue. - * \return On failure, returns null pointer. + * \return On success, returns zero. + * \return On failure, returns error code. */ int BH_QueueFront(BH_Queue *queue, void **value); @@ -91,10 +92,10 @@ int BH_QueueFront(BH_Queue *queue, /** * Checks if the \a queue is empty. * - * \param queue Pointer to the queue object + * \param queue Queue pointer * * \return If queue is empty, returns non-zero value - * \return If queue is not empty, returns zero value + * \return If queue is not empty, returns zero */ int BH_QueueEmpty(BH_Queue *queue); @@ -102,7 +103,7 @@ int BH_QueueEmpty(BH_Queue *queue); /** * Returns the size of the \a queue. * - * \param queue Pointer to the queue object + * \param queue Queue pointer * * \return Returns the size of the queue. */ @@ -112,7 +113,7 @@ size_t BH_QueueSize(BH_Queue *queue); /** * Returns the capacity of the \a queue. * - * \param queue Pointer to the queue object + * \param queue Queue pointer * * \return Returns the capacity of the queue. */ @@ -122,24 +123,20 @@ size_t BH_QueueCapacity(BH_Queue *queue); /** * Returns the iterator to the next element in the \a queue. * - * \param queue Pointer to the queue object - * \param iter Opaque iterator value + * \param queue Queue pointer + * \param iter Iterator * - * \return If the \a iter doesn't point to the last element of the queue, - * returns next iterator value. - * \return If the \a iter point to the last element of the queue, returns - * null pointer. - * \return If the \a iter is the null pointer, returns iterator to the - * first element of the queue. + * \return On success, returns new iterator value for the next element. + * \return On failure, returns NULL pointer. */ void *BH_QueueIterNext(BH_Queue *queue, void *iter); /** - * Returns the value, pointed by the queue iterator \a iter. + * Returns the value, pointed by the \a iter. * - * \param iter Opaque iterator value + * \param iter Iterator * * \return Returns value, pointed by iterator. */ |
