CORBA::Object Class Reference

Implementation of a CORBA object reference. More...

#include <Object.h>

Inheritance diagram for CORBA::Object:

Inheritance graph
[legend]
Collaboration diagram for CORBA::Object:

Collaboration graph
[legend]
List of all members.

Spec defined methods

virtual CORBA::Boolean _is_a (const char *logical_type_id)
 Determine if we are of the type specified by the "logical_type_id".

virtual const char * _interface_repository_id (void) const
virtual CORBA::ULong _hash (CORBA::ULong maximum)
virtual CORBA::Boolean _is_equivalent (CORBA::Object_ptr other_obj) throw ()
virtual CORBA::Boolean _non_existent ()
 Determine if we are of the type specified by the "logical_type_id".

virtual CORBA::ImplementationDef_ptr _get_implementation ()
virtual InterfaceDef_ptr _get_interface ()
 Get info about the object from the Interface Repository.

virtual CORBA::Object_ptr _get_component ()
 Get info about the object from the Interface Repository.

virtual char * _repository_id ()
 Get the repository id.

virtual void _create_request (CORBA::Context_ptr ctx, const char *operation, CORBA::NVList_ptr arg_list, CORBA::NamedValue_ptr result, CORBA::Request_ptr &request, CORBA::Flags req_flags)
 Determine if we are of the type specified by the "logical_type_id".

virtual void _create_request (CORBA::Context_ptr ctx, const char *operation, CORBA::NVList_ptr arg_list, CORBA::NamedValue_ptr result, CORBA::ExceptionList_ptr exclist, CORBA::ContextList_ptr ctxtlist, CORBA::Request_ptr &request, CORBA::Flags req_flags)
 Determine if we are of the type specified by the "logical_type_id".

virtual CORBA::Request_ptr _request (const char *operation)
 DII operation to create a request.

CORBA::Policy_ptr _get_policy (CORBA::PolicyType type)
 Determine if we are of the type specified by the "logical_type_id".

CORBA::Policy_ptr _get_cached_policy (TAO_Cached_Policy_Type type)
 Determine if we are of the type specified by the "logical_type_id".

CORBA::Object_ptr _set_policy_overrides (const CORBA::PolicyList &policies, CORBA::SetOverrideType set_add)
 Determine if we are of the type specified by the "logical_type_id".

CORBA::PolicyList_get_policy_overrides (const CORBA::PolicyTypeSeq &types)
 Determine if we are of the type specified by the "logical_type_id".

CORBA::Boolean _validate_connection (CORBA::PolicyList_out inconsistent_policies)
 Determine if we are of the type specified by the "logical_type_id".

virtual CORBA::ORB_ptr _get_orb ()
 Determine if we are of the type specified by the "logical_type_id".

CORBA::Object_ptr _duplicate (CORBA::Object_ptr obj)
 Increment the ref count.

CORBA::Object_ptr _nil (void)
 Return a NULL object.

CORBA::Object_ptr _narrow (CORBA::Object_ptr obj)
 No-op it is just here to simplify some templates.


Methods that are TAO specific.

These methods are defined here as helper functions to be used by other parts of TAO. Theoretically they shold all start with tao_. But we have deviated from that principle.

virtual TAO_Abstract_ServantBase_servant (void) const
virtual CORBA::Boolean _is_collocated (void) const
virtual CORBA::Boolean _is_local (void) const
 Is this a local object?

virtual TAO::ObjectKey_key ()
 Object (TAO_Stub *p, CORBA::Boolean collocated=0, TAO_Abstract_ServantBase *servant=0, TAO_ORB_Core *orb_core=0)
 Constructor.

 Object (IOP::IOR *ior, TAO_ORB_Core *orb_core=0)
virtual TAO_Stub_stubobj (void) const
 Get the underlying stub object.

virtual TAO_Stub_stubobj (void)
virtual void _proxy_broker (TAO::Object_Proxy_Broker *proxy_broker)
 Set the proxy broker.

virtual CORBA::Boolean marshal (TAO_OutputCDR &cdr)
 Allows us to forbid marshaling of local interfaces.

CORBA::Boolean is_evaluated (void) const
 Accessor to the flag..

void set_collocated_servant (TAO_Abstract_ServantBase *)
 Mutator for setting the servant in collocated cases.

TAO_ORB_Coreorb_core (void) const
 Accessor for the ORB_Core..

IOP::IORsteal_ior (void)
 Accessors for the underlying IOP::IOR's.

const IOP::IORior (void) const
CORBA::Boolean marshal (const Object_ptr x, TAO_OutputCDR &cdr)
void _tao_any_destructor (void *)
 Used in the implementation of CORBA::Any.

CORBA::Boolean is_nil_i (CORBA::Object_ptr obj)
 Uninlined part of the now-inlined CORBA::is_nil().

void tao_object_initialize (Object *)
 Helper function for reading contents of an IOR.


Public Types

typedef Object_ptr _ptr_type
typedef Object_var _var_type
typedef Object_out _out_type

Public Member Functions

virtual ~Object (void)
 Destructor.

Reference Count Managment
These are the standard CORBA object reference count manipulations methods.

virtual void _add_ref (void)
 Increment the reference count.

virtual void _remove_ref (void)
 Decrement the reference count.


Protected Member Functions

 Object (int dummy=0)
 Initializing a local object.

TAO::Object_Proxy_Brokerproxy_broker () const

Private Member Functions

 Object (const Object &)
Objectoperator= (const Object &)

Private Attributes

CORBA::Boolean is_local_
 Specify whether this is a local object or not.

CORBA::Boolean is_evaluated_
 Flag to indicate whether the IOP::IOR has been evaluated fully.

IOP::IOR_var ior_
TAO_ORB_Coreorb_core_
 Cached pointer of our ORB_Core.

TAO_Stubprotocol_proxy_
CORBA::ULong refcount_
 Number of outstanding references to this object.

ACE_Lockrefcount_lock_
 Protect reference count manipulation from race conditions.


Detailed Description

Implementation of a CORBA object reference.

All CORBA objects, both unconstrained and locality-constrained, inherit from this class. The interface is defined in the CORBA specification and the C++ mapping.

Definition at line 100 of file Object.h.


