CORBA::LocalObject Class Reference

#include <LocalObject.h>

Inheritance diagram for CORBA::LocalObject:

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

Collaboration graph
[legend]
List of all members.

Public Types

typedef LocalObject_ptr _ptr_type
 Useful for template programming.

typedef LocalObject_var _var_type
typedef LocalObject_out _out_type

Public Member Functions

virtual ~LocalObject (void)
 Destructor.

virtual CORBA::Boolean _non_existent (void)
 Always returns false.

virtual CORBA::ImplementationDef_ptr _get_implementation (void)
 Throws CORBA::NO_IMPLEMENT.

virtual CORBA::InterfaceDef_ptr _get_interface (void)
 Gets info about object from the Interface Repository.

virtual CORBA::Object_ptr _get_component (void)
 Throws NO_IMPLEMENT.

virtual char * _repository_id (void)
 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)
 Throws NO_IMPLEMENT.

CORBA::Policy_ptr _get_policy (CORBA::PolicyType type)
 Throws CORBA::NO_IMPLEMENT.

CORBA::Policy_ptr _get_cached_policy (TAO_Cached_Policy_Type type)
 Throws CORBA::NO_IMPLEMENT.

CORBA::Object_ptr _set_policy_overrides (const CORBA::PolicyList &policies, CORBA::SetOverrideType set_add)
 Throws CORBA::NO_IMPLEMENT.

CORBA::PolicyList_get_policy_overrides (const CORBA::PolicyTypeSeq &types)
 Throws CORBA::NO_IMPLEMENT.

CORBA::Boolean _validate_connection (CORBA::PolicyList_out inconsistent_policies)
 Throws CORBA::NO_IMPLEMENT.

virtual CORBA::ULong _hash (CORBA::ULong maximum)
virtual CORBA::Boolean _is_equivalent (CORBA::Object_ptr other_obj)
virtual void _add_ref (void)
 Increment the reference count.

virtual void _remove_ref (void)
 Decrement the reference count.

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

virtual TAO::ObjectKey_key (void)
 Throws CORBA::NO_IMPLEMENT.


Static Public Member Functions

LocalObject_ptr _duplicate (LocalObject_ptr obj)
 Increment the ref count.

LocalObject_ptr _nil (void)
 Return a NIL object.

LocalObject_ptr _narrow (CORBA::Object_ptr obj)

Protected Member Functions

 LocalObject (void)
 Default constructor.


Private Member Functions

Unimplemented methods
 LocalObject (const LocalObject &)
LocalObjectoperator= (const LocalObject &)

Member Typedef Documentation

typedef LocalObject_out CORBA::LocalObject::_out_type
 

Reimplemented from CORBA::Object.

Definition at line 162 of file LocalObject.h.

typedef LocalObject_ptr CORBA::LocalObject::_ptr_type
 

Useful for template programming.

Reimplemented from CORBA::Object.

Definition at line 160 of file LocalObject.h.

typedef LocalObject_var CORBA::LocalObject::_var_type
 

Reimplemented from CORBA::Object.

Definition at line 161 of file LocalObject.h.


Constructor & Destructor Documentation

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

Destructor.

Definition at line 22 of file LocalObject.cpp.

00023 {
00024 }

ACE_INLINE CORBA::LocalObject::LocalObject void   )  [protected]
 

Default constructor.

Make it protected to prevent instantiation of this class.

Definition at line 41 of file LocalObject.inl.

00042   : Object (0)
00043 {
00044 }

CORBA::LocalObject::LocalObject const LocalObject  )  [private]
 


Member Function Documentation

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

Increment the reference count.

Reimplemented from CORBA::Object.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 27 of file LocalObject.cpp.

Referenced by _duplicate().

00028 {
00029   // Do nothing as per CCM spec.
00030 }

void CORBA::LocalObject::_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 from CORBA::Object.

Definition at line 105 of file LocalObject.cpp.

References CORBA::Context_ptr, CORBA::ContextList_ptr, CORBA::ExceptionList_ptr, CORBA::Flags, CORBA::NamedValue_ptr, CORBA::NVList_ptr, and CORBA::Request_ptr.

00113 {
00114   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00115 }

void CORBA::LocalObject::_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 from CORBA::Object.

Definition at line 94 of file LocalObject.cpp.

References CORBA::Context_ptr, CORBA::Flags, CORBA::NamedValue_ptr, CORBA::NVList_ptr, and CORBA::Request_ptr.

00100 {
00101   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00102 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL ACE_INLINE CORBA::LocalObject_ptr CORBA::LocalObject::_duplicate LocalObject_ptr  obj  )  [static]
 

Increment the ref count.

Definition at line 9 of file LocalObject.inl.

References _add_ref(), and CORBA::LocalObject_ptr.

Referenced by _narrow().

00010 {
00011   if (obj)
00012     {
00013       obj->_add_ref ();
00014     }
00015 
00016   return obj;
00017 }

CORBA::Policy_ptr CORBA::LocalObject::_get_cached_policy TAO_Cached_Policy_Type  type  ) 
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 158 of file LocalObject.cpp.

00159 {
00160   throw ::CORBA::NO_IMPLEMENT ();
00161 }

