Compares the length and then the contents of ObjectKeys. More...
#include <ObjectKey_Table.h>
Public Member Functions | |
| bool | operator() (const TAO::ObjectKey &lhs, const TAO::ObjectKey &rhs) const |
Compares the length and then the contents of ObjectKeys.
Should have been a specialization of the functor ACE_Less_Than<sequence<CORBA::Octet>>. But that will not work so easily across bunch of stuff. Hence let us put up with this for the time being.
Definition at line 50 of file ObjectKey_Table.h.
| bool TAO::Less_Than_ObjectKey::operator() | ( | const TAO::ObjectKey & | lhs, | |
| const TAO::ObjectKey & | rhs | |||
| ) | const |
Definition at line 15 of file ObjectKey_Table.cpp.
{
const CORBA::ULong rlen = rhs.length ();
const CORBA::ULong llen = lhs.length ();
if (llen < rlen)
{
return 1;
}
else if (llen > rlen)
{
return 0;
}
const CORBA::Octet * rhs_buff = rhs.get_buffer ();
const CORBA::Octet * lhs_buff = lhs.get_buffer ();
const bool result = (ACE_OS::memcmp (lhs_buff, rhs_buff, rlen) < 0);
return result;
}
1.7.0