Public Member Functions | Private Attributes | Friends

TAO_UIOP_Endpoint Class Reference

TAO_UIOP_Endpoint. More...

#include <UIOP_Endpoint.h>

Inheritance diagram for TAO_UIOP_Endpoint:
Inheritance graph
[legend]
Collaboration diagram for TAO_UIOP_Endpoint:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 TAO_UIOP_Endpoint (void)
 Default constructor.
 TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr, CORBA::Short priority=TAO_INVALID_PRIORITY)
 Constructor.
 ~TAO_UIOP_Endpoint (void)
 Destructor.
const ACE_UNIX_Addrobject_addr (void) const
 Return a reference to the <object_addr>.
const char * rendezvous_point (void) const
TAO_Endpoint Methods

Please check the documentation in Endpoint.h for details.

virtual TAO_Endpointnext (void)
virtual int addr_to_string (char *buffer, size_t length)
virtual TAO_Endpointduplicate (void)
CORBA::Boolean is_equivalent (const TAO_Endpoint *other_endpoint)
virtual CORBA::ULong hash (void)
 Return a hash value for this object.

Private Attributes

ACE_UNIX_Addr object_addr_
TAO_UIOP_Endpointnext_

Friends

class TAO_UIOP_Profile

Detailed Description

TAO_UIOP_Endpoint.

UIOP-specific implementation of PP Framework Endpoint interface.

Definition at line 40 of file UIOP_Endpoint.h.


Constructor & Destructor Documentation

TAO_UIOP_Endpoint::TAO_UIOP_Endpoint ( void   ) 

Default constructor.

Definition at line 31 of file UIOP_Endpoint.cpp.

TAO_UIOP_Endpoint::TAO_UIOP_Endpoint ( const ACE_UNIX_Addr addr,
CORBA::Short  priority = TAO_INVALID_PRIORITY 
)

Constructor.

Definition at line 23 of file UIOP_Endpoint.cpp.

TAO_UIOP_Endpoint::~TAO_UIOP_Endpoint ( void   ) 

Destructor.

Definition at line 38 of file UIOP_Endpoint.cpp.

{
}


Member Function Documentation

int TAO_UIOP_Endpoint::addr_to_string ( char *  buffer,
size_t  length 
) [virtual]

Return true if this endpoint is equivalent to <other_endpoint>. Two endpoints are equivalent iff their rendezvous points are the same.

Implements TAO_Endpoint.

Definition at line 43 of file UIOP_Endpoint.cpp.

{
  if (length < (ACE_OS::strlen (this->rendezvous_point ()) + 1))
    return -1;

  ACE_OS::strcpy (buffer, this->rendezvous_point ());

  return 0;
}

TAO_Endpoint * TAO_UIOP_Endpoint::duplicate ( void   )  [virtual]

Return true if this endpoint is equivalent to <other_endpoint>. Two endpoints are equivalent iff their rendezvous points are the same.

Implements TAO_Endpoint.

Definition at line 60 of file UIOP_Endpoint.cpp.

{
  TAO_UIOP_Endpoint *endpoint = 0;
  ACE_NEW_RETURN (endpoint,
                  TAO_UIOP_Endpoint (this->object_addr_,
                                     this->priority ()),
                  0);

  return endpoint;
}

CORBA::ULong TAO_UIOP_Endpoint::hash ( void   )  [virtual]

Return a hash value for this object.

Implements TAO_Endpoint.

Definition at line 86 of file UIOP_Endpoint.cpp.

{
  if (this->hash_val_ != 0)
    return this->hash_val_;

  {
    ACE_GUARD_RETURN (TAO_SYNCH_MUTEX,
                      guard,
                      this->addr_lookup_lock_,
                      this->hash_val_);
    // .. DCL
    if (this->hash_val_ != 0)
      return this->hash_val_;

    this->hash_val_ =
      ACE::hash_pjw (this->rendezvous_point ());
  }

  return this->hash_val_;
}

CORBA::Boolean TAO_UIOP_Endpoint::is_equivalent ( const TAO_Endpoint other_endpoint  )  [virtual]

Return true if this endpoint is equivalent to <other_endpoint>. Two endpoints are equivalent iff their rendezvous points are the same.

Implements TAO_Endpoint.

Definition at line 72 of file UIOP_Endpoint.cpp.

{
  TAO_Endpoint *endpt = const_cast<TAO_Endpoint *> (other_endpoint);

  TAO_UIOP_Endpoint *endpoint = dynamic_cast<TAO_UIOP_Endpoint *> (endpt);

  if (endpoint == 0)
    return 0;

  return ACE_OS::strcmp (this->rendezvous_point (),
                         endpoint->rendezvous_point ()) == 0;
}

TAO_Endpoint * TAO_UIOP_Endpoint::next ( void   )  [virtual]

Return true if this endpoint is equivalent to <other_endpoint>. Two endpoints are equivalent iff their rendezvous points are the same.

Implements TAO_Endpoint.

Definition at line 54 of file UIOP_Endpoint.cpp.

{
  return this->next_;
}

const ACE_UNIX_Addr& TAO_UIOP_Endpoint::object_addr ( void   )  const

Return a reference to the <object_addr>.

const char* TAO_UIOP_Endpoint::rendezvous_point ( void   )  const

Return a pointer to the rendezvous point string. This object maintains ownership of the returned string.


Friends And Related Function Documentation

friend class TAO_UIOP_Profile [friend]

Definition at line 44 of file UIOP_Endpoint.h.


Member Data Documentation

UIOP Endpoints can be stringed into a list. Return the next endpoint in the list, if any.

Definition at line 93 of file UIOP_Endpoint.h.

Cached instance of <ACE_UNIX_Addr> for use in making invocations, etc.

Definition at line 89 of file UIOP_Endpoint.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines