Go to the documentation of this file.00001
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
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)
00022 {
00023 this->id_ = id;
00024
00025 container.collection ()->for_each (this);
00026
00027 return this->result_;
00028 }
00029
00030 template<class TYPE, class INTERFACE, class INTERFACE_PTR, class EXCEPTION> INTERFACE_PTR
00031 TAO_Notify_Find_Worker_T<TYPE,INTERFACE,INTERFACE_PTR,EXCEPTION>::resolve (const TAO_Notify_Object::ID id, CONTAINER& container)
00032 {
00033 this->find (id, container);
00034
00035 if (this->result_ == 0)
00036 throw EXCEPTION ();
00037
00038 CORBA::Object_var object = this->result_->ref ();
00039
00040 return INTERFACE::_narrow (object.in ());
00041 }
00042
00043 TAO_END_VERSIONED_NAMESPACE_DECL
00044
00045 #endif