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 ()
 Always returns false.

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

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

virtual CORBA::Object_ptr _get_component ()
 Throws NO_IMPLEMENT.

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)
 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) throw ()
virtual void _add_ref (void)
 Increment the reference count.

virtual void _remove_ref (void)
 Decrement the reference count.

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

virtual TAO::ObjectKey_key ()
 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 189 of file LocalObject.h.

typedef LocalObject_ptr CORBA::LocalObject::_ptr_type
 

Useful for template programming.

Reimplemented from CORBA::Object.

Definition at line 187 of file LocalObject.h.

typedef LocalObject_var CORBA::LocalObject::_var_type
 

Reimplemented from CORBA::Object.

Definition at line 188 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 42 of file LocalObject.i.

00043   : Object (0)
00044 {
00045 }

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 110 of file LocalObject.cpp.

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

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

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 97 of file LocalObject.cpp.

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

00104 {
00105   ACE_THROW (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4,
00106                                   CORBA::COMPLETED_NO));
00107 }

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.i.

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 177 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00179 {
00180   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00181 }

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

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 134 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00135 {
00136   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00137                                          CORBA::COMPLETED_NO),
00138                     0);
00139 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 158 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00159 {
00160   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00161 }

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

Gets info about object from the Interface Repository.

Reimplemented from CORBA::Object.

Definition at line 150 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00151 {
00152   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00153                                          CORBA::COMPLETED_NO),
00154                     0);
00155 }

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

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

Reimplemented from CORBA::Object.

Definition at line 214 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00215 {
00216   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00217                                          CORBA::COMPLETED_NO),
00218                     0);
00219 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 168 of file LocalObject.cpp.

References ACE_THROW_RETURN, and CORBA::PolicyType.

00170 {
00171   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00172                                          CORBA::COMPLETED_NO),
00173                     0);
00174 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 194 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00196 {
00197   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00198                                          CORBA::COMPLETED_NO),
00199                     0);
00200 }

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.

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

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

Definition at line 63 of file LocalObject.cpp.

References CORBA::Object_ptr.

00066 {
00067   return (other_obj == this) ? true : false;
00068 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 74 of file LocalObject.cpp.

References ACE_ERROR, ACE_TEXT, ACE_THROW_RETURN, LM_ERROR, and TAO_debug_level.

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

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.i.

References _duplicate(), and CORBA::Object_ptr.

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

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.i.

00022 {
00023   return 0;
00024 }

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

Always returns false.

Reimplemented from CORBA::Object.

Definition at line 90 of file LocalObject.cpp.

00091 {
00092   // Always return false.
00093   return false;
00094 }

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

Get the repository id.

Reimplemented from CORBA::Object.

Definition at line 142 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00143 {
00144   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00145                                          CORBA::COMPLETED_NO),
00146                     0);
00147 }

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

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 125 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00127 {
00128   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4,
00129                                          CORBA::COMPLETED_NO),
00130                     0);
00131 }

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 184 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00187 {
00188   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00189                                          CORBA::COMPLETED_NO),
00190                     0);
00191 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 203 of file LocalObject.cpp.

References ACE_THROW_RETURN, and CORBA::PolicyList_out.

00205 {
00206   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8,
00207                                          CORBA::COMPLETED_NO),
00208                     false);
00209 }

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


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