TAO_CosNaming  2.5.11
Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Friends | List of all members
ACE_Unbounded_List Class Reference

Implement a simple unordered set of <T> of unbounded size. More...

#include <Naming_Service_Container.h>

Collaboration diagram for ACE_Unbounded_List:
Collaboration graph
[legend]

Public Types

typedef ACE_Unbounded_List_Iterator< T > ITERATOR
 
typedef ACE_Unbounded_List_Iterator< T > iterator
 

Public Member Functions

 ACE_Unbounded_List (ACE_Allocator *alloc=0)
 
 ACE_Unbounded_List (const ACE_Unbounded_List< T > &)
 Copy constructor. More...
 
void operator= (const ACE_Unbounded_List< T > &)
 Assignment operator. More...
 
 ~ACE_Unbounded_List (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 insert (const T &new_item)
 
int remove (const T &item)
 
size_t size (void) const
 Size of the set. More...
 
void dump (void) const
 Dump the state of an object. More...
 
void reset (void)
 Reset the <ACE_Unbounded_List> to be empty. More...
 
ACE_Unbounded_List_Iterator< T > begin (void)
 
ACE_Unbounded_List_Iterator< T > end (void)
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks. More...
 

Private Member Functions

int insert_tail (const T &item)
 
void delete_nodes (void)
 Delete all the nodes in the List. More...
 
void copy_nodes (const ACE_Unbounded_List< T > &)
 Copy nodes into this set. More...
 

Private Attributes

ACE_NS_Node< T > * head_
 Head of the linked list of NS_Nodes. More...
 
size_t cur_size_
 Current size of the set. More...
 
ACE_Allocatorallocator_
 Allocation strategy of the set. More...
 

Friends

class ACE_Unbounded_List_Iterator< T >
 

Detailed Description

Implement a simple unordered set of <T> of unbounded size.

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.

Member Typedef Documentation

◆ ITERATOR

◆ iterator

Constructor & Destructor Documentation

◆ ACE_Unbounded_List() [1/2]

ACE_Unbounded_List::ACE_Unbounded_List ( ACE_Allocator alloc = 0)

Constructor. Use user specified allocation strategy if specified.

◆ ACE_Unbounded_List() [2/2]

ACE_Unbounded_List::ACE_Unbounded_List ( const ACE_Unbounded_List< T > &  )

Copy constructor.

◆ ~ACE_Unbounded_List()

ACE_Unbounded_List::~ACE_Unbounded_List ( void  )

Destructor.

Member Function Documentation

◆ begin()

ACE_Unbounded_List_Iterator<T> ACE_Unbounded_List::begin ( void  )

◆ copy_nodes()

void ACE_Unbounded_List::copy_nodes ( const ACE_Unbounded_List< T > &  )
private

Copy nodes into this set.

◆ delete_nodes()

void ACE_Unbounded_List::delete_nodes ( void  )
private

Delete all the nodes in the List.

◆ dump()

void ACE_Unbounded_List::dump ( void  ) const

Dump the state of an object.

◆ end()

ACE_Unbounded_List_Iterator<T> ACE_Unbounded_List::end ( void  )

◆ insert()

int ACE_Unbounded_List::insert ( const T &  new_item)

Insert <new_item> into the set (doesn't allow duplicates). Returns -1 if failures occur, 1 if item is already present, else 0.

◆ insert_tail()

int ACE_Unbounded_List::insert_tail ( const T &  item)
private

Insert at the tail of the set (doesn't check for duplicates).

◆ is_empty()

int ACE_Unbounded_List::is_empty ( void  ) const

Returns 1 if the container is empty, otherwise returns 0.

◆ is_full()

int ACE_Unbounded_List::is_full ( void  ) const

Returns 1 if the container is full, otherwise returns 0.

◆ operator=()

void ACE_Unbounded_List::operator= ( const ACE_Unbounded_List< T > &  )

Assignment operator.

◆ remove()

int ACE_Unbounded_List::remove ( const T &  item)

Remove first occurrence of from the set. Returns 0 if it removes the item, -1 if it can't find the item, and -1 if a failure occurs.

◆ reset()

void ACE_Unbounded_List::reset ( void  )

Reset the <ACE_Unbounded_List> to be empty.

◆ size()

size_t ACE_Unbounded_List::size ( void  ) const

Size of the set.

Friends And Related Function Documentation

◆ ACE_Unbounded_List_Iterator< T >

friend class ACE_Unbounded_List_Iterator< T >
friend

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

ACE_Unbounded_List::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ allocator_

ACE_Allocator* ACE_Unbounded_List::allocator_
private

Allocation strategy of the set.

◆ cur_size_

size_t ACE_Unbounded_List::cur_size_
private

Current size of the set.

◆ head_

ACE_NS_Node<T>* ACE_Unbounded_List::head_
private

Head of the linked list of NS_Nodes.


The documentation for this class was generated from the following file: