Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Bounded_Set Class Template Reference

Implement a simple unordered set of <T> with maximum set at creation time. More...

#include <Containers_T.h>

Collaboration diagram for ACE_Bounded_Set:

Collaboration graph
[legend]
List of all members.

Public Types

typedef ACE_Bounded_Set_Iterator<
T> 
ITERATOR
enum  { DEFAULT_SIZE = 10 }

Public Methods

 ACE_Bounded_Set (void)
 Constructor.

 ACE_Bounded_Set (size_t size)
 Constructor.

 ACE_Bounded_Set (const ACE_Bounded_Set<T> &)
 Copy constructor.

void operator= (const ACE_Bounded_Set<T> &)
 Assignment operator.

 ~ACE_Bounded_Set (void)
 Destructor.

int is_empty (void) const
 Returns 1 if the container is empty, otherwise returns 0.

int is_full (void) const
 Returns 1 if the container is full, otherwise returns 0.

int insert (const T &new_item)
int remove (const T &item)
int find (const T &item) const
 Finds if <item> occurs in the set. Returns 0 if finds, else -1.

size_t size (void) const
 Size of the set.

void dump (void) const
 Dump the state of an object.


Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.


Private Attributes

Search_Structuresearch_structure_
 Holds the contents of the set.

size_t cur_size_
 Current size of the set.

size_t max_size_
 Maximum size of the set.


Friends

class  ACE_Bounded_Set_Iterator< T >

Detailed Description

template<class T> template class ACE_Bounded_Set

Implement a simple unordered set of <T> with maximum set at creation time.

This implementation of an unordered set uses a Bounded array. This implementation does not allow duplicates...


Member Typedef Documentation

template<classT>
typedef ACE_Bounded_Set_Iterator<T> ACE_Bounded_Set<T>::ITERATOR
 


Member Enumeration Documentation

template<classT>
anonymous enum
 

Enumeration values:
DEFAULT_SIZE  


Constructor & Destructor Documentation

template<classT>
ACE_Bounded_Set<T>::ACE_Bounded_Set<T> ( void )
 

Constructor.

template<classT>
ACE_Bounded_Set<T>::ACE_Bounded_Set<T> ( size_t size )
 

Constructor.

template<classT>
ACE_Bounded_Set<T>::ACE_Bounded_Set<T> ( const ACE_Bounded_Set< T >& bs )
 

Copy constructor.

template<classT>
ACE_Bounded_Set<T>::~ACE_Bounded_Set<T> ( void )
 

Destructor.


Member Function Documentation

template<classT>
void ACE_Bounded_Set<T>::dump ( void ) const
 

Dump the state of an object.

template<classT>
int ACE_Bounded_Set<T>::find ( const T & item ) const
 

Finds if <item> occurs in the set. Returns 0 if finds, else -1.

template<classT>
int ACE_Bounded_Set<T>::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.

template<classT>
ACE_INLINE int ACE_Bounded_Set< T >::is_empty ( void ) const
 

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

template<classT>
ACE_INLINE int ACE_Bounded_Set< T >::is_full ( void ) const
 

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

template<classT>
void ACE_Bounded_Set<T>::operator= ( const ACE_Bounded_Set< T >& bs )
 

Assignment operator.

template<classT>
int ACE_Bounded_Set<T>::remove ( const T & item )
 

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.

template<classT>
size_t ACE_Bounded_Set<T>::size ( void ) const
 

Size of the set.


Friends And Related Function Documentation

template<classT>
class ACE_Bounded_Set_Iterator [friend]
 


Member Data Documentation

template<classT>
ACE_Bounded_Set<T>::ACE_ALLOC_HOOK_DECLARE
 

Declare the dynamic allocation hooks.

template<classT>
size_t ACE_Bounded_Set<T>::cur_size_ [private]
 

Current size of the set.

template<classT>
size_t ACE_Bounded_Set<T>::max_size_ [private]
 

Maximum size of the set.

template<classT>
Search_Structure * ACE_Bounded_Set<T>::search_structure_ [private]
 

Holds the contents of the set.


The documentation for this class was generated from the following files:
Generated at Fri Oct 5 07:01:26 2001 for ACE by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000