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

These methods are defined here since they are required by the CORBA spec in a form specified by the C++ mapping.

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".
static CORBA::Object_ptr _duplicate (CORBA::Object_ptr obj)
 Increment the ref count.
static CORBA::Object_ptr _nil (void)
 Return a NULL object.
static 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
static CORBA::Boolean marshal (Object_ptr obj, TAO_OutputCDR &strm)
static void _tao_any_destructor (void *)
 Used in the implementation of CORBA::Any.
static CORBA::Boolean is_nil_i (CORBA::Object_ptr obj)
 Uninlined part of the now-inlined CORBA::is_nil().
static 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

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.


Member Typedef Documentation

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.

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.


Constructor & Destructor Documentation

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

Destructor.

CORBA::Object::Object ( TAO_Stub protocol_proxy,
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.

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

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

Initializing a local object.

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.

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.

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.

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

Increment the ref count.

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.

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

Get info about the object from the Interface Repository.

Reimplemented in CORBA::LocalObject.

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.

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

Get info about the object from the Interface Repository.

Reimplemented in CORBA::LocalObject.

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.

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.

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.

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.

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.

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.

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

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.

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

Is this a local object?

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.

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::Current, CORBA::DomainManager, CORBA::ConstructionPolicy, CORBA::LocalObject, CORBA::Policy, CORBA::PolicyManager, CORBA::PolicyCurrent, and TAO::BufferingConstraintPolicy.

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.

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

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

Reimplemented in CORBA::LocalObject.

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, and TAO_Local_RefCounted_Object.

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

Get the repository id.

Reimplemented in CORBA::LocalObject.

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

DII operation to create a request.

Reimplemented in CORBA::LocalObject.

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

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

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.

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

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

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

Get the underlying stub object.

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.

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.

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

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

Accessor to the flag..

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

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

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.

CORBA::Boolean CORBA::Object::marshal ( Object_ptr  obj,
TAO_OutputCDR strm 
) [static]

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

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

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

Accessor for the ORB_Core..

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

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

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.

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

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

Helper function for reading contents of an IOR.


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!

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

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

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

Specify whether this is a local object or not.

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:

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

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

Number of outstanding references to this object.

Reimplemented in TAO_Local_RefCounted_Object.

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.


The documentation for this class was generated from the following files:
Generated on Wed Apr 19 03:25:54 2006 for TAO by  doxygen 1.4.6-4