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

int 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

TAO_BEGIN_VERSIONED_NAMESPACE_DECL int TAO::Less_Than_ObjectKey::operator() const TAO::ObjectKey lhs,
const TAO::ObjectKey rhs
const
 

Definition at line 15 of file ObjectKey_Table.cpp.

References TAO::unbounded_value_sequence< T >::length().

00017 {
00018   if (lhs.length () < rhs.length ())
00019     {
00020       return 1;
00021     }
00022   else if (lhs.length () > rhs.length ())
00023     {
00024       return 0;
00025     }
00026 
00027   for (CORBA::ULong i = 0; i < rhs.length (); ++i)
00028     {
00029       if (lhs[i] < rhs[i])
00030         {
00031           return 1;
00032         }
00033       else if (lhs[i] > rhs[i])
00034         {
00035           return 0;
00036         }
00037     }
00038 
00039   return 0;
00040 }


The documentation for this class was generated from the following files:
Generated on Thu Nov 9 12:26:34 2006 for TAO by doxygen 1.3.6