CORBA::Object_ptr CORBA::LocalObject::_get_component void   )  [virtual]
 

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 124 of file LocalObject.cpp.

00125 {
00126   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00127 }

CORBA::ImplementationDef_ptr CORBA::LocalObject::_get_implementation void   )  [virtual]
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 142 of file LocalObject.cpp.

00143 {
00144   throw ::CORBA::NO_IMPLEMENT ();
00145 }

CORBA::InterfaceDef_ptr CORBA::LocalObject::_get_interface void   )  [virtual]
 

Gets info about object from the Interface Repository.

Reimplemented from CORBA::Object.

Definition at line 136 of file LocalObject.cpp.

00137 {
00138   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00139 }

CORBA::ORB_ptr CORBA::LocalObject::_get_orb void   )  [virtual]
 

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

Reimplemented from CORBA::Object.

Definition at line 185 of file LocalObject.cpp.

00186 {
00187   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00188 }

CORBA::Policy_ptr CORBA::LocalObject::_get_policy CORBA::PolicyType  type  ) 
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 152 of file LocalObject.cpp.

References CORBA::PolicyType.

00153 {
00154   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00155 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 171 of file LocalObject.cpp.

References CORBA::PolicyTypeSeq.

00172 {
00173   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00174 }

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

Return a hash value for this object. The hash is based on the address of the object. On non-32 bit platforms, the hash may be non-unique.

Reimplemented from CORBA::Object.

Definition at line 42 of file LocalObject.cpp.

00043 {
00044   // Note that we reinterpret_cast to an "ptrdiff_t" instead of
00045   // CORBA::ULong since we need to first cast to an integer large
00046   // enough to hold an address to avoid compile-time warnings on some
00047   // 64-bit platforms.
00048 
00049   CORBA::ULong const hash =
00050     static_cast<CORBA::ULong> (reinterpret_cast<ptrdiff_t> (this));
00051 
00052   return hash % maximum;
00053 }

CORBA::Boolean CORBA::LocalObject::_is_equivalent CORBA::Object_ptr  other_obj  )  [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 from CORBA::Object.

Definition at line 62 of file LocalObject.cpp.

References CORBA::Object_ptr.

00063 {
00064   return (other_obj == this) ? true : false;
00065 }

TAO::ObjectKey * CORBA::LocalObject::_key void   )  [virtual]
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 71 of file LocalObject.cpp.

References ACE_ERROR, ACE_TEXT, LM_ERROR, and TAO_debug_level.

00072 {
00073   if (TAO_debug_level > 0)
00074     ACE_ERROR ((LM_ERROR,
00075                 ACE_TEXT ("(%P|%t) Cannot get _key from a LocalObject!\n")));
00076 
00077   throw ::CORBA::NO_IMPLEMENT ();
00078 }

ACE_INLINE CORBA::LocalObject_ptr CORBA::LocalObject::_narrow CORBA::Object_ptr  obj  )  [static]
 

Todo:
Narrowing a LocalObject to a CORBA::Object is broken right now. The solution seems to be making CORBA::Object an abstract base class and create a CORBA::RemoteObject for regular object. Or, even easier, add a is_local member into CORBA::Object. I'll take the easier route for now.

Reimplemented from CORBA::Object.

Definition at line 28 of file LocalObject.inl.

References _duplicate(), CORBA::Object::_is_local(), and CORBA::Object_ptr.

00029 {
00030   if (obj->_is_local () != 0)
00031     {
00032       return CORBA::LocalObject::_duplicate (
00033           dynamic_cast<CORBA::LocalObject_ptr> (obj)
00034         );
00035     }
00036 
00037   return 0;
00038 }

ACE_INLINE CORBA::LocalObject_ptr CORBA::LocalObject::_nil void   )  [static]
 

Return a NIL object.

Reimplemented from CORBA::Object.

Definition at line 21 of file LocalObject.inl.

00022 {
00023   return 0;
00024 }

CORBA::Boolean CORBA::LocalObject::_non_existent void   )  [virtual]
 

Always returns false.

Reimplemented from CORBA::Object.

Definition at line 87 of file LocalObject.cpp.

00088 {
00089   // Always return false.
00090   return false;
00091 }

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

Decrement the reference count.

Reimplemented from CORBA::Object.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 33 of file LocalObject.cpp.

00034 {
00035   // Do nothing as per CCM spec.
00036 }

char * CORBA::LocalObject::_repository_id void   )  [virtual]
 

Get the repository id.

Reimplemented from CORBA::Object.

Definition at line 130 of file LocalObject.cpp.

00131 {
00132   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00133 }

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

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 118 of file LocalObject.cpp.

00119 {
00120   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00121 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 164 of file LocalObject.cpp.

References CORBA::PolicyList.

00166 {
00167   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00168 }

CORBA::Boolean CORBA::LocalObject::_validate_connection CORBA::PolicyList_out  inconsistent_policies  ) 
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 177 of file LocalObject.cpp.

00178 {
00179   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00180 }

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


The documentation for this class was generated from the following files:
Generated on Sun Jan 27 13:17:17 2008 for TAO by doxygen 1.3.6