Member Typedef Documentation

typedef Object_out CORBA::Object::_out_type
 

Reimplemented in CORBA::LocalObject, and CORBA::Policy.

Definition at line 267 of file Object.h.

typedef Object_ptr CORBA::Object::_ptr_type
 

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::LocalObject, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 265 of file Object.h.

typedef Object_var CORBA::Object::_var_type
 

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::LocalObject, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 266 of file Object.h.


Constructor & Destructor Documentation

TAO_BEGIN_VERSIONED_NAMESPACE_DECL CORBA::Object::~Object void   )  [virtual]
 

Destructor.

Definition at line 37 of file Object.cpp.

References TAO_Stub::_decr_refcnt(), protocol_proxy_, and refcount_lock_.

00038 {
00039   if (this->protocol_proxy_)
00040     (void) this->protocol_proxy_->_decr_refcnt ();
00041 
00042   delete this->refcount_lock_;
00043 }

CORBA::Object::Object TAO_Stub p,
CORBA::Boolean  collocated = 0,
TAO_Abstract_ServantBase servant = 0,
TAO_ORB_Core orb_core = 0
 

Constructor.

This constructor should not be called when the protocol proxy is null ie. when the object is a LocalObject. Assert that requirement.

Definition at line 45 of file Object.cpp.

References ACE_ASSERT, TAO_Stub::collocated_servant(), TAO_Resource_Factory::create_corba_object_lock(), TAO_Stub::is_collocated(), TAO_Stub::orb_core(), protocol_proxy_, refcount_lock_, and TAO_ORB_Core::resource_factory().

00049   : is_local_ (false)
00050     , is_evaluated_ (true)
00051     , ior_ (0)
00052     , orb_core_ (orb_core)
00053     , protocol_proxy_ (protocol_proxy)
00054     , refcount_ (1)
00055     , refcount_lock_ (0)
00056 {
00057   /// This constructor should not be called when the protocol proxy is
00058   /// null ie. when the object is a LocalObject. Assert that
00059   /// requirement.
00060   ACE_ASSERT (this->protocol_proxy_ != 0);
00061 
00062   if (this->orb_core_ == 0)
00063     this->orb_core_ = this->protocol_proxy_->orb_core ();
00064 
00065   this->refcount_lock_ =
00066     this->orb_core_->resource_factory ()->create_corba_object_lock ();
00067 
00068   // Set the collocation marker on the stub. This may not be news to it.
00069   // This may also change the stub's object proxy broker.
00070   this->protocol_proxy_->is_collocated (collocated);
00071 
00072   // Set the collocated servant pointer (null if not collocated) on the stub.
00073   this->protocol_proxy_->collocated_servant (servant);
00074 }

CORBA::Object::Object IOP::IOR ior,
TAO_ORB_Core orb_core = 0
 

Accessor for the cached servant reference held on the stub if this object is collocated

Definition at line 76 of file Object.cpp.

References TAO_Resource_Factory::create_corba_object_lock(), refcount_lock_, and TAO_ORB_Core::resource_factory().

00078   : is_local_ (false)
00079     , is_evaluated_ (false)
00080     , ior_ (ior)
00081     , orb_core_ (orb_core)
00082     , protocol_proxy_ (0)
00083     , refcount_ (1)
00084     , refcount_lock_ (0)
00085 {
00086   this->refcount_lock_ =
00087     this->orb_core_->resource_factory ()->create_corba_object_lock ();
00088 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE CORBA::Object::Object int  dummy = 0  )  [protected]
 

Initializing a local object.

Definition at line 10 of file Object.i.

00011   : is_local_ (true),
00012     is_evaluated_ (true),
00013     ior_ (),
00014     orb_core_ (0),
00015     protocol_proxy_ (0),
00016     refcount_ (1),
00017     refcount_lock_ (0)
00018 {
00019 }

CORBA::Object::Object const Object  )  [private]
 


Member Function Documentation

void CORBA::Object::_add_ref void   )  [virtual]
 

Increment the reference count.

Reimplemented in CORBA::LocalObject, and TAO_Local_RefCounted_Object.

Definition at line 108 of file Object.cpp.

References ACE_ASSERT, ACE_GUARD, and is_local_.

Referenced by TAO::BufferingConstraintPolicy::_duplicate(), CORBA::PolicyCurrent::_duplicate(), CORBA::PolicyManager::_duplicate(), CORBA::Policy::_duplicate(), _duplicate(), CORBA::ConstructionPolicy::_duplicate(), CORBA::DomainManager::_duplicate(), and CORBA::Current::_duplicate().

00109 {
00110   if (this->is_local_)
00111     return;
00112 
00113   ACE_ASSERT (this->refcount_lock_ != 0);
00114 
00115   ACE_GUARD (ACE_Lock ,
00116              mon,
00117              *this->refcount_lock_);
00118 
00119   this->refcount_++;
00120 }

void CORBA::Object::_create_request CORBA::Context_ptr  ctx,
const char *  operation,
CORBA::NVList_ptr  arg_list,
CORBA::NamedValue_ptr  result,
CORBA::ExceptionList_ptr  exclist,
CORBA::ContextList_ptr  ctxtlist,
CORBA::Request_ptr request,
CORBA::Flags  req_flags
[virtual]
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 406 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW, CORBA::Context_ptr, CORBA::ContextList_ptr, TAO_Dynamic_Adapter::create_request(), CORBA::ExceptionList_ptr, CORBA::Flags, ACE_Dynamic_Service< TYPE >::instance(), CORBA::NamedValue_ptr, CORBA::NVList_ptr, protocol_proxy_, CORBA::Request_ptr, and TAO_OBJECT_IOR_EVALUATE.

00415 {
00416   TAO_OBJECT_IOR_EVALUATE;
00417 
00418   // Since we don't really support Context, anything but a null pointer
00419   // is a no-no.
00420   // Neither can we create a request object from locality constrained
00421   // object references.
00422   if (ctx != 0 || this->protocol_proxy_ == 0)
00423     {
00424       ACE_THROW (CORBA::NO_IMPLEMENT ());
00425     }
00426 
00427   TAO_Dynamic_Adapter *dynamic_adapter =
00428     ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00429         TAO_ORB_Core::dynamic_adapter_name ()
00430       );
00431 
00432   dynamic_adapter->create_request (
00433                        this,
00434                        this->protocol_proxy_->orb_core ()-> orb (),
00435                        operation,
00436                        arg_list,
00437                        result,
00438                        exceptions,
00439                        request,
00440                        req_flags
00441                        ACE_ENV_ARG_PARAMETER
00442                      );
00443 }

