Container_T.cpp

Go to the documentation of this file.
00001 // $Id: Container_T.cpp 79084 2007-07-30 13:13:45Z elliott_c $
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> void
00022 TAO_Notify_Container_T<TYPE>::Destroyer::work (TYPE* type)
00023 {
00024   type->destroy ();
00025 }
00026 
00027 template<class TYPE>
00028 TAO_Notify_Container_T<TYPE>::TAO_Notify_Container_T (void)
00029   : collection_ (0)
00030 {
00031 }
00032 
00033 template<class TYPE>
00034 TAO_Notify_Container_T<TYPE>::~TAO_Notify_Container_T ()
00035 {
00036   delete collection_;
00037 }
00038 
00039 template <class TYPE> void
00040 TAO_Notify_Container_T<TYPE>::shutdown (void)
00041 {
00042   TAO_ESF_Shutdown_Proxy<TYPE> shutdown_worker;
00043 
00044   this->collection_->for_each (&shutdown_worker);
00045 }
00046 
00047 template <class TYPE> void
00048 TAO_Notify_Container_T<TYPE>::destroy (void)
00049 {
00050   Destroyer destroyer;
00051   this->collection_->for_each (&destroyer);
00052 }
00053 
00054 template<class TYPE> void
00055 TAO_Notify_Container_T<TYPE>::insert (TYPE* type)
00056 {
00057   this->collection_->connected (type);
00058 }
00059 
00060 template<class TYPE> void
00061 TAO_Notify_Container_T<TYPE>::remove (TYPE* type)
00062 {
00063   this->collection_->disconnected (type);
00064 }
00065 
00066 template<class TYPE> void
00067 TAO_Notify_Container_T<TYPE>::init (void)
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 }
00075 
00076 TAO_END_VERSIONED_NAMESPACE_DECL
00077 
00078 #endif /* TAO_Notify_CONTAINER_T_CPP */

Generated on Tue Feb 2 17:45:29 2010 for TAO_CosNotification by  doxygen 1.4.7