1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
// This may look like C, but it's really -*- C++ -*-
// $Id$
#include "UIOP_Endpoint.h"
#include "UIOP_Connection_Handler.h"
#if TAO_HAS_UIOP == 1
#include "tao/debug.h"
ACE_RCSID(Strategies, UIOP_Endpoint, "$Id$")
#if !defined (__ACE_INLINE__)
# include "UIOP_Endpoint.i"
#endif /* __ACE_INLINE__ */
TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (const ACE_UNIX_Addr &addr)
: TAO_Endpoint (TAO_TAG_UIOP_PROFILE),
object_addr_ (addr),
next_ (0)
{
}
TAO_UIOP_Endpoint::TAO_UIOP_Endpoint (void)
: TAO_Endpoint (TAO_TAG_UIOP_PROFILE),
object_addr_ (),
next_ (0)
{
}
TAO_UIOP_Endpoint::~TAO_UIOP_Endpoint (void)
{
}
int
TAO_UIOP_Endpoint::addr_to_string (char *buffer, size_t length)
{
if (length < (ACE_OS::strlen (this->rendezvous_point ()) + 1))
return -1;
ACE_OS::strcpy (buffer, this->rendezvous_point ());
return 0;
}
void
TAO_UIOP_Endpoint::reset_hint (void)
{
// if (this->hint_)
//this->hint_->cleanup_hint ((void **) &this->hint_);
}
TAO_Endpoint *
TAO_UIOP_Endpoint::next (void)
{
return this->next_;
}
TAO_Endpoint *
TAO_UIOP_Endpoint::duplicate (void)
{
TAO_UIOP_Endpoint *endpoint = 0;
ACE_NEW_RETURN (endpoint,
TAO_UIOP_Endpoint (this->object_addr_),
0);
return endpoint;
}
CORBA::Boolean
TAO_UIOP_Endpoint::is_equivalent (const TAO_Endpoint *other_endpoint)
{
TAO_Endpoint *endpt = ACE_const_cast (TAO_Endpoint *,
other_endpoint);
TAO_UIOP_Endpoint *endpoint = ACE_dynamic_cast (TAO_UIOP_Endpoint *,
endpt);
if (endpoint == 0)
return 0;
return
ACE_OS::strcmp (this->rendezvous_point (),
endpoint->rendezvous_point ()) == 0;
}
CORBA::ULong
TAO_UIOP_Endpoint::hash (void)
{
return ACE::hash_pjw (this->rendezvous_point ());
}
#endif /* TAO_HAS_UIOP == 1 */
|