TAO
2.3.3
|
Implementation of a CORBA object reference. More...
#include <Object.h>
Public Types | |
typedef Object_ptr | _ptr_type |
typedef Object_var | _var_type |
typedef Object_out | _out_type |
Public Member Functions | |
virtual | ~Object (void) |
Destructor. More... | |
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? More... | |
virtual TAO::ObjectKey * | _key (void) |
Object (TAO_Stub *p, CORBA::Boolean collocated=false, TAO_Abstract_ServantBase *servant=0, TAO_ORB_Core *orb_core=0) | |
Constructor. More... | |
Object (IOP::IOR *ior, TAO_ORB_Core *orb_core) | |
virtual TAO_Stub * | _stubobj (void) const |
Get the underlying stub object. More... | |
virtual TAO_Stub * | _stubobj (void) |
virtual void | _proxy_broker (TAO::Object_Proxy_Broker *proxy_broker) |
Set the proxy broker. More... | |
virtual CORBA::Boolean | marshal (TAO_OutputCDR &cdr) |
Allows us to forbid marshaling of local interfaces. More... | |
CORBA::Boolean | is_evaluated (void) const |
Accessor to the flag.. More... | |
TAO_ORB_Core * | orb_core (void) const |
Accessor for the ORB_Core.. More... | |
IOP::IOR * | steal_ior (void) |
Accessors for the underlying IOP::IOR's. More... | |
const IOP::IOR & | ior (void) const |
virtual bool | can_convert_to_ior (void) const |
Can this object be stringified? More... | |
virtual char * | convert_to_ior (bool use_omg_ior_format, const char *ior_prefix) const |
void | _decr_refcount (void) |
Wrapper for _remove_ref(), naming convention for templatizing. More... | |
Reference Count Management | |
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... | |
virtual CORBA::ULong | _refcount_value (void) const |
Get the refcount. More... | |
Static Public Member Functions | |
static CORBA::Boolean | marshal (const Object_ptr x, TAO_OutputCDR &cdr) |
static void | _tao_any_destructor (void *) |
Used in the implementation of CORBA::Any. More... | |
static CORBA::Boolean | is_nil_i (CORBA::Object_ptr obj) |
Uninlined part of the now-inlined CORBA::is_nil(). More... | |
static void | tao_object_initialize (Object *) |
Helper function for reading contents of an IOR. More... | |
Protected Member Functions | |
Object (int dummy=0) | |
Initializing a local object. More... | |
TAO::Object_Proxy_Broker * | proxy_broker () const |
Protected Attributes | |
ACE_Atomic_Op< TAO_SYNCH_MUTEX, unsigned long > | refcount_ |
Number of outstanding references to this object. More... | |
Private Member Functions | |
Object (const Object &) | |
Object & | operator= (const Object &) |
Private Attributes | |
CORBA::Boolean | is_local_ |
Specify whether this is a local object or not. More... | |
CORBA::Boolean | is_evaluated_ |
Flag to indicate whether the IOP::IOR has been evaluated fully. More... | |
IOP::IOR_var | ior_ |
TAO_ORB_Core * | orb_core_ |
Cached pointer of our ORB_Core. More... | |
TAO_Stub * | protocol_proxy_ |
TAO_SYNCH_MUTEX | object_init_lock_ |
Protect reference count manipulation from race conditions. More... | |
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". More... | |
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) |
virtual CORBA::Boolean | _non_existent (void) |
Determine if we are of the type specified by the "logical_type_id". More... | |
virtual InterfaceDef_ptr | _get_interface (void) |
Get info about the object from the Interface Repository. More... | |
virtual CORBA::Object_ptr | _get_component (void) |
Get info about the object from the Interface Repository. More... | |
virtual char * | _repository_id (void) |
Get the repository id. 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) |
Determine if we are of the type specified by the "logical_type_id". More... | |
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". More... | |
virtual CORBA::Request_ptr | _request (const char *operation) |
DII operation to create a request. More... | |
CORBA::Policy_ptr | _get_policy (CORBA::PolicyType type) |
Determine if we are of the type specified by the "logical_type_id". More... | |
CORBA::Policy_ptr | _get_cached_policy (TAO_Cached_Policy_Type type) |
Determine if we are of the type specified by the "logical_type_id". More... | |
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". More... | |
CORBA::PolicyList * | _get_policy_overrides (const CORBA::PolicyTypeSeq &types) |
Determine if we are of the type specified by the "logical_type_id". More... | |
CORBA::Boolean | _validate_connection (CORBA::PolicyList_out inconsistent_policies) |
Determine if we are of the type specified by the "logical_type_id". More... | |
virtual CORBA::ORB_ptr | _get_orb (void) |
Determine if we are of the type specified by the "logical_type_id". More... | |
static CORBA::Object_ptr | _duplicate (CORBA::Object_ptr obj) |
Increment the ref count. More... | |
static CORBA::Object_ptr | _nil (void) |
Return a NULL object. More... | |
static CORBA::Object_ptr | _narrow (CORBA::Object_ptr obj) |
No-op it is just here to simplify some templates. More... | |
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.
typedef Object_out CORBA::Object::_out_type |
typedef Object_ptr CORBA::Object::_ptr_type |
typedef Object_var CORBA::Object::_var_type |
|
virtual |
Destructor.
CORBA::Object::Object | ( | TAO_Stub * | p, |
CORBA::Boolean | collocated = false , |
||
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 | ||
) |
|
protected |
Initializing a local object.
|
private |
|
virtual |
Increment the reference count.
|
virtual |
Determine if we are of the type specified by the "logical_type_id".
Reimplemented in CORBA::LocalObject.
|
virtual |
Determine if we are of the type specified by the "logical_type_id".
Reimplemented in CORBA::LocalObject.
void CORBA::Object::_decr_refcount | ( | void | ) |
Wrapper for _remove_ref(), naming convention for templatizing.
|
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".
|
virtual |
Get info about the object from the Interface Repository.
Reimplemented in CORBA::LocalObject.
|
virtual |
Get info about the object from the Interface Repository.
Reimplemented in CORBA::LocalObject.
|
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".
CORBA::PolicyList * CORBA::Object::_get_policy_overrides | ( | const CORBA::PolicyTypeSeq & | types | ) |
Determine if we are of the type specified by the "logical_type_id".
|
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.
|
virtual |
The repository ID for the most derived class, this is an implementation method and does no remote invocations!
|
virtual |
Determine if we are of the type specified by the "logical_type_id".
|
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
|
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.
|
virtual |
Is this a local object?
|
virtual |
Return the object key as an out parameter. Caller should release return value when finished with it.
Reimplemented in CORBA::LocalObject.
|
static |
No-op it is just here to simplify some templates.
|
static |
Return a NULL object.
|
virtual |
Determine if we are of the type specified by the "logical_type_id".
Reimplemented in CORBA::LocalObject.
|
virtual |
Set the proxy broker.
|
virtual |
Get the refcount.
|
virtual |
Decrement the reference count.
|
virtual |
Get the repository id.
Reimplemented in CORBA::LocalObject.
|
virtual |
DII operation to create a request.
Reimplemented in CORBA::LocalObject.
|
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".
|
virtual |
Get the underlying stub object.
|
virtual |
|
static |
Used in the implementation of CORBA::Any.
CORBA::Boolean CORBA::Object::_validate_connection | ( | CORBA::PolicyList_out | inconsistent_policies | ) |
Determine if we are of the type specified by the "logical_type_id".
|
virtual |
Can this object be stringified?
|
virtual |
A hook to allow users to provide custom object stringification.
const IOP::IOR & CORBA::Object::ior | ( | void | ) | const |
CORBA::Boolean CORBA::Object::is_evaluated | ( | void | ) | const |
Accessor to the flag..
|
static |
Uninlined part of the now-inlined CORBA::is_nil().
|
static |
Marshalling operator used by the stub code. A long story why the stub code uses this, let us keep it short here.
|
virtual |
Allows us to forbid marshaling of local interfaces.
TAO_ORB_Core * CORBA::Object::orb_core | ( | void | ) | const |
Accessor for the ORB_Core..
|
protected |
Convenience accessor for the object proxy broker of the underlying stub.
IOP::IOR * CORBA::Object::steal_ior | ( | void | ) |
|
static |
Helper function for reading contents of an IOR.
|
private |
If the IOR hasnt been evaluated fully, then the contents of the IOR that we received should be in here!
|
private |
Flag to indicate whether the IOP::IOR has been evaluated fully.
|
private |
Specify whether this is a local object or not.
|
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.
|
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:
|
private |
Pointer to the protocol-specific "object" containing important profiling information regarding this proxy. The protocol proxy is (potentially) shared among several Objects
|
protected |
Number of outstanding references to this object.