Container_T.cpp

Go to the documentation of this file.
00001 // Container_T.cpp,v 1.13 2006/03/14 06:14:34 jtc Exp
00002 
00003 #ifndef TAO_Notify_CONTAINER_T_CPP
00004 #define TAO_Notify_CONTAINER_T_CPP
00005 
00006 #include "orbsvcs/Notify/Container_T.h"
00007 
00008 #include "orbsvcs/Notify/Properties.h"
00009 #include "orbsvcs/Notify/Factory.h"
00010 #include "orbsvcs/Notify/POA_Helper.h"
00011 
00012 #include "orbsvcs/ESF/ESF_Proxy_Collection.h"
00013 #include "orbsvcs/ESF/ESF_Shutdown_Proxy.h"
00014 
00015 #if ! defined (__ACE_INLINE__)
00016 #include "orbsvcs/Notify/Container_T.inl"
00017 #endif /* __ACE_INLINE__ */
00018 
00019 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00020 
00021 template<class TYPE>
00022 TAO_Notify_Container_T<TYPE>::TAO_Notify_Container_T (void)
00023   : collection_ (0)
00024 {
00025 }
00026 
00027 template<class TYPE>
00028 TAO_Notify_Container_T<TYPE>::~TAO_Notify_Container_T ()
00029 {
00030   delete collection_;
00031 }
00032 
00033 template <class TYPE> void
00034 TAO_Notify_Container_T<TYPE>::shutdown (ACE_ENV_SINGLE_ARG_DECL)
00035 {
00036   TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
00037 
00038   this->collection_->for_each (&shutdown_worker ACE_ENV_ARG_PARAMETER);
00039 }
00040 
00041 template<class TYPE> void
00042 TAO_Notify_Container_T<TYPE>::insert (TYPE* type ACE_ENV_ARG_DECL)
00043 {
00044   this->collection_->connected (type ACE_ENV_ARG_PARAMETER);
00045 }
00046 
00047 template<class TYPE> void
00048 TAO_Notify_Container_T<TYPE>::remove (TYPE* type ACE_ENV_ARG_DECL)
00049 {
00050   this->collection_->disconnected (type ACE_ENV_ARG_PARAMETER);
00051 }
00052 
00053 template<class TYPE> void
00054 TAO_Notify_Container_T<TYPE>::init (ACE_ENV_SINGLE_ARG_DECL)
00055 {
00056   // get the factory
00057   TAO_Notify_Factory* factory = TAO_Notify_PROPERTIES::instance ()->factory ();
00058 
00059   // Init variables
00060   factory->create (this->collection_ ACE_ENV_ARG_PARAMETER);
00061 }
00062 
00063 TAO_END_VERSIONED_NAMESPACE_DECL
00064 
00065 #endif /* TAO_Notify_CONTAINER_T_CPP */

Generated on Thu Nov 9 13:24:09 2006 for TAO_CosNotification by doxygen 1.3.6