#include <Unbounded_Set.h>
Inheritance diagram for ACE_Unbounded_Set:


Public Types | |
| typedef ACE_Unbounded_Set_Iterator< T > | ITERATOR |
| typedef ACE_Unbounded_Set_Iterator< T > | iterator |
| typedef ACE_Unbounded_Set_Const_Iterator< T > | CONST_ITERATOR |
| typedef ACE_Unbounded_Set_Const_Iterator< T > | const_iterator |
Public Methods | |
| ACE_Unbounded_Set (ACE_Allocator *alloc=0) | |
| Initialize an empty set using the allocation strategy of the user if provided. More... | |
| ACE_Unbounded_Set (const ACE_Unbounded_Set< T > &) | |
| Initialize this set to be an exact copy of the set provided. More... | |
| void | operator= (const ACE_Unbounded_Set< T > &) |
| Perform a deep copy of the rhs into the lhs. More... | |
| ~ACE_Unbounded_Set (void) | |
| Destroy the nodes of the set. More... | |
| int | is_empty (void) const |
| Constant time is_empty check. More... | |
| int | is_full (void) const |
| Always returns 0 since the set can never fill up. More... | |
| int | insert (const T &new_item) |
| Insert <new_item> into the set (doesn't allow duplicates). More... | |
| int | insert_tail (const T &item) |
| Constant time insert at the end of the set. More... | |
| int | remove (const T &item) |
| Remove first occurrence of <item> from the set. More... | |
| int | find (const T &item) const |
| Performs a linear find operation. More... | |
| size_t | size (void) const |
| Access the size of the set. More... | |
| void | dump (void) const |
| Dump the state of an object. More... | |
| void | reset (void) |
| Delete the nodes of the set. More... | |
| ACE_Unbounded_Set_Iterator< T > | begin (void) |
| ACE_Unbounded_Set_Iterator< T > | end (void) |
Public Attributes | |
| ACE_ALLOC_HOOK_DECLARE | |
| Declare the dynamic allocation hooks. More... | |
Private Methods | |
| void | delete_nodes (void) |
| Delete all the nodes in the Set. More... | |
| void | copy_nodes (const ACE_Unbounded_Set< T > &) |
| Copy nodes into this set. More... | |
Private Attributes | |
| ACE_Node< T > * | head_ |
| Head of the linked list of Nodes. More... | |
| size_t | cur_size_ |
| Current size of the set. More... | |
| ACE_Allocator * | allocator_ |
| Allocation strategy of the set. More... | |
Friends | |
| class | ACE_Unbounded_Set_Iterator< T > |
| class | ACE_Unbounded_Set_Const_Iterator< T > |
This implementation of an unordered set uses a circular linked list with a dummy node. This implementation does not allow duplicates, but it maintains FIFO ordering of insertions.
Requirements and Performance Characteristics
|
|||||
|
|
|
|||||
|
|
|
|||||
|
|
|
|||||
|
|
|
||||||||||
|
Initialize an empty set using the allocation strategy of the user if provided.
|
|
||||||||||
|
Initialize this set to be an exact copy of the set provided.
|
|
||||||||||
|
Destroy the nodes of the set.
|
|
||||||||||
|
|
|
||||||||||
|
Copy nodes into this set.
|
|
||||||||||
|
Delete all the nodes in the Set.
|
|
||||||||||
|
Dump the state of an object.
|
|
||||||||||
|
|
|
||||||||||
|
Performs a linear find operation.
|
|
||||||||||
|
Insert <new_item> into the set (doesn't allow duplicates). Returns -1 if failures occur, 1 if item is already present, else 0. |
|
||||||||||
|
Constant time insert at the end of the set.
|
|
||||||||||
|
Constant time is_empty check.
|
|
||||||||||
|
Always returns 0 since the set can never fill up.
|
|
||||||||||
|
Perform a deep copy of the rhs into the lhs.
|
|
||||||||||
|
Remove first occurrence of <item> from the set. Returns 0 if it removes the item, -1 if it can't find the item, and -1 if a failure occurs. |
|
||||||||||
|
Delete the nodes of the set.
|
|
||||||||||
|
Access the size of the set.
|
|
|||||
|
|
|
|||||
|
|
|
|||||
|
Declare the dynamic allocation hooks.
|
|
|||||
|
Allocation strategy of the set.
|
|
|||||
|
Current size of the set.
|
|
|||||
|
Head of the linked list of Nodes.
|
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001