Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

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 CORBA_LocalObject_ptr _ptr_type
 Useful for template programming. More...

typedef CORBA_LocalObject_var _var_type

Public Methods

virtual ~CORBA_LocalObject (void)
 Destructor. More...

virtual CORBA::Boolean _non_existent (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Always returns false. More...

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

virtual CORBA_InterfaceDef_ptr _get_interface (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Gets info about object from the Interface Repository. More...

virtual CORBA::Object_ptr _get_component (ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS)
 Throws NO_IMPLEMENT. More...

virtual void _create_request (CORBA::Context_ptr ctx, const CORBA::Char *operation, CORBA::NVList_ptr arg_list, CORBA::NamedValue_ptr result, CORBA::Request_ptr &request, CORBA::Flags req_flags ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual void _create_request (CORBA::Context_ptr ctx, const CORBA::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 ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::Request_ptr _request (const CORBA::Char *operation ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Throws NO_IMPLEMENT. More...

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

CORBA::Policy_ptr _get_client_policy (CORBA::PolicyType type ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 Throws CORBA::NO_IMPLEMENT. More...

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

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

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

virtual CORBA::ULong _hash (CORBA::ULong maximum ACE_ENV_ARG_DECL_WITH_DEFAULTS)
virtual CORBA::Boolean _is_equivalent (CORBA_Object_ptr other_obj ACE_ENV_ARG_DECL_WITH_DEFAULTS) throw ()
virtual void _add_ref (void)
 Increment the reference count. More...

virtual void _remove_ref (void)
 Decrement the reference count. More...

virtual TAO_ObjectKey_key (ACE_ENV_SINGLE_ARG_DECL)
 Throws CORBA::NO_IMPLEMENT. More...


Static Public Methods

CORBA_LocalObject_ptr _duplicate (CORBA_LocalObject_ptr obj)
 Increment the ref count. More...

CORBA_LocalObject_ptr _nil (void)
 Return a NIL object. More...

CORBA_LocalObject_ptr _narrow (CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
CORBA_LocalObject_ptr _unchecked_narrow (CORBA::Object_ptr obj ACE_ENV_ARG_DECL_WITH_DEFAULTS)
 No-op it is just here to simplify some templates. More...


Protected Methods

 CORBA_LocalObject (void)
 Default constructor. More...


Private Methods

Unimplemented methods
 CORBA_LocalObject (const CORBA_LocalObject &)
CORBA_LocalObject & operator= (const CORBA_LocalObject &)

Detailed Description

Note:
NW: It is not clear whether minimum CORBA should support LocalObject or not. I think it should.

Definition at line 37 of file LocalObject.h.


Member Typedef Documentation

typedef CORBA_LocalObject_ptr CORBA_LocalObject::_ptr_type
 

Useful for template programming.

Reimplemented from CORBA_Object.

Reimplemented in TAO_ORBInitInfo.

Definition at line 174 of file LocalObject.h.

typedef CORBA_LocalObject_var CORBA_LocalObject::_var_type
 

Reimplemented from CORBA_Object.

Reimplemented in TAO_ORBInitInfo.

Definition at line 175 of file LocalObject.h.


Constructor & Destructor Documentation

CORBA_LocalObject::~CORBA_LocalObject void    [virtual]
 

Destructor.

Definition at line 20 of file LocalObject.cpp.

00021 {
00022 }

ACE_INLINE CORBA_LocalObject::CORBA_LocalObject void    [protected]
 

Default constructor.

Make it protected to prevent instantiation of this class.

Definition at line 54 of file LocalObject.i.

00055   : CORBA_Object (0)
00056 {
00057 }

CORBA_LocalObject::CORBA_LocalObject const CORBA_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 25 of file LocalObject.cpp.

Referenced by _duplicate.

00026 {
00027   // Do nothing as per CCM spec.
00028 }

void CORBA_LocalObject::_create_request CORBA::Context_ptr    ctx,
const CORBA::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    ACE_ENV_ARG_DECL_WITH_DEFAULTS
[virtual]
 

Definition at line 130 of file LocalObject.cpp.

References ACE_ENV_ARG_DECL, and ACE_THROW.

00139 {
00140   // @@ Correct minor code?  CCM spec says one thing CORBA spec says
00141   //    another!
00142   ACE_THROW (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4,
00143                                   CORBA::COMPLETED_NO));
00144 }

void CORBA_LocalObject::_create_request CORBA::Context_ptr    ctx,
const CORBA::Char   operation,
CORBA::NVList_ptr    arg_list,
CORBA::NamedValue_ptr    result,
CORBA::Request_ptr   request,
CORBA::Flags req_flags    ACE_ENV_ARG_DECL_WITH_DEFAULTS
[virtual]
 

Definition at line 115 of file LocalObject.cpp.

References ACE_ENV_ARG_DECL, and ACE_THROW.

00122 {
00123   // @@ Correct minor code?  CCM spec says one thing CORBA spec says
00124   //    another!
00125   ACE_THROW (CORBA::NO_IMPLEMENT (CORBA::OMGVMCID | 4,
00126                                   CORBA::COMPLETED_NO));
00127 }

ACE_INLINE CORBA_LocalObject_ptr CORBA_LocalObject::_duplicate CORBA_LocalObject_ptr    obj [static]
 

Increment the ref count.

Definition at line 8 of file LocalObject.i.

References _add_ref.

Referenced by CORBA_LocalObject_out::operator=, and CORBA_LocalObject_var::operator=.

00009 {
00010   if (obj)
00011     obj->_add_ref ();
00012   return obj;
00013 }

CORBA::Policy_ptr CORBA_LocalObject::_get_client_policy CORBA::PolicyType type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 211 of file LocalObject.cpp.

References CORBA::Policy::_nil, ACE_ENV_ARG_DECL, and ACE_THROW_RETURN.

00213 {
00214   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00215 }

CORBA::Object_ptr CORBA_LocalObject::_get_component ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Throws NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 158 of file LocalObject.cpp.

References ACE_ENV_SINGLE_ARG_DECL, and ACE_THROW_RETURN.

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

CORBA::ImplementationDef_ptr CORBA_LocalObject::_get_implementation ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 170 of file LocalObject.cpp.

References ACE_ENV_SINGLE_ARG_DECL, and ACE_THROW_RETURN.

00171 {
00172   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00173 }

CORBA_InterfaceDef_ptr CORBA_LocalObject::_get_interface ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Gets info about object from the Interface Repository.

Reimplemented from CORBA_Object.

Definition at line 164 of file LocalObject.cpp.

References ACE_ENV_SINGLE_ARG_DECL, and ACE_THROW_RETURN.

00165 {
00166   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00167 }

CORBA::Policy_ptr CORBA_LocalObject::_get_policy CORBA::PolicyType type    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 203 of file LocalObject.cpp.

References CORBA::Policy::_nil, ACE_ENV_ARG_DECL, and ACE_THROW_RETURN.

00205 {
00206   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (),
00207                     CORBA::Policy::_nil ());
00208 }

CORBA::PolicyList* CORBA_LocalObject::_get_policy_overrides const CORBA::PolicyTypeSeq &types    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

CORBA::ULong CORBA_LocalObject::_hash CORBA::ULong maximum    ACE_ENV_ARG_DECL_WITH_DEFAULTS [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 40 of file LocalObject.cpp.

References ACE_ENV_ARG_DECL_NOT_USED, and ptr_arith_t.

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

CORBA::Boolean CORBA_LocalObject::_is_equivalent CORBA_Object_ptr other_obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS 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.

Definition at line 61 of file LocalObject.cpp.

References ACE_ENV_ARG_DECL_NOT_USED.

00064 {
00065   return (other_obj == this) ? 1 : 0;
00066 }

TAO_ObjectKey * CORBA_LocalObject::_key ACE_ENV_SINGLE_ARG_DECL    [virtual]
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 72 of file LocalObject.cpp.

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

00073 {
00074   ACE_ERROR((LM_ERROR,
00075              ACE_TEXT ("(%P|%t) Cannot get _key froma LocalObject!!!\n")));
00076 
00077   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00078 }

CORBA_LocalObject_ptr CORBA_LocalObject::_narrow CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

@ Narrowing a CORBA_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 in TAO_ORBInitInfo.

ACE_INLINE CORBA_LocalObject_ptr CORBA_LocalObject::_nil void    [static]
 

Return a NIL object.

Reimplemented from CORBA_Object.

Reimplemented in TAO_ORBInitInfo.

Definition at line 18 of file LocalObject.i.

Referenced by CORBA_LocalObject_var::_retn, CORBA_LocalObject_out::CORBA_LocalObject_out, and CORBA_LocalObject_var::out.

00019 {
00020   return 0;
00021 }

CORBA::Boolean CORBA_LocalObject::_non_existent ACE_ENV_SINGLE_ARG_DECL_WITH_DEFAULTS    [virtual]
 

Always returns false.

Reimplemented from CORBA_Object.

Definition at line 108 of file LocalObject.cpp.

References ACE_ENV_SINGLE_ARG_DECL_NOT_USED.

00109 {
00110   // Always return false.
00111   return 0;
00112 }

void CORBA_LocalObject::_remove_ref void    [virtual]
 

Decrement the reference count.

Reimplemented from CORBA_Object.

Reimplemented in TAO_Local_RefCounted_Object.

Definition at line 31 of file LocalObject.cpp.

00032 {
00033   // Do nothing as per CCM spec.
00034 }

virtual CORBA::Request_ptr CORBA_LocalObject::_request const CORBA::Char *operation    ACE_ENV_ARG_DECL_WITH_DEFAULTS [virtual]
 

Throws NO_IMPLEMENT.

CORBA::Object_ptr CORBA_LocalObject::_set_policy_overrides const CORBA::PolicyList   policies,
CORBA::SetOverrideType set_add    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 218 of file LocalObject.cpp.

References CORBA::Policy::_nil, ACE_ENV_ARG_DECL, and ACE_THROW_RETURN.

00221 {
00222   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), CORBA::Policy::_nil ());
00223 }

CORBA_LocalObject_ptr CORBA_LocalObject::_unchecked_narrow CORBA::Object_ptr obj    ACE_ENV_ARG_DECL_WITH_DEFAULTS [static]
 

No-op it is just here to simplify some templates.

Reimplemented in TAO_ORBInitInfo.

CORBA::Boolean CORBA_LocalObject::_validate_connection CORBA::PolicyList_out inconsistent_policies    ACE_ENV_ARG_DECL_WITH_DEFAULTS
 

Throws CORBA::NO_IMPLEMENT.

Reimplemented from CORBA_Object.

Definition at line 233 of file LocalObject.cpp.

References ACE_THROW_RETURN.

00235 {
00236   ACE_THROW_RETURN (CORBA::NO_IMPLEMENT (), 0);
00237 }

CORBA_LocalObject& CORBA_LocalObject::operator= const CORBA_LocalObject &    [private]
 


The documentation for this class was generated from the following files:
Generated on Mon Jun 16 14:58:08 2003 for TAO by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002