TAO_ESF_Proxy_RB_Tree< PROXY > Class Template Reference

Concrete Proxy collection based on ACE_RB_Tree. More...

#include <ESF_Proxy_RB_Tree.h>

List of all members.

Public Types

typedef ACE_RB_Tree< PROXY *,
int, ACE_Less_Than< PROXY * >,
ACE_Null_Mutex
Implementation
 A typedef for the underlying implementaiton class.

typedef TAO_ESF_Proxy_RB_Tree_Iterator<
PROXY > 
Iterator
 A typedef for the underlying iterator.


Public Member Functions

 TAO_ESF_Proxy_RB_Tree (void)
 Constructor.

TAO_ESF_Proxy_RB_Tree_Iterator<
PROXY > 
begin (void)
TAO_ESF_Proxy_RB_Tree_Iterator<
PROXY > 
end (void)
 Return one past the last element in the collection.

size_t size (void) const
 Return the number of elements in the collection.

void connected (PROXY *ACE_ENV_ARG_DECL_NOT_USED)
 Insert a new element to the collection.

void reconnected (PROXY *ACE_ENV_ARG_DECL_NOT_USED)
 Insert a new element that could be there already.

void disconnected (PROXY *ACE_ENV_ARG_DECL_NOT_USED)
 Remove an element from the collection.

void shutdown (ACE_ENV_SINGLE_ARG_DECL_NOT_USED)

Private Attributes

Implementation impl_
 The underlying implementation object.


Detailed Description

template<class PROXY>
class TAO_ESF_Proxy_RB_Tree< PROXY >

Concrete Proxy collection based on ACE_RB_Tree.

The Event Service Framework provides several alternatives for the underlying proxy collections. This version is based on Red-Black trees that offer good insertion, removal and lookup performance, but the iteration is slightly degraded.

Definition at line 58 of file ESF_Proxy_RB_Tree.h.


Member Typedef Documentation

template<class PROXY>
typedef ACE_RB_Tree<PROXY*,int,ACE_Less_Than<PROXY*>,ACE_Null_Mutex> TAO_ESF_Proxy_RB_Tree< PROXY >::Implementation
 

A typedef for the underlying implementaiton class.

Definition at line 62 of file ESF_Proxy_RB_Tree.h.

template<class PROXY>
typedef TAO_ESF_Proxy_RB_Tree_Iterator<PROXY> TAO_ESF_Proxy_RB_Tree< PROXY >::Iterator
 

A typedef for the underlying iterator.

Definition at line 65 of file ESF_Proxy_RB_Tree.h.

Referenced by TAO_ESF_Proxy_RB_Tree< PROXY >::begin(), and TAO_ESF_Proxy_RB_Tree< PROXY >::end().


Constructor & Destructor Documentation

template<class PROXY>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL TAO_ESF_Proxy_RB_Tree< PROXY >::TAO_ESF_Proxy_RB_Tree void   ) 
 

Constructor.

Definition at line 15 of file ESF_Proxy_RB_Tree.cpp.

00016 {
00017 }


Member Function Documentation

template<class PROXY>
ACE_INLINE TAO_ESF_Proxy_RB_Tree_Iterator< PROXY > TAO_ESF_Proxy_RB_Tree< PROXY >::begin void   ) 
 

Return the first element in the collection, or end() if there are none

Definition at line 52 of file ESF_Proxy_RB_Tree.i.

References TAO_ESF_Proxy_RB_Tree< PROXY >::Iterator.

00053 {
00054   return Iterator (this->impl_.begin ());
00055 }

template<class PROXY>
void TAO_ESF_Proxy_RB_Tree< PROXY >::connected PROXY *  ACE_ENV_ARG_DECL_NOT_USED  ) 
 

Insert a new element to the collection.

template<class PROXY>
void TAO_ESF_Proxy_RB_Tree< PROXY >::disconnected PROXY *  ACE_ENV_ARG_DECL_NOT_USED  ) 
 

Remove an element from the collection.

template<class PROXY>
ACE_INLINE TAO_ESF_Proxy_RB_Tree_Iterator< PROXY > TAO_ESF_Proxy_RB_Tree< PROXY >::end void   ) 
 

Return one past the last element in the collection.

Definition at line 58 of file ESF_Proxy_RB_Tree.i.

References TAO_ESF_Proxy_RB_Tree< PROXY >::Iterator.

00059 {
00060   return Iterator (this->impl_.end ());
00061 }

template<class PROXY>
void TAO_ESF_Proxy_RB_Tree< PROXY >::reconnected PROXY *  ACE_ENV_ARG_DECL_NOT_USED  ) 
 

Insert a new element that could be there already.

template<class PROXY>
void TAO_ESF_Proxy_RB_Tree< PROXY >::shutdown ACE_ENV_SINGLE_ARG_DECL_NOT_USED   ) 
 

Shutdown the collection, i.e. remove all elements and release resources

Definition at line 78 of file ESF_Proxy_RB_Tree.cpp.

00079 {
00080   Iterator end = this->impl_.end ();
00081   for (Iterator i = this->impl_.begin (); i != end; ++i)
00082     {
00083       // Decrement reference count
00084       (*i)->_decr_refcnt ();
00085     }
00086   this->impl_.clear ();
00087 }

template<class PROXY>
ACE_INLINE size_t TAO_ESF_Proxy_RB_Tree< PROXY >::size void   )  const
 

Return the number of elements in the collection.

Definition at line 64 of file ESF_Proxy_RB_Tree.i.

00065 {
00066   return this->impl_.current_size ();
00067 }


Member Data Documentation

template<class PROXY>
Implementation TAO_ESF_Proxy_RB_Tree< PROXY >::impl_ [private]
 

The underlying implementation object.

Definition at line 97 of file ESF_Proxy_RB_Tree.h.


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 13:09:00 2006 for TAO_ESF by doxygen 1.3.6