Find_Worker_T.cpp

Go to the documentation of this file.
00001 // Find_Worker_T.cpp,v 1.8 2006/03/14 06:14:34 jtc Exp
00002 
00003 #ifndef TAO_Notify_FIND_WORKER_T_CPP
00004 #define TAO_Notify_FIND_WORKER_T_CPP
00005 
00006 #include "orbsvcs/Notify/Find_Worker_T.h"
00007 
00008 #if ! defined (__ACE_INLINE__)
00009 #include "orbsvcs/Notify/Find_Worker_T.inl"
00010 #endif /* __ACE_INLINE__ */
00011 
00012 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00013 
00014 template<class TYPE, class INTERFACE, class INTERFACE_PTR, class EXCEPTION>
00015 TAO_Notify_Find_Worker_T<TYPE,INTERFACE,INTERFACE_PTR,EXCEPTION>::TAO_Notify_Find_Worker_T (void)
00016   :id_ (0), result_ (0)
00017 {
00018 }
00019 
00020 template<class TYPE, class INTERFACE, class INTERFACE_PTR, class EXCEPTION> TYPE*
00021 TAO_Notify_Find_Worker_T<TYPE,INTERFACE,INTERFACE_PTR,EXCEPTION>::find (const TAO_Notify_Object::ID id, CONTAINER& container ACE_ENV_ARG_DECL)
00022 {
00023   this->id_ = id;
00024 
00025   container.collection ()->for_each (this ACE_ENV_ARG_PARAMETER);
00026   ACE_CHECK_RETURN (0);
00027 
00028   return this->result_;
00029 }
00030 
00031 template<class TYPE, class INTERFACE, class INTERFACE_PTR, class EXCEPTION> INTERFACE_PTR
00032 TAO_Notify_Find_Worker_T<TYPE,INTERFACE,INTERFACE_PTR,EXCEPTION>::resolve (const TAO_Notify_Object::ID id, CONTAINER& container ACE_ENV_ARG_DECL)
00033 {
00034   this->find (id, container ACE_ENV_ARG_PARAMETER);
00035   ACE_CHECK_RETURN (INTERFACE::_nil ());
00036 
00037   if (this->result_ == 0)
00038     ACE_THROW_RETURN (EXCEPTION ()
00039                       , INTERFACE::_nil ());
00040 
00041   CORBA::Object_var object = this->result_->ref (ACE_ENV_SINGLE_ARG_PARAMETER);
00042   ACE_CHECK_RETURN (INTERFACE::_nil ());
00043 
00044   return INTERFACE::_narrow (object.in () ACE_ENV_ARG_PARAMETER);
00045 }
00046 
00047 TAO_END_VERSIONED_NAMESPACE_DECL
00048 
00049 #endif /* TAO_Notify_FIND_WORKER_T_CPP */

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