TAO_Notify_Container_T< TYPE > Class Template Reference

A template class that manages a collection. TYPE = type of collection. More...

#include <Container_T.h>

Collaboration diagram for TAO_Notify_Container_T< TYPE >:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TAO_Notify_Container_T (void)
 Constructor.
virtual ~TAO_Notify_Container_T ()
 Destructor.
void init (void)
 Init this object.
virtual void insert (TYPE *type)
 Insert object to this container.
virtual void remove (TYPE *type)
 Remove type from container_.
virtual void shutdown (void)
 Shutdown.
virtual void destroy (void)
 Call destroy on each contained object.
COLLECTIONcollection (void)
 Collection.

Protected Attributes

COLLECTIONcollection_
 The collection data structure that we add objects to.

Private Types

typedef TAO_ESF_Proxy_Collection<
TYPE > 
COLLECTION

Classes

class  Destroyer

Detailed Description

template<class TYPE>
class TAO_Notify_Container_T< TYPE >

A template class that manages a collection. TYPE = type of collection.

Definition at line 35 of file Container_T.h.


Member Typedef Documentation

template<class TYPE>
typedef TAO_ESF_Proxy_Collection<TYPE> TAO_Notify_Container_T< TYPE >::COLLECTION [private]

Definition at line 37 of file Container_T.h.


Constructor & Destructor Documentation

template<class TYPE>
TAO_Notify_Container_T< TYPE >::TAO_Notify_Container_T ( void   ) 

Constructor.

Definition at line 28 of file Container_T.cpp.

00029   : collection_ (0)
00030 {
00031 }

template<class TYPE>
TAO_Notify_Container_T< TYPE >::~TAO_Notify_Container_T (  )  [virtual]

Destructor.

Definition at line 34 of file Container_T.cpp.

References TAO_Notify_Container_T< TYPE >::collection_.

00035 {
00036   delete collection_;
00037 }


Member Function Documentation

template<class TYPE>
TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE TAO_Notify_Container_T< TYPE >::COLLECTION * TAO_Notify_Container_T< TYPE >::collection ( void   ) 

Collection.

Definition at line 8 of file Container_T.inl.

References TAO_Notify_Container_T< TYPE >::collection_.

Referenced by TAO_Notify_Seq_Worker_T< TYPE >::create(), TAO_Notify_Find_Worker_T< TYPE, INTERFACE, INTERFACE_PTR, EXCEPTION >::find(), TAO_Notify_EventChannelFactory::reconnect(), TAO_Notify_EventChannel::reconnect(), TAO_Notify_Admin::reconnect(), TAO_Notify_EventChannelFactory::save_persistent(), TAO_Notify_EventChannel::save_persistent(), and TAO_Notify_Admin::save_persistent().

00009 {
00010   return this->collection_;
00011 }

template<class TYPE>
void TAO_Notify_Container_T< TYPE >::destroy ( void   )  [virtual]

Call destroy on each contained object.

Definition at line 48 of file Container_T.cpp.

References TAO_Notify_Container_T< TYPE >::collection_, and TAO_ESF_Proxy_Collection< PROXY >::for_each().

Referenced by TAO_Notify_EventChannel::destroy().

00049 {
00050   Destroyer destroyer;
00051   this->collection_->for_each (&destroyer);
00052 }

template<class TYPE>
void TAO_Notify_Container_T< TYPE >::init ( void   ) 

Init this object.

Definition at line 67 of file Container_T.cpp.

References TAO_Notify_Factory::create(), TAO_Notify_Properties::factory(), and TAO_Notify_Properties::instance().

Referenced by TAO_Notify_EventChannelFactory::init(), TAO_Notify_EventChannel::init(), and TAO_Notify_Admin::init().

00068 {
00069   // get the factory
00070   TAO_Notify_Factory* factory = TAO_Notify_PROPERTIES::instance ()->factory ();
00071 
00072   // Init variables
00073   factory->create (this->collection_);
00074 }

template<class TYPE>
void TAO_Notify_Container_T< TYPE >::insert ( TYPE *  type  )  [virtual]

Insert object to this container.

Definition at line 55 of file Container_T.cpp.

References TAO_Notify_Container_T< TYPE >::collection_, and TAO_ESF_Proxy_Collection< PROXY >::connected().

Referenced by TAO_Notify_Admin::insert().

00056 {
00057   this->collection_->connected (type);
00058 }

template<class TYPE>
void TAO_Notify_Container_T< TYPE >::remove ( TYPE *  type  )  [virtual]

Remove type from container_.

Definition at line 61 of file Container_T.cpp.

References TAO_Notify_Container_T< TYPE >::collection_, and TAO_ESF_Proxy_Collection< PROXY >::disconnected().

Referenced by TAO_Notify_EventChannelFactory::remove(), TAO_Notify_EventChannel::remove(), and TAO_Notify_Admin::remove().

00062 {
00063   this->collection_->disconnected (type);
00064 }

template<class TYPE>
void TAO_Notify_Container_T< TYPE >::shutdown ( void   )  [virtual]

Shutdown.

Definition at line 40 of file Container_T.cpp.

References TAO_Notify_Container_T< TYPE >::collection_, and TAO_ESF_Proxy_Collection< PROXY >::for_each().

Referenced by TAO_Notify_EventChannelFactory::shutdown(), TAO_Notify_EventChannel::shutdown(), and TAO_Notify_Admin::shutdown().

00041 {
00042   TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
00043 
00044   this->collection_->for_each (&shutdown_worker);
00045 }


Member Data Documentation

template<class TYPE>
COLLECTION* TAO_Notify_Container_T< TYPE >::collection_ [protected]

The collection data structure that we add objects to.

Definition at line 66 of file Container_T.h.

Referenced by TAO_Notify_Container_T< TYPE >::collection(), TAO_Notify_Container_T< TYPE >::destroy(), TAO_Notify_Container_T< TYPE >::insert(), TAO_Notify_Container_T< TYPE >::remove(), TAO_Notify_Container_T< TYPE >::shutdown(), and TAO_Notify_Container_T< TYPE >::~TAO_Notify_Container_T().


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:46:17 2010 for TAO_CosNotification by  doxygen 1.4.7