void CORBA::Object::_create_request CORBA::Context_ptr  ctx,
const char *  operation,
CORBA::NVList_ptr  arg_list,
CORBA::NamedValue_ptr  result,
CORBA::Request_ptr request,
CORBA::Flags  req_flags
[virtual]
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 366 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW, CORBA::Context_ptr, TAO_Dynamic_Adapter::create_request(), CORBA::Flags, ACE_Dynamic_Service< TYPE >::instance(), CORBA::NamedValue_ptr, CORBA::NVList_ptr, protocol_proxy_, CORBA::Request_ptr, and TAO_OBJECT_IOR_EVALUATE.

00373 {
00374   TAO_OBJECT_IOR_EVALUATE;
00375 
00376   // Since we don't really support Context, anything but a null pointer
00377   // is a no-no.
00378   // Neither can we create a request object from locality constrained
00379   // object references.
00380   if (ctx != 0 || this->protocol_proxy_ == 0)
00381     {
00382       ACE_THROW (CORBA::NO_IMPLEMENT ());
00383     }
00384 
00385   TAO_Dynamic_Adapter *dynamic_adapter =
00386     ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00387         TAO_ORB_Core::dynamic_adapter_name ()
00388       );
00389 
00390   dynamic_adapter->create_request (
00391                        this,
00392                        this->protocol_proxy_->orb_core ()-> orb (),
00393                        operation,
00394                        arg_list,
00395                        result,
00396                        0,
00397                        request,
00398                        req_flags
00399                        ACE_ENV_ARG_PARAMETER
00400                      );
00401 }

ACE_INLINE CORBA::Object_ptr CORBA::Object::_duplicate CORBA::Object_ptr  obj  )  [static]
 

Increment the ref count.

Definition at line 22 of file Object.i.

References _add_ref(), and CORBA::Object_ptr.

Referenced by _narrow(), TAO_Object_Ref_Table::find(), TAO_ServerRequest::forward_location(), TAO::Invocation_Base::forwarded_reference(), TAO_ORB_Core::implrepo_service(), TAO::Invocation_Adapter::invoke_i(), TAO::Objref_Traits< CORBA::Object >::duplicate(), TAO_ORB_Core::resolve_codecfactory(), TAO_ORB_Core::resolve_dynanyfactory(), TAO_ORB_Core::resolve_ior_manipulation(), TAO_ORB_Core::resolve_ior_table(), TAO_ORB_Core::resolve_picurrent(), TAO_ORB_Core::resolve_poa_current(), CORBA::ORB::resolve_policy_current(), CORBA::ORB::resolve_policy_manager(), TAO_ORB_Core::resolve_rt_orb(), TAO_ORB_Core::resolve_typecodefactory(), and TAO_ORB_Core::root_poa().

00023 {
00024   if (obj)
00025     {
00026       obj->_add_ref ();
00027     }
00028 
00029   return obj;
00030 }

CORBA::Policy_ptr CORBA::Object::_get_cached_policy TAO_Cached_Policy_Type  type  ) 
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 559 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_cached_policy(), protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00562 {
00563   TAO_OBJECT_IOR_EVALUATE_RETURN;
00564 
00565   if (this->protocol_proxy_)
00566     return this->protocol_proxy_->get_cached_policy (type
00567                                                      ACE_ENV_ARG_PARAMETER);
00568   else
00569     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00570 }

CORBA::Object_ptr CORBA::Object::_get_component  )  [virtual]
 

Get info about the object from the Interface Repository.

Reimplemented in CORBA::LocalObject.

Definition at line 519 of file Object.cpp.

References TAO::Object_Proxy_Broker::_get_component(), ACE_ENV_ARG_PARAMETER, proxy_broker(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

00520 {
00521   TAO_OBJECT_IOR_EVALUATE_RETURN;
00522   return this->proxy_broker ()->_get_component (this
00523                                               ACE_ENV_ARG_PARAMETER);
00524 }

CORBA::ImplementationDef_ptr CORBA::Object::_get_implementation  )  [virtual]
 

This method is deprecated in the CORBA 2.2 spec, we just return 0 every time.

Reimplemented in CORBA::LocalObject.

Definition at line 513 of file Object.cpp.

00514 {
00515   return 0;
00516 }

CORBA::InterfaceDef_ptr CORBA::Object::_get_interface  )  [virtual]
 

Get info about the object from the Interface Repository.

Reimplemented in CORBA::LocalObject.

Definition at line 505 of file Object.cpp.

References TAO::Object_Proxy_Broker::_get_interface(), ACE_ENV_ARG_PARAMETER, proxy_broker(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

00506 {
00507   TAO_OBJECT_IOR_EVALUATE_RETURN;
00508   return this->proxy_broker ()->_get_interface (this
00509                                               ACE_ENV_ARG_PARAMETER);
00510 }

CORBA::ORB_ptr CORBA::Object::_get_orb  )  [virtual]
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 672 of file Object.cpp.

References CORBA::ORB::_duplicate(), ACE_THROW_RETURN, protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00673 {
00674   if (this->orb_core_ != 0)
00675     {
00676       return CORBA::ORB::_duplicate (this->orb_core_->orb ());
00677     }
00678   else
00679     {
00680       TAO_OBJECT_IOR_EVALUATE_RETURN;
00681       if (this->protocol_proxy_)
00682         return CORBA::ORB::_duplicate (this->protocol_proxy_->orb_core ()->orb ());
00683       else
00684         ACE_THROW_RETURN (CORBA::INTERNAL (), CORBA::ORB::_nil());
00685     }
00686 }

