blob: 29db9835b3c9680757c8bd77031e3cc5b030e2d1 (
plain)
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
|
// -*- C++ -*-
//
// $Id$
ACE_INLINE int
TAO_LB_Replica_Equal_To::operator() (
const CORBA::Object_ptr &lhs,
const CORBA::Object_ptr &rhs) const
{
// As with all CORBA objects, the
// CORBA::Object::_is_equivalent() returns 1 if two
// references refer to the same object. However, it is possible
// that is_equivalent() may return 0 even if both references refer
// to the same object.
return lhs->_is_equivalent (rhs);
}
ACE_INLINE int
TAO_LB_Location_Equal_To::operator() (
const TAO_LoadBalancing::Location &lhs,
const TAO_LoadBalancing::Location &rhs) const
{
size_t lhs_length = lhs.length ();
size_t rhs_length = rhs.length ();
if (lhs_length != rhs_length)
return 0;
for (size_t i = 0; i < lhs_length; ++i)
if (ACE_OS::strcmp (lhs[i].id, rhs[i].id) != 0
|| ACE_OS::strcmp (lhs[i].kind), rhs[i].kind != 0)
return 0;
return 1;
}
|