#include <Object_T.h>
Public Types | |
typedef T * | T_ptr |
Static Public Member Functions | |
static T_ptr | narrow (CORBA::Object_ptr, const char *repo_id, Proxy_Broker_Factory) |
static T_ptr | unchecked_narrow (CORBA::Object_ptr, Proxy_Broker_Factory) |
static T_ptr | unchecked_narrow (CORBA::Object_ptr, const char *repo_id, Proxy_Broker_Factory) |
Static Private Member Functions | |
static T_ptr | lazy_evaluation (CORBA::Object_ptr) |
Definition at line 44 of file Object_T.h.
typedef T* TAO::Narrow_Utils< T >::T_ptr |
Definition at line 47 of file Object_T.h.
T * TAO::Narrow_Utils< T >::lazy_evaluation | ( | CORBA::Object_ptr | ) | [static, private] |
Definition at line 100 of file Object_T.cpp.
References ACE_NEW_RETURN, CORBA::Object::is_evaluated(), CORBA::Object::orb_core(), and CORBA::Object::steal_ior().
00101 { 00102 T_ptr default_proxy = T::_nil (); 00103 00104 // Code for lazily evaluated IORs. 00105 if (!obj->is_evaluated ()) 00106 { 00107 ACE_NEW_RETURN (default_proxy, 00108 T (obj->steal_ior (), 00109 obj->orb_core ()), 00110 T::_nil ()); 00111 } 00112 00113 return default_proxy; 00114 }
T * TAO::Narrow_Utils< T >::narrow | ( | CORBA::Object_ptr | , | |
const char * | repo_id, | |||
Proxy_Broker_Factory | ||||
) | [static] |
Definition at line 17 of file Object_T.cpp.
References CORBA::is_nil().
00020 { 00021 if (CORBA::is_nil (obj)) 00022 { 00023 return T::_nil (); 00024 } 00025 00026 if (obj->_is_a (repo_id) == false) 00027 { 00028 return T::_nil (); 00029 } 00030 00031 return TAO::Narrow_Utils<T>::unchecked_narrow (obj, repo_id, pbf); 00032 }
T * TAO::Narrow_Utils< T >::unchecked_narrow | ( | CORBA::Object_ptr | , | |
const char * | repo_id, | |||
Proxy_Broker_Factory | ||||
) | [static] |
Definition at line 53 of file Object_T.cpp.
References TAO_Stub::_incr_refcnt(), ACE_NEW_THROW_EX, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), TAO_Stub::optimize_collocation_objects(), and TAO_Stub::servant_orb_var().
00056 { 00057 if (CORBA::is_nil (obj)) 00058 { 00059 return T::_nil (); 00060 } 00061 00062 if (obj->_is_local ()) 00063 { 00064 return T::_duplicate (dynamic_cast<T *> (obj)); 00065 } 00066 00067 T_ptr proxy = Narrow_Utils<T>::lazy_evaluation (obj); 00068 00069 if (!CORBA::is_nil (proxy)) 00070 { 00071 return proxy; 00072 } 00073 00074 TAO_Stub* stub = obj->_stubobj (); 00075 00076 if (stub == 0) 00077 { 00078 // If we're here, we have been passed a bogus objref. 00079 throw ::CORBA::BAD_PARAM (); 00080 } 00081 00082 stub->_incr_refcnt (); 00083 00084 bool const collocated = 00085 !CORBA::is_nil (stub->servant_orb_var ().in ()) 00086 && stub->optimize_collocation_objects () 00087 && obj->_is_collocated () 00088 && pbf != 0; 00089 00090 ACE_NEW_THROW_EX (proxy, 00091 T (stub, 00092 collocated, 00093 obj->_servant ()), 00094 CORBA::NO_MEMORY ()); 00095 return proxy; 00096 }
T * TAO::Narrow_Utils< T >::unchecked_narrow | ( | CORBA::Object_ptr | , | |
Proxy_Broker_Factory | ||||
) | [static] |
Definition at line 35 of file Object_T.cpp.
00037 { 00038 T *proxy = 0; 00039 try 00040 { 00041 proxy = TAO::Narrow_Utils<T>::unchecked_narrow (obj, 0, pbf); 00042 } 00043 catch (const ::CORBA::Exception&) 00044 { 00045 // Swallow the exception 00046 return T::_nil (); 00047 } 00048 00049 return proxy; 00050 }