Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

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.

Public Types

typedef CORBA_Object_ptr _ptr_type
typedef CORBA_Object_var _var_type

Public Methods

virtual ~CORBA_Object (void)
 Destructor. More...

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

virtual const char * _interface_repository_id (void) const
 The repository ID for the most derived class, this is an implementation method and does no remote invocations! More...

virtual CORBA::Boolean _is_collocated (void) const
 Is this object collocated with the servant? More...

virtual CORBA::Boolean _is_local (void) const
 Is this a local object? More...

virtual TAO_Abstract_ServantBase_servant (void) const
virtual CORBA::Boolean _non_existent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::ImplementationDef_ptr _get_implementation (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 This method is deprecated in the CORBA 2.2 spec, we just return 0 every time. More...

virtual CORBA_InterfaceDef_ptr _get_interface (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Get info about the object from the Interface Repository. More...

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

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 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
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 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::Request_ptr _request (const char *operation ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 DII operation to create a request. More...

CORBA::Policy_ptr _get_policy (CORBA::PolicyType type ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA::Policy_ptr _get_client_policy (CORBA::PolicyType type ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA::Object_ptr _set_policy_overrides (const CORBA::PolicyList &policies, CORBA::SetOverrideType set_add ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA::PolicyList_get_policy_overrides (const CORBA::PolicyTypeSeq &types ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA::Boolean _validate_connection (CORBA::PolicyList_out inconsistent_policies ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::ULong _hash (CORBA::ULong maximum ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::Boolean _is_equivalent (CORBA::Object_ptr other_obj ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw ()
virtual TAO_ObjectKey_key (ACE_ENV_SINGLE_ARG_DECL)
 Return the object key as an out parameter. Caller should release return value when finished with it. More...

virtual const TAO_ObjectKey_object_key (void)
virtual void * _tao_QueryInterface (ptr_arith_t type)
 Downcasting this object pointer to some other derived class. This QueryInterface stuff only work for local object. More...

 CORBA_Object (TAO_Stub *p=0, CORBA::Boolean collocated=0, TAO_Abstract_ServantBase *servant=0)
 Constructor. More...

virtual TAO_Stub_stubobj (void) const
 Get the underlying stub object. More...

virtual void _proxy_broker (TAO_Object_Proxy_Broker *proxy_broker)
 Set the proxy broker. More...

virtual TAO_Object_Proxy_Broker_proxy_broker (void)
 Get the proxy broker. More...

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

virtual void _add_ref (void)
 Increment the reference count. More...

virtual void _remove_ref (void)
 Decrement the reference count. More...


Static Public Methods

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

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

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

CORBA::Object_ptr _unchecked_narrow (CORBA_Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
void _tao_any_destructor (void *)
 Used in the implementation of CORBA::Any. More...

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


Static Public Attributes

int _tao_class_id = 0
 Address of this variable used in _unchecked_narrow(). More...


Protected Methods

 CORBA_Object (int dummy)
 Initializing a local object. More...


Protected Attributes

CORBA::Boolean is_collocated_
 Flag to indicate collocation. It is 0 except for collocated objects. More...

TAO_Abstract_ServantBaseservant_
 Servant pointer. It is 0 except for collocated objects. More...

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

TAO_Object_Proxy_Brokerproxy_broker_
 Pointer to the Proxy Broker i.e. the instance that takes care of getting the right proxy for performing a given call. More...


Private Methods

 CORBA_Object (const CORBA_Object &)
CORBA_Object & operator= (const CORBA_Object &)

Private Attributes

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

TAO_SYNCH_MUTEX * refcount_lock_
 Protect reference count manipulation from race conditions. More...


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 46 of file Object.h.


Member Typedef Documentation

typedef CORBA_Object_ptr CORBA_Object::_ptr_type
 

Reimplemented in CORBA_Current.

Definition at line 212 of file Object.h.

typedef CORBA_Object_var CORBA_Object::_var_type
 

Reimplemented in CORBA_Current.

Definition at line 213 of file Object.h.


Constructor & Destructor Documentation

CORBA_Object::~CORBA_Object void    [virtual]
 

Destructor.

Definition at line 33 of file Object.cpp.

References TAO_Stub::_decr_refcnt, protocol_proxy_, and refcount_lock_.

00034 {
00035   if (this->protocol_proxy_)
00036     (void) this->protocol_proxy_->_decr_refcnt ();
00037 
00038   delete this->refcount_lock_;
00039 }

CORBA_Object::CORBA_Object TAO_Stub   p = 0,
CORBA::Boolean    collocated = 0,
TAO_Abstract_ServantBase   servant = 0
 

Constructor.

Definition at line 41 of file Object.cpp.

References _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer, ACE_NEW, is_collocated_, proxy_broker_, TAO_SYNCH_MUTEX, and the_tao_remote_object_proxy_broker.

00044   : is_collocated_ (collocated),
00045     servant_ (servant),
00046     is_local_ (protocol_proxy == 0 ? 1 : 0),
00047     proxy_broker_ (0),
00048     protocol_proxy_ (protocol_proxy),
00049     refcount_ (1),
00050     refcount_lock_ (0)
00051 {
00052   if (protocol_proxy != 0)
00053     {
00054       // Only instantiate a lock if the object is unconstrained.
00055       // Locality-constrained objects have no-op reference counting by
00056       // default.  Furthermore locality-constrained objects may be
00057       // instantiated in the critical path.  Instantiating a lock for
00058       // unconstrained objects alone optimizes instantiation of such
00059       // locality-constrained objects.
00060       ACE_NEW (this->refcount_lock_, TAO_SYNCH_MUTEX);
00061 
00062       // If the object is collocated then set the broker using the
00063       // factory otherwise use the remote proxy broker.
00064       if (this->is_collocated_ &&
00065           _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer != 0)
00066         this->proxy_broker_ = _TAO_collocation_Object_Proxy_Broker_Factory_function_pointer (this);
00067       else
00068         this->proxy_broker_ = the_tao_remote_object_proxy_broker ();
00069     }
00070 }

ACE_INLINE CORBA_Object::CORBA_Object int    dummy [protected]
 

Initializing a local object.

Definition at line 8 of file Object.i.

00009   : is_collocated_ (0),
00010     servant_ (0),
00011     is_local_ (1),
00012     proxy_broker_ (0),
00013     protocol_proxy_ (0),
00014     refcount_ (1),
00015     refcount_lock_ (0)
00016 {
00017 }

CORBA_Object::CORBA_Object const CORBA_Object &    [private]
 


Member Function Documentation

void CORBA_Object::_add_ref void    [virtual]
 

Increment the reference count.

Reimplemented in CORBA_LocalObject.

Definition at line 73 of file Object.cpp.

References ACE_GUARD, refcount_, refcount_lock_, and TAO_SYNCH_MUTEX.

Referenced by CORBA::Policy::_duplicate, CORBA::ConstructionPolicy::_duplicate, CORBA::DomainManager::_duplicate, CORBA::Policy::_tao_QueryInterface, CORBA::ConstructionPolicy::_tao_QueryInterface, and CORBA::DomainManager::_tao_QueryInterface.

00074 {
00075   if (this->refcount_lock_ != 0)
00076     {
00077       ACE_GUARD (TAO_SYNCH_MUTEX, mon, *this->refcount_lock_);
00078 
00079       this->refcount_++;
00080     }
00081 }

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    ACE_ENV_ARG_DECL_WITH_DEFAULTS
[virtual]
 

Definition at line 319 of file Object.cpp.

References ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW, TAO_Dynamic_Adapter::create_request, TAO_ORB_Core::dynamic_adapter_name, ACE_Dynamic_Service::instance, and protocol_proxy_.

00328 {
00329   // Since we don't really support Context, anything but a null pointer
00330   // is a no-no.
00331   // Neither can we create a request object from locality constrained
00332   // object references.
00333   if (ctx != 0 || this->protocol_proxy_ == 0)
00334     {
00335       ACE_THROW (CORBA::NO_IMPLEMENT ());
00336     }
00337 
00338   TAO_Dynamic_Adapter *dynamic_adapter =
00339     ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00340         TAO_ORB_Core::dynamic_adapter_name ()
00341       );
00342 
00343   dynamic_adapter->create_request (
00344                        this,
00345                        this->protocol_proxy_->orb_core ()-> orb (),
00346                        operation,
00347                        arg_list,
00348                        result,
00349                        exceptions,
00350                        request,
00351                        req_flags
00352                         ACE_ENV_ARG_PARAMETER
00353                      );
00354 }

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    ACE_ENV_ARG_DECL_WITH_DEFAULTS
[virtual]
 

Definition at line 283 of file Object.cpp.

References ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW, TAO_Dynamic_Adapter::create_request, TAO_ORB_Core::dynamic_adapter_name, ACE_Dynamic_Service::instance, and protocol_proxy_.

00290 {
00291   // Since we don't really support Context, anything but a null pointer
00292   // is a no-no.
00293   // Neither can we create a request object from locality constrained
00294   // object references.
00295   if (ctx != 0 || this->protocol_proxy_ == 0)
00296     {
00297       ACE_THROW (CORBA::NO_IMPLEMENT ());
00298     }
00299 
00300   TAO_Dynamic_Adapter *dynamic_adapter =
00301     ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00302         TAO_ORB_Core::dynamic_adapter_name ()
00303       );
00304 
00305   dynamic_adapter->create_request (
00306                        this,
00307                        this->protocol_proxy_->orb_core ()-> orb (),
00308                        operation,
00309                        arg_list,
00310                        result,
00311                        0,
00312                        request,
00313                        req_flags
00314                         ACE_ENV_ARG_PARAMETER
00315                      );
00316 }

ACE_INLINE CORBA::Object_ptr CORBA_Object::_duplicate CORBA::Object_ptr    obj [static]
 

Increment the ref count.

Definition at line 20 of file Object.i.

Referenced by CORBA_Object_out::operator=, CORBA_Object_var::operator=, CORBA_ORB::resolve_policy_current, CORBA_ORB::resolve_policy_manager, and CORBA_Object_var::tao_duplicate.

00021 {
00022   if (obj)
00023     obj->_add_ref ();
00024   return obj;
00025 }

CORBA::Policy_ptr CORBA_Object::_get_client_policy CORBA::PolicyType type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Reimplemented in CORBA_LocalObject.

Definition at line 456 of file Object.cpp.

References CORBA::Policy::_nil, _stubobj, ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_client_policy, and protocol_proxy_.

00459 {
00460   if (this->protocol_proxy_)
00461     return this->_stubobj ()->get_client_policy (type ACE_ENV_ARG_PARAMETER);
00462   else
00463     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00464 }

CORBA::Object_ptr CORBA_Object::_get_component ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Get info about the object from the Interface Repository.

Reimplemented in CORBA_LocalObject.

Definition at line 422 of file Object.cpp.

References TAO_Object_Proxy_Impl::_get_component, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, proxy_broker_, and TAO_Object_Proxy_Broker::select_proxy.

00423 {
00424   // Get the right Proxy.
00425   TAO_Object_Proxy_Impl &the_proxy =
00426     this->proxy_broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
00427   ACE_CHECK_RETURN (0);
00428 
00429   // Perform the Call.
00430   return the_proxy._get_component (this ACE_ENV_ARG_PARAMETER);
00431 }

CORBA::ImplementationDef_ptr CORBA_Object::_get_implementation ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

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

Reimplemented in CORBA_LocalObject.

Definition at line 416 of file Object.cpp.

References ACE_ENV_SINGLE_ARG_DECL_NOT_USED.

00417 {
00418   return 0;
00419 }

CORBA_InterfaceDef_ptr CORBA_Object::_get_interface ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Get info about the object from the Interface Repository.

Reimplemented in CORBA_LocalObject.

Definition at line 404 of file Object.cpp.

References TAO_Object_Proxy_Impl::_get_interface, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, proxy_broker_, and TAO_Object_Proxy_Broker::select_proxy.

00405 {
00406   // Get the right Proxy.
00407   TAO_Object_Proxy_Impl &the_proxy =
00408     this->proxy_broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
00409   ACE_CHECK_RETURN (0);
00410 
00411   // Perform the Call.
00412   return the_proxy._get_interface (this ACE_ENV_ARG_PARAMETER);
00413 }

CORBA::Policy_ptr CORBA_Object::_get_policy CORBA::PolicyType type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Reimplemented in CORBA_LocalObject.

Definition at line 445 of file Object.cpp.

References CORBA::Policy::_nil, ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_policy, and protocol_proxy_.

00448 {
00449   if (this->protocol_proxy_)
00450     return this->protocol_proxy_->get_policy (type ACE_ENV_ARG_PARAMETER);
00451   else
00452     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00453 }

CORBA::PolicyList * CORBA_Object::_get_policy_overrides const CORBA::PolicyTypeSeq &types    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Reimplemented in CORBA_LocalObject.

Definition at line 501 of file Object.cpp.

References ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_Stub::get_policy_overrides, and protocol_proxy_.

00503 {
00504   if (this->protocol_proxy_)
00505     return this->protocol_proxy_->get_policy_overrides (types ACE_ENV_ARG_PARAMETER);
00506   else
00507     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00508 }

CORBA::ULong CORBA_Object::_hash CORBA::ULong maximum    ACE_ENV_ARG_DECL_WITH_DEFAULTS [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 178 of file Object.cpp.

References ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, TAO_Stub::hash, protocol_proxy_, and ptr_arith_t.

00180 {
00181   if (this->protocol_proxy_ != 0)
00182     return this->protocol_proxy_->hash (maximum ACE_ENV_ARG_PARAMETER);
00183   else
00184     {
00185       // Locality-constrained object.
00186 
00187       // Note that we reinterpret_cast to an "unsigned long" instead
00188       // of CORBA::ULong since we need to first cast to an integer
00189       // large enough to hold an address to avoid compile-time
00190       // warnings on some 64-bit platforms.
00191       CORBA::ULong hash = ACE_static_cast (CORBA::ULong,
00192                             ACE_reinterpret_cast (ptr_arith_t, this));
00193 
00194       return hash % maximum;
00195     }
00196 }

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.

Definition at line 160 of file Object.cpp.

00161 {
00162   return "IDL:omg.org/CORBA/Object:1.0";
00163 }

virtual CORBA::Boolean CORBA_Object::_is_a const char *logical_type_id    ACE_ENV_ARG_DECL_WITH_DEFAULTS [virtual]
 

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

CORBA::Boolean CORBA_Object::_is_collocated void    const [virtual]
 

Is this object collocated with the servant?

Definition at line 166 of file Object.cpp.

References is_collocated_.

00167 {
00168   return this->is_collocated_;
00169 }

virtual CORBA::Boolean CORBA_Object::_is_equivalent CORBA::Object_ptr other_obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS 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.

CORBA::Boolean CORBA_Object::_is_local void    const [virtual]
 

Is this a local object?

Definition at line 172 of file Object.cpp.

References is_local_.

00173 {
00174   return this->is_local_;
00175 }

virtual TAO_ObjectKey* CORBA_Object::_key ACE_ENV_SINGLE_ARG_DECL    [virtual]
 

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

Reimplemented in CORBA_LocalObject.

ACE_INLINE_FOR_GNUC CORBA::Object_ptr CORBA_Object::_narrow CORBA_Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

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

ACE_INLINE CORBA::Object_ptr CORBA_Object::_nil void    [static]
 

Return a NULL object.

Reimplemented in CORBA_Current.

Definition at line 53 of file Object.i.

Referenced by CORBA_Object_var::_retn, CORBA_Object_out::CORBA_Object_out, CORBA_Object_var::out, CORBA_ORB::resolve_policy_current, CORBA_ORB::resolve_policy_manager, and CORBA_Object_var::tao_nil.

00054 {
00055   return 0;
00056 }

CORBA::Boolean CORBA_Object::_non_existent ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Reimplemented in CORBA_LocalObject.

Definition at line 386 of file Object.cpp.

References TAO_Object_Proxy_Impl::_non_existent, ACE_CHECK_RETURN, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_DECL, proxy_broker_, and TAO_Object_Proxy_Broker::select_proxy.

Referenced by _validate_connection.

00387 {
00388   CORBA::Boolean _tao_retval = 0;
00389 
00390   // Get the right Proxy.
00391   TAO_Object_Proxy_Impl &the_proxy =
00392     this->proxy_broker_->select_proxy (this ACE_ENV_ARG_PARAMETER);
00393   ACE_CHECK_RETURN (0);
00394 
00395   // Perform the Call.
00396   _tao_retval = the_proxy._non_existent (this ACE_ENV_ARG_PARAMETER);
00397   ACE_CHECK_RETURN (0);
00398 
00399   return _tao_retval;
00400 }

virtual const TAO_ObjectKey& CORBA_Object::_object_key void    [virtual]
 

Return a reference to the object key of profile in-use. If there's no in-use profile, then the program will probably crash. This method does not create a new copy.

virtual TAO_Object_Proxy_Broker* CORBA_Object::_proxy_broker void    [virtual]
 

Get the proxy broker.

virtual void CORBA_Object::_proxy_broker TAO_Object_Proxy_Broker   proxy_broker [virtual]
 

Set the proxy broker.

void CORBA_Object::_remove_ref void    [virtual]
 

Decrement the reference count.

Reimplemented in CORBA_LocalObject.

Definition at line 84 of file Object.cpp.

References ACE_GUARD, refcount_, refcount_lock_, and TAO_SYNCH_MUTEX.

00085 {
00086   if (this->refcount_lock_ != 0)
00087     {
00088       {
00089         ACE_GUARD (TAO_SYNCH_MUTEX, mon, *this->refcount_lock_);
00090 
00091         this->refcount_--;
00092 
00093         if (this->refcount_ != 0)
00094           return;
00095       }
00096 
00097       delete this;
00098     }
00099 }

CORBA::Request_ptr CORBA_Object::_request const char *operation    ACE_ENV_ARG_DECL_WITH_DEFAULTS [virtual]
 

DII operation to create a request.

Definition at line 357 of file Object.cpp.

References ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_THROW_RETURN, TAO_ORB_Core::dynamic_adapter_name, ACE_Dynamic_Service::instance, protocol_proxy_, and TAO_Dynamic_Adapter::request.

00359 {
00360   if (this->protocol_proxy_)
00361     {
00362       TAO_Dynamic_Adapter *dynamic_adapter =
00363         ACE_Dynamic_Service<TAO_Dynamic_Adapter>::instance (
00364             TAO_ORB_Core::dynamic_adapter_name ()
00365           );
00366 
00367       return dynamic_adapter->request (
00368                                   this,
00369                                   this->protocol_proxy_->orb_core ()->orb (),
00370                                   operation
00371                                    ACE_ENV_ARG_PARAMETER
00372                                 );
00373     }
00374   else
00375     {
00376       ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
00377                         0);
00378     }
00379 }

TAO_Abstract_ServantBase * CORBA_Object::_servant void    const [virtual]
 

Definition at line 109 of file Object.cpp.

References servant_.

00110 {
00111   return this->servant_;
00112 }

CORBA::Object_ptr CORBA_Object::_set_policy_overrides const CORBA::PolicyList   policies,
CORBA::SetOverrideType set_add    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Reimplemented in CORBA_LocalObject.

Definition at line 467 of file Object.cpp.

References CORBA::Policy::_nil, CORBA_SystemException::_tao_minor_code, ACE_CHECK_RETURN, ACE_ENV_ARG_DECL, ACE_ENV_ARG_PARAMETER, ACE_NEW_THROW_EX, ACE_THROW_RETURN, protocol_proxy_, TAO_Stub_Auto_Ptr::release, TAO_Stub::set_policy_overrides, and TAO_DEFAULT_MINOR_CODE.

00471 {
00472   if (!this->protocol_proxy_)
00473     ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00474 
00475   TAO_Stub* stub =
00476     this->protocol_proxy_->set_policy_overrides (policies,
00477                                                  set_add
00478                                                   ACE_ENV_ARG_PARAMETER);
00479   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00480 
00481   TAO_Stub_Auto_Ptr safe_stub (stub);
00482 
00483   CORBA::Object_ptr obj = CORBA::Object::_nil ();
00484 
00485   ACE_NEW_THROW_EX (obj,
00486                     CORBA_Object (stub,
00487                                   this->is_collocated_),
00488                     CORBA::NO_MEMORY (
00489                       CORBA_SystemException::_tao_minor_code (
00490                         TAO_DEFAULT_MINOR_CODE,
00491                         ENOMEM),
00492                       CORBA::COMPLETED_MAYBE));
00493   ACE_CHECK_RETURN (CORBA::Object::_nil ());
00494 
00495   (void) safe_stub.release ();
00496 
00497   return obj;
00498 }

ACE_INLINE TAO_Stub * CORBA_Object::_stubobj void    const [virtual]
 

Get the underlying stub object.

Definition at line 84 of file Object.i.

References protocol_proxy_.

Referenced by _get_client_policy, and operator<<.

00085 {
00086   return this->protocol_proxy_;
00087 }

void CORBA_Object::_tao_any_destructor void *    [static]
 

Used in the implementation of CORBA::Any.

Reimplemented in CORBA::DomainManager.

Definition at line 102 of file Object.cpp.

References CORBA::release.

00103 {
00104   CORBA::Object_ptr tmp = ACE_static_cast (CORBA::Object_ptr, x);
00105   CORBA::release (tmp);
00106 }

virtual void* CORBA_Object::_tao_QueryInterface ptr_arith_t    type [virtual]
 

Downcasting this object pointer to some other derived class. This QueryInterface stuff only work for local object.

Reimplemented in CORBA_Current.

CORBA::Object_ptr CORBA_Object::_unchecked_narrow CORBA_Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

CORBA::Boolean CORBA_Object::_validate_connection CORBA::PolicyList_out inconsistent_policies    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Reimplemented in CORBA_LocalObject.

Definition at line 511 of file Object.cpp.

References _non_existent, ACE_ENV_ARG_DECL, ACE_ENV_ARG_NOT_USED, ACE_ENV_ARG_PARAMETER, ACE_ENV_SINGLE_ARG_PARAMETER, is_collocated_, protocol_proxy_, and TAO_Stub::validate_connection.

00513 {
00514   inconsistent_policies = 0;
00515 
00516 #if (TAO_HAS_MINIMUM_CORBA == 1)
00517 
00518   ACE_ENV_ARG_NOT_USED; // FUZZ: ignore check_for_ace_check
00519 
00520 #else
00521 
00522   // If the object is collocated then use non_existent to see whether
00523   // it's there.
00524   if (this->is_collocated_)
00525       return !(this->_non_existent (ACE_ENV_SINGLE_ARG_PARAMETER));
00526 
00527   if (this->protocol_proxy_)
00528     return this->protocol_proxy_->validate_connection (inconsistent_policies
00529                                                         ACE_ENV_ARG_PARAMETER);
00530 
00531 #endif /* TAO_HAS_MINIMUM_CORBA */
00532 
00533   return 0;
00534 }

CORBA::Boolean CORBA_Object::is_nil_i CORBA::Object_ptr    obj [static]
 

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

CORBA_Object& CORBA_Object::operator= const CORBA_Object &    [private]
 


Member Data Documentation

int CORBA_Object::_tao_class_id = 0 [static]
 

Address of this variable used in _unchecked_narrow().

Reimplemented in CORBA_Current.

Definition at line 31 of file Object.cpp.

CORBA::Boolean CORBA_Object::is_collocated_ [protected]
 

Flag to indicate collocation. It is 0 except for collocated objects.

Definition at line 261 of file Object.h.

Referenced by _is_collocated, _validate_connection, and CORBA_Object.

CORBA::Boolean CORBA_Object::is_local_ [protected]
 

Specify whether this is a local object or not.

Definition at line 267 of file Object.h.

Referenced by _is_local.

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 CORBA_Objects

Definition at line 281 of file Object.h.

Referenced by _create_request, _get_client_policy, _get_policy, _get_policy_overrides, _hash, _request, _set_policy_overrides, _stubobj, _validate_connection, and ~CORBA_Object.

TAO_Object_Proxy_Broker* CORBA_Object::proxy_broker_ [protected]
 

Pointer to the Proxy Broker i.e. the instance that takes care of getting the right proxy for performing a given call.

Definition at line 271 of file Object.h.

Referenced by _get_component, _get_interface, _non_existent, and CORBA_Object.

CORBA::ULong CORBA_Object::refcount_ [private]
 

Number of outstanding references to this object.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 284 of file Object.h.

Referenced by _add_ref, and _remove_ref.

TAO_SYNCH_MUTEX* 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.

Note:
This assumes that unconstrained objects will not be instantiated in the critical path.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 296 of file Object.h.

Referenced by _add_ref, _remove_ref, and ~CORBA_Object.

TAO_Abstract_ServantBase* CORBA_Object::servant_ [protected]
 

Servant pointer. It is 0 except for collocated objects.

Definition at line 264 of file Object.h.

Referenced by _servant.


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 15:00:58 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002