CORBA::Policy_ptr CORBA::Object::_get_policy CORBA::PolicyType  type  ) 
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 545 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_policy(), CORBA::PolicyType, protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00548 {
00549   TAO_OBJECT_IOR_EVALUATE_RETURN;
00550 
00551   if (this->protocol_proxy_)
00552     return this->protocol_proxy_->get_policy (type
00553                                               ACE_ENV_ARG_PARAMETER);
00554   else
00555     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00556 }

CORBA::PolicyList * CORBA::Object::_get_policy_overrides const CORBA::PolicyTypeSeq types  ) 
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 609 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_policy_overrides(), protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00611 {
00612   TAO_OBJECT_IOR_EVALUATE_RETURN;
00613   if (this->protocol_proxy_)
00614     return this->protocol_proxy_->get_policy_overrides (types
00615                                                         ACE_ENV_ARG_PARAMETER);
00616   else
00617     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00618 }

CORBA::ULong CORBA::Object::_hash CORBA::ULong  maximum  )  [virtual]
 

Return a (potentially non-unique) hash value for this object. This method relies on the representation of the object reference's private state. Since that changes easily (when different ORB protocols are in use) there is no default implementation.

Reimplemented in CORBA::LocalObject.

Definition at line 271 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, TAO_Stub::hash(), protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00273 {
00274   TAO_OBJECT_IOR_EVALUATE_RETURN;
00275 
00276   if (this->protocol_proxy_ != 0)
00277     return this->protocol_proxy_->hash (maximum ACE_ENV_ARG_PARAMETER);
00278   else
00279     {
00280       // Locality-constrained object.
00281 
00282       // Note that we reinterpret_cast to an "unsigned long" instead
00283       // of CORBA::ULong since we need to first cast to an integer
00284       // large enough to hold an address to avoid compile-time
00285       // warnings on some 64-bit platforms.
00286       const CORBA::ULong hash =
00287         static_cast<CORBA::ULong> (reinterpret_cast<ptrdiff_t> (this));
00288 
00289       return hash % maximum;
00290     }
00291 }

const char * CORBA::Object::_interface_repository_id void   )  const [virtual]
 

The repository ID for the most derived class, this is an implementation method and does no remote invocations!

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 228 of file Object.cpp.

00229 {
00230   return "IDL:omg.org/CORBA/Object:1.0";
00231 }

CORBA::Boolean CORBA::Object::_is_a const char *  logical_type_id  )  [virtual]
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 193 of file Object.cpp.

References TAO::Object_Proxy_Broker::_is_a(), _stubobj(), ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO::String_var< charT >::in(), protocol_proxy_, proxy_broker(), ACE_OS::strcmp(), TAO_OBJECT_IOR_EVALUATE_RETURN, and TAO_Stub::type_id.

Referenced by TAO::Narrow_Utils< T >::narrow().

00195 {
00196   TAO_OBJECT_IOR_EVALUATE_RETURN;
00197 
00198   // NOTE: if istub->type_id is nonzero and we have local knowledge of
00199   // it, we can answer this question without a costly remote call.
00200   //
00201   // That "local knowledge" could come from stubs or skeletons linked
00202   // into this process in the best case, or a "near" repository in a
00203   // slightly worse case.  Or in a trivial case, if the ID being asked
00204   // about is the ID we have recorded, we don't need to ask about the
00205   // inheritance relationships at all!
00206   //
00207   // In real systems having local knowledge will be common, though as
00208   // the systems built atop ORBs become richer it'll also become
00209   // common to have the "real type ID" not be directly understood
00210   // because it's more deeply derived than any locally known types.
00211   //
00212   // XXX if type_id is that of CORBA::Object, "yes, we comply" :-)
00213 
00214   if (this->protocol_proxy_ == 0)
00215     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), false);
00216 
00217   if (this->_stubobj ()->type_id.in () != 0
00218       && ACE_OS::strcmp (type_id,
00219                          this->_stubobj ()->type_id.in ()) == 0)
00220     return true;
00221 
00222   return this->proxy_broker ()->_is_a (this,
00223                                      type_id
00224                                      ACE_ENV_ARG_PARAMETER);
00225 }

CORBA::Boolean CORBA::Object::_is_collocated void   )  const [virtual]
 

Is this object collocated with the servant? Note this does not return this->is_collocated_ but will instead query the underlying stub for its collocation status

Definition at line 234 of file Object.cpp.

References TAO_Stub::is_collocated(), and protocol_proxy_.

Referenced by _validate_connection(), and TAO::Narrow_Utils< T >::unchecked_narrow().

00235 {
00236   if (this->protocol_proxy_)
00237     {
00238       return this->protocol_proxy_->is_collocated ();
00239     }
00240 
00241   return false;
00242 }

CORBA::Boolean CORBA::Object::_is_equivalent CORBA::Object_ptr  other_obj  )  throw () [virtual]
 

Try to determine if this object is the same as other_obj. This method relies on the representation of the object reference's private state. Since that changes easily (when different ORB protocols are in use) there is no default implementation.

Reimplemented in CORBA::LocalObject.

Definition at line 294 of file Object.cpp.

References CORBA::Object_ptr, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00297 {
00298   if (other_obj == this)
00299     {
00300       return true;
00301     }
00302 
00303   TAO_OBJECT_IOR_EVALUATE_RETURN;
00304 
00305   if (this->protocol_proxy_ != 0)
00306     return this->protocol_proxy_->is_equivalent (other_obj);
00307 
00308   return false;
00309 }

CORBA::Boolean CORBA::Object::_is_local void   )  const [virtual]
 

Is this a local object?

Definition at line 252 of file Object.cpp.

References is_local_.

Referenced by TAO::Narrow_Utils< T >::unchecked_narrow().

00253 {
00254   return this->is_local_;
00255 }

TAO::ObjectKey * CORBA::Object::_key  )  [virtual]
 

Return the object key as an out parameter. Caller should release return value when finished with it.

Reimplemented in CORBA::LocalObject.

Definition at line 314 of file Object.cpp.

