#include <Unbounded_Queue.h>
Inheritance diagram for ACE_Unbounded_Queue:
Public Types | |
typedef ACE_Unbounded_Queue_Iterator< T > | ITERATOR |
typedef ACE_Unbounded_Queue_Const_Iterator< T > | CONST_ITERATOR |
Public Methods | |
ACE_Unbounded_Queue (ACE_Allocator *alloc=0) | |
construction. Use user specified allocation strategy if specified. More... | |
ACE_Unbounded_Queue (const ACE_Unbounded_Queue< T > &) | |
Copy constructor. More... | |
void | operator= (const ACE_Unbounded_Queue< T > &) |
Assignment operator. More... | |
~ACE_Unbounded_Queue (void) | |
Destructor. More... | |
int | is_empty (void) const |
Returns 1 if the container is empty, otherwise returns 0. More... | |
int | is_full (void) const |
Returns 1 if the container is full, otherwise returns 0. More... | |
int | enqueue_tail (const T &new_item) |
Adds <new_item> to the tail of the queue. Returns 0 on success, -1 on failure. More... | |
int | enqueue_head (const T &new_item) |
Adds <new_item> to the head of the queue. Returns 0 on success, -1 on failure. More... | |
int | dequeue_head (T &item) |
Removes and returns the first <item> on the queue. Returns 0 on success, -1 if the queue was empty. More... | |
void | reset (void) |
Reset the <ACE_Unbounded_Queue> to be empty and release all its dynamically allocated resources. More... | |
int | get (T *&item, size_t slot=0) const |
Get the <slot>th element in the set. Returns -1 if the element isn't in the range {0..<size> - 1}, else 0. More... | |
int | set (const T &item, size_t slot) |
size_t | size (void) const |
The number of items in the queue. More... | |
void | dump (void) const |
Dump the state of an object. More... | |
ACE_Unbounded_Queue_Iterator< T > | begin (void) |
ACE_Unbounded_Queue_Iterator< T > | end (void) |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Protected Methods | |
void | delete_nodes (void) |
Delete all the nodes in the queue. More... | |
void | copy_nodes (const ACE_Unbounded_Queue< T > &) |
Copy nodes into this queue. More... | |
Protected Attributes | |
ACE_Node< T > * | head_ |
Pointer to the dummy node in the circular linked Queue. More... | |
size_t | cur_size_ |
Current size of the queue. More... | |
ACE_Allocator * | allocator_ |
Allocation Strategy of the queue. More... | |
Friends | |
class | ACE_Unbounded_Queue_Iterator< T > |
class | ACE_Unbounded_Queue_Const_Iterator< T > |
This implementation of an unbounded queue uses a circular linked list with a dummy node.
|
|
|
|
|
construction. Use user specified allocation strategy if specified.
|
|
Copy constructor.
|
|
Destructor.
|
|
|
|
Copy nodes into this queue.
|
|
Delete all the nodes in the queue.
|
|
Removes and returns the first <item> on the queue. Returns 0 on success, -1 if the queue was empty.
|
|
Dump the state of an object.
|
|
|
|
Adds <new_item> to the head of the queue. Returns 0 on success, -1 on failure.
|
|
Adds <new_item> to the tail of the queue. Returns 0 on success, -1 on failure.
|
|
Get the <slot>th element in the set. Returns -1 if the element isn't in the range {0..<size> - 1}, else 0.
|
|
Returns 1 if the container is empty, otherwise returns 0.
|
|
Returns 1 if the container is full, otherwise returns 0.
|
|
Assignment operator.
|
|
Reset the <ACE_Unbounded_Queue> to be empty and release all its dynamically allocated resources.
|
|
Set the <slot>th element in the set. Will pad out the set with empty nodes if <slot> is beyond the range {0..<size> - 1}. Returns -1 on failure, 0 if <slot> isn't initially in range, and 0 otherwise. |
|
The number of items in the queue.
|
|
|
|
|
|
Declare the dynamic allocation hooks.
|
|
Allocation Strategy of the queue.
|
|
Current size of the queue.
|
|
Pointer to the dummy node in the circular linked Queue.
|