Public Member Functions

TAO::Less_Than_ObjectKey Class Reference

Compares the length and then the contents of ObjectKeys. More...

#include <ObjectKey_Table.h>

List of all members.

Public Member Functions

bool operator() (const TAO::ObjectKey &lhs, const TAO::ObjectKey &rhs) const

Detailed Description

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.


Member Function Documentation

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;
}


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