References TAO_Profile::_key(), _stubobj(), ACE_ERROR, ACE_TEXT, ACE_THROW_RETURN, LM_ERROR, TAO_Stub::profile_in_use(), TAO_debug_level, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00315 {
00316   TAO_OBJECT_IOR_EVALUATE_RETURN;
00317 
00318   if (this->_stubobj () && this->_stubobj ()->profile_in_use ())
00319     return this->_stubobj ()->profile_in_use ()->_key ();
00320 
00321   if (TAO_debug_level > 2)
00322     {
00323       ACE_ERROR ((LM_ERROR,
00324                   ACE_TEXT ("TAO (%P|%t) Null object key return from ")
00325                   ACE_TEXT ("profile in use\n")));
00326     }
00327 
00328   ACE_THROW_RETURN (CORBA::INTERNAL (
00329                       CORBA::SystemException::_tao_minor_code (
00330                         0,
00331                         EINVAL),
00332                       CORBA::COMPLETED_NO),
00333                     0);
00334 }

ACE_INLINE CORBA::Object_ptr CORBA::Object::_narrow CORBA::Object_ptr  obj  )  [static]
 

No-op it is just here to simplify some templates.

Reimplemented in CORBA::LocalObject.

Definition at line 70 of file Object.i.

References _duplicate(), and CORBA::Object_ptr.

00072 {
00073   return CORBA::Object::_duplicate (obj);
00074 }

ACE_INLINE CORBA::Object_ptr CORBA::Object::_nil void   )  [static]
 

Return a NULL object.

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::LocalObject, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 63 of file Object.i.

Referenced by _set_policy_overrides(), TAO_Object_Ref_Table::find(), TAO_ORB_Core::implrepo_service(), CORBA::ORB::ior_string_to_object(), TAO_CORBALOC_Parser::make_stub_from_mprofile(), TAO::Objref_Traits< CORBA::Object >::nil(), operator>>(), TAO_MCAST_Parser::parse_string(), TAO_FILE_Parser::parse_string(), TAO_DLL_Parser::parse_string(), TAO_CORBANAME_Parser::parse_string(), TAO_CORBALOC_Parser::parse_string(), CORBA::ORB::resolve_policy_current(), CORBA::ORB::resolve_policy_manager(), TAO_ORB_Core::resolve_rir(), TAO_ORB_Core::root_poa(), TAO_ORB_Core::shutdown(), and CORBA::ORB::url_ior_string_to_object().

00064 {
00065   return 0;
00066 }

CORBA::Boolean CORBA::Object::_non_existent  )  [virtual]
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 477 of file Object.cpp.

References TAO::Object_Proxy_Broker::_non_existent(), ACE_CATCH, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, proxy_broker(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

Referenced by _validate_connection().

00478 {
00479   TAO_OBJECT_IOR_EVALUATE_RETURN;
00480 
00481   CORBA::Boolean retval = false;
00482 
00483   ACE_TRY
00484     {
00485       retval = this->proxy_broker ()->_non_existent (this
00486                                                    ACE_ENV_ARG_PARAMETER);
00487       ACE_TRY_CHECK;
00488     }
00489   ACE_CATCH (CORBA::OBJECT_NOT_EXIST, ex)
00490     {
00491       retval = true;
00492     }
00493   ACE_CATCHANY
00494     {
00495       ACE_RE_THROW;
00496     }
00497   ACE_ENDTRY;
00498   ACE_CHECK_RETURN (retval);
00499 
00500   return retval;
00501 }

void CORBA::Object::_proxy_broker TAO::Object_Proxy_Broker proxy_broker  )  [virtual]
 

Set the proxy broker.

Definition at line 337 of file Object.cpp.

References TAO_Stub::object_proxy_broker(), and protocol_proxy_.

00338 {
00339   this->protocol_proxy_->object_proxy_broker (proxy_broker);
00340 }

void CORBA::Object::_remove_ref void   )  [virtual]
 

Decrement the reference count.

Reimplemented in CORBA::LocalObject, and TAO_Local_RefCounted_Object.

Definition at line 123 of file Object.cpp.

References ACE_ASSERT, ACE_GUARD, and is_local_.

Referenced by CORBA::release().

00124 {
00125   if (this->is_local_)
00126     return;
00127 
00128   ACE_ASSERT (this->refcount_lock_ != 0);
00129 
00130   {
00131     ACE_GUARD (ACE_Lock,
00132                mon,
00133                *this->refcount_lock_);
00134 
00135     this->refcount_--;
00136 
00137     if (this->refcount_ != 0)
00138       return;
00139   }
00140 
00141   ACE_ASSERT (this->refcount_ == 0);
00142 
00143   delete this;
00144 }

char * CORBA::Object::_repository_id  )  [virtual]
 

Get the repository id.

Reimplemented in CORBA::LocalObject.

Definition at line 527 of file Object.cpp.

References TAO::Object_Proxy_Broker::_repository_id(), ACE_ENV_ARG_PARAMETER, proxy_broker(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

00528 {
00529   TAO_OBJECT_IOR_EVALUATE_RETURN;
00530   return this->proxy_broker ()->_repository_id (this
00531                                               ACE_ENV_ARG_PARAMETER);
00532 }

CORBA::Request_ptr CORBA::Object::_request const char *  operation  )  [virtual]
 

DII operation to create a request.

Reimplemented in CORBA::LocalObject.

Definition at line 447 of file Object.cpp.

References ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, ACE_Dynamic_Service< TYPE >::instance(), protocol_proxy_, TAO_Dynamic_Adapter::request(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

00449 {
00450   TAO_OBJECT_IOR_EVALUATE_RETURN;
00451   if (this->protocol_proxy_)
00452     {
00453       TAO_Dynamic_Adapter *dynamic_adapter =
00454         ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00455             TAO_ORB_Core::dynamic_adapter_name ()
00456           );
00457 
00458       return dynamic_adapter->request (
00459                                   this,
00460                                   this->protocol_proxy_->orb_core ()->orb (),
00461                                   operation
00462                                   ACE_ENV_ARG_PARAMETER
00463                                 );
00464     }
00465   else
00466     {
00467       ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
00468                         0);
00469     }
00470 }

TAO_Abstract_ServantBase * CORBA::Object::_servant void   )  const [virtual]
 

Accessor for the cached servant reference held on the stub if this object is collocated

Definition at line 178 of file Object.cpp.

References TAO_Stub::collocated_servant(), and protocol_proxy_.

Referenced by TAO::Narrow_Utils< T >::unchecked_narrow().

