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 char * _repository_id (void)
 Get the repository id.
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 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 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

static LocalObject_ptr _duplicate (LocalObject_ptr obj)
 Increment the ref count.
static LocalObject_ptr _nil (void)
 Return a NIL object.
static 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 &)

Detailed Description

Definition at line 46 of file LocalObject.h.


Member Typedef Documentation

typedef LocalObject_out CORBA::LocalObject::_out_type

Reimplemented from CORBA::Object.

Definition at line 154 of file LocalObject.h.

typedef LocalObject_ptr CORBA::LocalObject::_ptr_type

Useful for template programming.

Reimplemented from CORBA::Object.

Definition at line 152 of file LocalObject.h.

typedef LocalObject_var CORBA::LocalObject::_var_type

Reimplemented from CORBA::Object.

Definition at line 153 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 40 of file LocalObject.inl.

00041   : Object (0)
00042 {
00043 }

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


Member Function Documentation

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

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00108 {
00109   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00110 }

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

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00095 {
00096   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4, CORBA::COMPLETED_NO);
00097 }

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 CORBA::Object::_add_ref().

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

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

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

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 119 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00120 {
00121   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00122 }

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

Gets info about object from the Interface Repository.

Reimplemented from CORBA::Object.

Definition at line 125 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

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

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

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00170 {
00171   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00172 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 136 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

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

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 155 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00156 {
00157   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00158 }

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

00031 {
00032   // Note that we reinterpret_cast to an "ptrdiff_t" instead of
00033   // CORBA::ULong since we need to first cast to an integer large
00034   // enough to hold an address to avoid compile-time warnings on some
00035   // 64-bit platforms.
00036 
00037   CORBA::ULong const hash =
00038     static_cast<CORBA::ULong> (reinterpret_cast<ptrdiff_t> (this));
00039 
00040   return hash % maximum;
00041 }

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

00051 {
00052   return (other_obj == this) ? true : false;
00053 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 59 of file LocalObject.cpp.

References ACE_ERROR, ACE_TEXT, LM_ERROR, and TAO_debug_level.

00060 {
00061   if (TAO_debug_level > 0)
00062     ACE_ERROR ((LM_ERROR,
00063                 ACE_TEXT ("(%P|%t) Cannot get _key from a LocalObject!\n")));
00064 
00065   throw ::CORBA::NO_IMPLEMENT ();
00066 }

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 CORBA::Object::_is_local().

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

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

00076 {
00077   // Always return false.
00078   return false;
00079 }

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

Get the repository id.

Reimplemented from CORBA::Object.

Definition at line 82 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00083 {
00084   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00085 }

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

Throws NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 113 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

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

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

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00150 {
00151   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00152 }

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

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA::Object.

Definition at line 161 of file LocalObject.cpp.

References CORBA::COMPLETED_NO, and CORBA::OMGVMCID.

00162 {
00163   throw ::CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 8, CORBA::COMPLETED_NO);
00164 }

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


The documentation for this class was generated from the following files:
Generated on Tue Feb 2 17:39:57 2010 for TAO by  doxygen 1.4.7