#include <Containers_T.h>
Collaboration diagram for ACE_Ordered_MultiSet:
Public Types | |
typedef ACE_Ordered_MultiSet_Iterator< T > | ITERATOR |
Public Methods | |
ACE_Ordered_MultiSet (ACE_Allocator *alloc=0) | |
Initialize the set using the allocation strategy specified. More... | |
ACE_Ordered_MultiSet (const ACE_Ordered_MultiSet< T > &) | |
Initialize the set to be a copy of the provided set. More... | |
~ACE_Ordered_MultiSet (void) | |
Delete the nodes of the set. More... | |
void | operator= (const ACE_Ordered_MultiSet< T > &) |
Delete the nodes in lhs, and copy the nodes from the rhs. More... | |
int | is_empty (void) const |
Constant time check to determine if the set is empty. More... | |
size_t | size (void) const |
Constant time check to determine the size of the set. More... | |
int | insert (const T &new_item) |
Linear time, order preserving insert into the set beginning at the head. More... | |
int | insert (const T &new_item, ITERATOR &iter) |
Insert <new_item> into the ordered multiset, starting its search at the node pointed to by the iterator, and if insertion was successful, updates the iterator to point to the newly inserted node. More... | |
int | remove (const T &item) |
Linear time search operation which removes the item from the set if found . More... | |
int | find (const T &item, ITERATOR &iter) const |
Finds first occurrence of <item> in the multiset, using the iterator's current position as a hint to improve performance. More... | |
void | reset (void) |
Delete the nodes inside the set. More... | |
void | dump (void) const |
Dump the state of an object. More... | |
Public Attributes | |
ACE_ALLOC_HOOK_DECLARE | |
Declare the dynamic allocation hooks. More... | |
Private Methods | |
int | insert_from (const T &item, ACE_DNode< T > *start_position, ACE_DNode< T > **new_position) |
Insert <item>, starting its search at the position given, and if successful updates the passed pointer to point to the newly inserted item's node. More... | |
int | locate (const T &item, ACE_DNode< T > *start_position, ACE_DNode< T > *&new_position) const |
looks for first occurance of <item> in the ordered set, using the passed starting position as a hint: if there is such an instance, it updates the new_position pointer to point to this node and returns 0; if there is no such node, then if there is a node before where the item would have been, it updates the new_position pointer to point to this node and returns -1; if there is no such node, then if there is a node after where the item would have been, it updates the new_position pointer to point to this node (or 0 if there is no such node) and returns 1;. More... | |
void | delete_nodes (void) |
Delete all the nodes in the Set. More... | |
void | copy_nodes (const ACE_Ordered_MultiSet< T > &) |
Copy nodes into this set. More... | |
Private Attributes | |
ACE_DNode< T > * | head_ |
Head of the bilinked list of Nodes. More... | |
ACE_DNode< T > * | tail_ |
Head of the bilinked 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_Ordered_MultiSet_Iterator< T > |
Requirements and Performance Characteristics
|
|
|
Initialize the set using the allocation strategy specified. If none, use the default strategy. |
|
Initialize the set to be a copy of the provided set.
|
|
Delete the nodes of the set.
|
|
Copy nodes into this set.
|
|
Delete all the nodes in the Set.
|
|
Dump the state of an object.
|
|
Finds first occurrence of <item> in the multiset, using the iterator's current position as a hint to improve performance. If find succeeds, it positions the iterator at that node and returns 0, or if it cannot locate the node, it leaves the iterator alone and just returns -1. |
|
Insert <new_item> into the ordered multiset, starting its search at the node pointed to by the iterator, and if insertion was successful, updates the iterator to point to the newly inserted node. Returns -1 if failures occur, else 0. |
|
Linear time, order preserving insert into the set beginning at the head.
|
|
Insert <item>, starting its search at the position given, and if successful updates the passed pointer to point to the newly inserted item's node.
|
|
Constant time check to determine if the set is empty.
|
|
looks for first occurance of <item> in the ordered set, using the passed starting position as a hint: if there is such an instance, it updates the new_position pointer to point to this node and returns 0; if there is no such node, then if there is a node before where the item would have been, it updates the new_position pointer to point to this node and returns -1; if there is no such node, then if there is a node after where the item would have been, it updates the new_position pointer to point to this node (or 0 if there is no such node) and returns 1;.
|
|
Delete the nodes in lhs, and copy the nodes from the rhs.
|
|
Linear time search operation which removes the item from the set if found .
|
|
Delete the nodes inside the set.
|
|
Constant time check to determine the size of the set.
|
|
|
|
Declare the dynamic allocation hooks.
|
|
Allocation strategy of the set.
|
|
Current size of the set.
|
|
Head of the bilinked list of Nodes.
|
|
Head of the bilinked list of Nodes.
|