00179 {
00180   if (this->protocol_proxy_ == 0)
00181     {
00182       // No stub set. Should not happen.
00183       return 0;
00184     }
00185 
00186   return this->protocol_proxy_->collocated_servant ();
00187 }

CORBA::Object_ptr CORBA::Object::_set_policy_overrides const CORBA::PolicyList policies,
CORBA::SetOverrideType  set_add
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 573 of file Object.cpp.

References _nil(), ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, ACE_THROW_RETURN, CORBA::Object_ptr, protocol_proxy_, TAO_Stub_Auto_Ptr::release(), TAO_Stub::set_policy_overrides(), and TAO_OBJECT_IOR_EVALUATE_RETURN.

00577 {
00578   TAO_OBJECT_IOR_EVALUATE_RETURN;
00579 
00580   if (!this->protocol_proxy_)
00581     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00582 
00583   TAO_Stub* stub =
00584     this->protocol_proxy_->set_policy_overrides (policies,
00585                                                  set_add
00586                                                  ACE_ENV_ARG_PARAMETER);
00587   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00588 
00589   TAO_Stub_Auto_Ptr safe_stub (stub);
00590 
00591   CORBA::Object_ptr obj = CORBA::Object::_nil ();
00592 
00593   ACE_NEW_THROW_EX (obj,
00594                     CORBA::Object (stub,
00595                                   this->_is_collocated ()),
00596                     CORBA::NO_MEMORY (
00597                       CORBA::SystemException::_tao_minor_code (
00598                         0,
00599                         ENOMEM),
00600                       CORBA::COMPLETED_MAYBE));
00601   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00602 
00603   (void) safe_stub.release ();
00604 
00605   return obj;
00606 }

TAO_Stub * CORBA::Object::_stubobj void   )  [virtual]
 

Accessor for the cached servant reference held on the stub if this object is collocated

Definition at line 264 of file Object.cpp.

References protocol_proxy_, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00265 {
00266   TAO_OBJECT_IOR_EVALUATE_RETURN;
00267   return this->protocol_proxy_;
00268 }

TAO_Stub * CORBA::Object::_stubobj void   )  const [virtual]
 

Get the underlying stub object.

Definition at line 258 of file Object.cpp.

References protocol_proxy_.

Referenced by _is_a(), _key(), TAO::Invocation_Adapter::get_stub(), TAO::LocateRequest_Invocation_Adapter::invoke(), TAO::Collocated_Invocation::invoke(), TAO_Stub::is_equivalent(), operator<<(), TAO_ServerRequest::TAO_ServerRequest(), and TAO::Narrow_Utils< T >::unchecked_narrow().

00259 {
00260   return this->protocol_proxy_;
00261 }

void CORBA::Object::_tao_any_destructor void *   )  [static]
 

Used in the implementation of CORBA::Any.

Reimplemented in CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::Policy, CORBA::PolicyManager, and CORBA::PolicyCurrent.

Definition at line 147 of file Object.cpp.

References CORBA::Object_ptr.

00148 {
00149   CORBA::Object_ptr tmp = static_cast<CORBA::Object_ptr> (x);
00150   ::CORBA::release (tmp);
00151 }

CORBA::Boolean CORBA::Object::_validate_connection CORBA::PolicyList_out  inconsistent_policies  ) 
 

Determine if we are of the type specified by the "logical_type_id".

Reimplemented in CORBA::LocalObject.

Definition at line 621 of file Object.cpp.

References _is_collocated(), _non_existent(), ACE_CATCH, ACE_CATCHANY, ACE_CHECK_RETURN, ACE_ENDTRY, ACE_ENV_ARG_NOT_USED, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_RE_THROW, ACE_TRY, ACE_TRY_CHECK, TAO::LocateRequest_Invocation_Adapter::get_inconsistent_policies(), TAO::LocateRequest_Invocation_Adapter::invoke(), CORBA::PolicyList_out, and TAO_OBJECT_IOR_EVALUATE_RETURN.

00624 {
00625   TAO_OBJECT_IOR_EVALUATE_RETURN;
00626 
00627   inconsistent_policies = 0;
00628 
00629   CORBA::Boolean retval = 0;
00630 
00631 #if (TAO_HAS_MINIMUM_CORBA == 1)
00632 
00633   ACE_ENV_ARG_NOT_USED; // FUZZ: ignore check_for_ace_check
00634 
00635   retval = false;
00636 #else
00637 
00638   // If the object is collocated then use non_existent to see whether
00639   // it's there.
00640   if (this->_is_collocated ())
00641       return !(this->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER));
00642 
00643   TAO::LocateRequest_Invocation_Adapter tao_call (this);
00644   ACE_TRY
00645     {
00646       tao_call.invoke (ACE_ENV_SINGLE_ARG_PARAMETER);
00647       ACE_TRY_CHECK;
00648     }
00649   ACE_CATCH (CORBA::INV_POLICY, ex)
00650     {
00651       inconsistent_policies =
00652         tao_call.get_inconsistent_policies ();
00653       retval = false;
00654     }
00655   ACE_CATCHANY
00656     {
00657       ACE_RE_THROW;
00658     }
00659   ACE_ENDTRY;
00660   ACE_CHECK_RETURN (false);
00661 
00662   retval = true;
00663 #endif /* TAO_HAS_MINIMUM_CORBA */
00664 
00665   return retval;
00666 }

ACE_INLINE const IOP::IOR & CORBA::Object::ior void   )  const
 

Accessor for the cached servant reference held on the stub if this object is collocated

Definition at line 95 of file Object.i.

References TAO_Var_Base_T< T >::in().

Referenced by is_nil_i(), and operator<<().

00096 {
00097   return this->ior_.in ();
00098 }

ACE_INLINE CORBA::Boolean CORBA::Object::is_evaluated void   )  const
 

Accessor to the flag..

Definition at line 77 of file Object.i.

References is_evaluated_.

Referenced by is_nil_i(), TAO::Narrow_Utils< T >::lazy_evaluation(), and operator<<().

00078 {
00079   return this->is_evaluated_;
00080 }

CORBA::Boolean CORBA::Object::is_nil_i CORBA::Object_ptr  obj  )  [static]
 

