#include <Object_T.h>
Public Types | |
| typedef T * | T_ptr |
Static Public Member Functions | |
| T_ptr | narrow (CORBA::Object_ptr, const char *repo_id, Proxy_Broker_Factory) |
| T_ptr | unchecked_narrow (CORBA::Object_ptr, Proxy_Broker_Factory) |
| T_ptr | unchecked_narrow (CORBA::Object_ptr, const char *repo_id, Proxy_Broker_Factory) |
Static Private Member Functions | |
| T_ptr | lazy_evaluation (CORBA::Object_ptr) |
|
|||||
|
Definition at line 47 of file Object_T.h. Referenced by TAO::Narrow_Utils< T >::lazy_evaluation(), and TAO::Narrow_Utils< T >::unchecked_narrow(). |
|
||||||||||
|
Definition at line 100 of file Object_T.cpp. References ACE_NEW_RETURN, CORBA::Object::is_evaluated(), CORBA::Object_ptr, CORBA::Object::orb_core(), CORBA::Object::steal_ior(), and TAO::Narrow_Utils< T >::T_ptr.
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 }
|
|
||||||||||||||||||||
|
Definition at line 17 of file Object_T.cpp. References CORBA::Object::_is_a(), CORBA::is_nil(), CORBA::Object_ptr, TAO::Proxy_Broker_Factory, and TAO::Narrow_Utils< T >::unchecked_narrow(). Referenced by CORBA::Policy::_narrow().
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 }
|
|
||||||||||||||||||||
|
Definition at line 53 of file Object_T.cpp. References TAO_Stub::_incr_refcnt(), CORBA::Object::_is_collocated(), CORBA::Object::_is_local(), CORBA::Object::_servant(), CORBA::Object::_stubobj(), ACE_NEW_THROW_EX, TAO_Pseudo_Var_T< T >::in(), CORBA::is_nil(), CORBA::Object_ptr, TAO_Stub::optimize_collocation_objects(), TAO::Proxy_Broker_Factory, TAO_Stub::servant_orb_var(), and TAO::Narrow_Utils< T >::T_ptr.
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 }
|
|
||||||||||||||||
|
Definition at line 35 of file Object_T.cpp. References CORBA::Object_ptr, and TAO::Proxy_Broker_Factory. Referenced by CORBA::Policy::_unchecked_narrow(), TAO::Narrow_Utils< T >::narrow(), and operator>>().
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 }
|
1.3.6