Uninlined part of the now-inlined CORBA::is_nil().

Definition at line 343 of file Object.cpp.

References ior(), is_evaluated(), TAO_ORB_Core::object_is_nil(), CORBA::Object_ptr, orb_core_, and IOP::IOR::profiles.

Referenced by CORBA::is_nil().

00344 {
00345   // If the profile length is zero for a non-evaluted IOR it is a
00346   // null-object.
00347   if ((!obj->is_evaluated ()) &&
00348       obj->ior ().profiles.length () == 0)
00349   return true;
00350 
00351   // To accomodate new definitions.
00352   if (obj->orb_core_)
00353     {
00354       return obj->orb_core_->object_is_nil (obj);
00355     }
00356 
00357   return false;
00358 }

CORBA::Boolean CORBA::Object::marshal TAO_OutputCDR cdr  )  [virtual]
 

Allows us to forbid marshaling of local interfaces.

Reimplemented in CORBA::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

Definition at line 155 of file Object.cpp.

00156 {
00157   return (cdr << this);
00158 }

CORBA::Boolean CORBA::Object::marshal const Object_ptr  x,
TAO_OutputCDR cdr
[static]
 

Marshalling operator used by the stub code. A long story why the stub code uses this, let us keep it short here.

Definition at line 161 of file Object.cpp.

References ACE_OutputCDR::good_bit(), CORBA::Object_ptr, ACE_OutputCDR::write_char(), and ACE_OutputCDR::write_ulong().

Referenced by TAO::Objref_Traits< CORBA::Object >::marshal().

00163 {
00164   if (x == 0)
00165     {
00166       // NIL objrefs ... marshal as empty type hint, no elements.
00167       cdr.write_ulong (1);
00168       cdr.write_char ('\0');
00169       cdr.write_ulong (0);
00170       return (CORBA::Boolean) cdr.good_bit ();
00171     }
00172 
00173   return x->marshal (cdr);
00174 }

Object& CORBA::Object::operator= const Object  )  [private]
 

ACE_INLINE TAO_ORB_Core * CORBA::Object::orb_core void   )  const
 

Accessor for the ORB_Core..

Definition at line 83 of file Object.i.

Referenced by TAO::LocateRequest_Invocation_Adapter::get_timeout(), TAO::Invocation_Adapter::get_timeout(), and TAO::Narrow_Utils< T >::lazy_evaluation().

00084 {
00085   return this->orb_core_;
00086 }

TAO::Object_Proxy_Broker * CORBA::Object::proxy_broker  )  const [protected]
 

Convenience accessor for the object proxy broker of the underlying stub.

Definition at line 689 of file Object.cpp.

References TAO_Stub::object_proxy_broker(), protocol_proxy_, and the_tao_remote_object_proxy_broker().

Referenced by _get_component(), _get_interface(), _is_a(), _non_existent(), and _repository_id().

00690 {
00691   // Paranoid check. We *should* never access the proxy_broker
00692   // when the object has not been initialised so there *should*
00693   // alway be a stub, but just in case...
00694 
00695   if (this->protocol_proxy_)
00696     {
00697       return this->protocol_proxy_->object_proxy_broker ();
00698     }
00699 
00700   // We have no stub. We cannot be collocated.
00701   return the_tao_remote_object_proxy_broker ();
00702 }

void CORBA::Object::set_collocated_servant TAO_Abstract_ServantBase  ) 
 

Mutator for setting the servant in collocated cases.

This is used by the Object_Adapter to set the servant for collocated cases and only when the object is initialized. The object initialization takes place when IOR's are lazily evaluated.

Definition at line 245 of file Object.cpp.

References TAO_Stub::collocated_servant(), TAO_Stub::is_collocated(), and protocol_proxy_.

00246 {
00247   this->protocol_proxy_->collocated_servant (b);
00248   this->protocol_proxy_->is_collocated (true);
00249 }

ACE_INLINE IOP::IOR * CORBA::Object::steal_ior void   ) 
 

Accessors for the underlying IOP::IOR's.

The steal_ior () call basically relinquishes the ownership of the IOR. This is useful for cases when one wants to initialize a new CORBA Object

Definition at line 89 of file Object.i.

References TAO_Var_Var_T< T >::_retn().

Referenced by TAO::Narrow_Utils< T >::lazy_evaluation().

00090 {
00091   return this->ior_._retn ();
00092 }

void CORBA::Object::tao_object_initialize Object  )  [static]
 

Helper function for reading contents of an IOR.

Definition at line 737 of file Object.cpp.

References ACE_ANY_EXCEPTION, ACE_CATCHANY, ACE_CHECK, ACE_DEBUG, ACE_DECLARE_NEW_CORBA_ENV, ACE_ENDTRY, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, ACE_ERROR, ACE_PRINT_EXCEPTION, ACE_TEXT, ACE_TRY, ACE_TRY_CHECK, TAO_ORB_Core::connector_registry(), TAO_Connector_Registry::create_profile(), TAO_ORB_Core::create_stub(), TAO_Stub_Auto_Ptr::get(), TAO_MProfile::give_profile(), TAO_Var_Base_T< T >::in(), TAO_ORB_Core::initialize_object(), TAO_ORB_Core::input_cdr_buffer_allocator(), TAO_ORB_Core::input_cdr_dblock_allocator(), TAO_ORB_Core::input_cdr_msgblock_allocator(), ior_, is_evaluated_, LM_ERROR, LM_WARNING, orb_core_, TAO_MProfile::profile_count(), protocol_proxy_, TAO_Stub_Auto_Ptr::release(), TAO_debug_level, and TAO_ORB_Core_instance().

00738 {
00739   CORBA::ULong const profile_count =
00740     obj->ior_->profiles.length ();
00741 
00742   // Assumption is that after calling this method, folks should test
00743   // for protocol_proxy_ or whatever to make sure that things have
00744   // been initialized!
00745   if (profile_count == 0)
00746     return;
00747 
00748   // get a profile container to store all profiles in the IOR.
00749   TAO_MProfile mp (profile_count);
00750 
00751   TAO_ORB_Core *&orb_core = obj->orb_core_;
00752   if (orb_core == 0)
00753     {
00754       orb_core = TAO_ORB_Core_instance ();
00755       if (TAO_debug_level > 0)
00756         {
00757           ACE_DEBUG ((LM_WARNING,
00758                       ACE_TEXT ("TAO (%P|%t) - Object::tao_object_initialize ")
00759                       ACE_TEXT ("WARNING: extracting object from ")
00760                       ACE_TEXT ("default ORB_Core\n")));
00761         }
00762     }
00763 
00764   TAO_Stub *objdata = 0;
00765 
00766   ACE_DECLARE_NEW_CORBA_ENV;
00767   ACE_TRY
00768     {
00769       TAO_Connector_Registry *connector_registry =
00770         orb_core->connector_registry (ACE_ENV_SINGLE_ARG_PARAMETER);
00771       ACE_TRY_CHECK;
00772 
00773       for (CORBA::ULong i = 0; i != profile_count; ++i)
00774         {
00775           IOP::TaggedProfile &tpfile =
00776             obj->ior_->profiles[i];
00777 
00778           // NOTE: This is a place for optimizations. Here we have an
00779           // 2 allocations and 2 copies. Future optimizations should
00780           // target this place.
00781           TAO_OutputCDR o_cdr;
00782 
00783           o_cdr << tpfile;
00784 
00785           TAO_InputCDR cdr (o_cdr,
00786                             orb_core->input_cdr_buffer_allocator (),
00787                             orb_core->input_cdr_dblock_allocator (),
00788                             orb_core->input_cdr_msgblock_allocator (),
00789                             orb_core);
00790 
00791           TAO_Profile *pfile =
00792             connector_registry->create_profile (cdr);
00793 
00794           if (pfile != 0)
00795             mp.give_profile (pfile);
00796         }
00797 
00798       // Make sure we got some profiles!
00799       if (mp.profile_count () != profile_count)
00800         {
00801           // @@ This occurs when profile creation fails when decoding the
00802           //    profile from the IOR.
00803           ACE_ERROR ((LM_ERROR,
00804                       ACE_TEXT ("TAO (%P|%t) ERROR: XXXXX Could not create all ")
00805                       ACE_TEXT ("profiles while extracting object\n")
00806                       ACE_TEXT ("TAO (%P|%t) ERROR: reference from the ")
00807                       ACE_TEXT ("CDR stream.\n")));
00808         }
00809 
00810 
00811       objdata =
00812         orb_core->create_stub (obj->ior_->type_id.in (),
00813                                mp
00814                                ACE_ENV_ARG_PARAMETER);
00815       ACE_TRY_CHECK;
00816     }
00817   ACE_CATCHANY
00818     {
00819       if (TAO_debug_level > 0)
00820         ACE_PRINT_EXCEPTION (ACE_ANY_EXCEPTION,
00821                              ACE_TEXT ("TAO - ERROR creating stub ")
00822                              ACE_TEXT ("object when demarshaling object ")
00823                              ACE_TEXT ("reference."));
00824 
00825       return;
00826     }
00827   ACE_ENDTRY;
00828   ACE_CHECK;
00829 
00830   TAO_Stub_Auto_Ptr safe_objdata (objdata);
00831 
00832   // This call will set the stub proxy broker if necessary
00833   if (orb_core->initialize_object (safe_objdata.get (),
00834                                    obj) == -1)
00835     return;
00836 
00837   obj->protocol_proxy_ = objdata;
00838 
00839   obj->is_evaluated_ = true;
00840 
00841   // Release the contents of the ior to keep memory consumption down.
00842   obj->ior_ = 0;
00843 
00844   // Transfer ownership to the CORBA::Object
00845   (void) safe_objdata.release ();
00846   return;
00847 }


Member Data Documentation

IOP::IOR_var CORBA::Object::ior_ [private]
 

If the IOR hasnt been evaluated fully, then the contents of the IOR that we received should be in here!

Definition at line 383 of file Object.h.

Referenced by tao_object_initialize().

CORBA::Boolean CORBA::Object::is_evaluated_ [private]
 

Flag to indicate whether the IOP::IOR has been evaluated fully.

Definition at line 379 of file Object.h.

Referenced by is_evaluated(), and tao_object_initialize().

CORBA::Boolean CORBA::Object::is_local_ [private]
 

Specify whether this is a local object or not.

Definition at line 376 of file Object.h.

Referenced by _add_ref(), _is_local(), and _remove_ref().

TAO_ORB_Core* CORBA::Object::orb_core_ [private]
 

Cached pointer of our ORB_Core.

Be aware that this pointer can be zero or not. In fact there are two ways to get this pointer filled:

  • If CORBA::Object is constructed through one of the constructors with a stub and null ORB_Core, we use the orb_core from the stub to fill this pointer
  • If the other constructor, which uses IOP::IOR is used, a stub needs to be created first (i.e., the IOR needs to be evaluated first), in which case the ORB_Core would be null. The orb_core pointer then needs to be accessed from the stub and passed back as part of _get_orb().

Definition at line 398 of file Object.h.

Referenced by is_nil_i(), and tao_object_initialize().

TAO_Stub* CORBA::Object::protocol_proxy_ [private]
 

Pointer to the protocol-specific "object" containing important profiling information regarding this proxy. The protocol proxy is (potentially) shared among several Objects

Definition at line 406 of file Object.h.

Referenced by _create_request(), _get_cached_policy(), _get_orb(), _get_policy(), _get_policy_overrides(), _hash(), _is_a(), _is_collocated(), _proxy_broker(), _request(), _servant(), _set_policy_overrides(), _stubobj(), Object(), proxy_broker(), set_collocated_servant(), tao_object_initialize(), and ~Object().

CORBA::ULong CORBA::Object::refcount_ [private]
 

Number of outstanding references to this object.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 409 of file Object.h.

ACE_Lock* CORBA::Object::refcount_lock_ [private]
 

Protect reference count manipulation from race conditions.

This lock is only instantiated for unconstrained objects. The reason for this is that locality-constrained objects that do not require reference counting (the default) may be instantiated in the critical path.

Definition at line 418 of file Object.h.

Referenced by Object(), and ~Object().


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:24:58 2006 for TAO by doxygen 1.3.6