PG_Operators.cpp

Go to the documentation of this file.
00001 #include "orbsvcs/PortableGroup/PG_Operators.h"
00002 #include "ace/OS_NS_string.h"
00003 
00004 ACE_RCSID (PortableGroup,
00005            PG_Operators,
00006            "$Id: PG_Operators.cpp 71526 2006-03-14 06:14:35Z jtc $")
00007 
00008 TAO_BEGIN_VERSIONED_NAMESPACE_DECL
00009 
00010 bool
00011 operator== (const CosNaming::Name & lhs, const CosNaming::Name & rhs)
00012 {
00013   const CORBA::ULong lhs_len = lhs.length ();
00014   const CORBA::ULong rhs_len = rhs.length ();
00015 
00016   if (lhs_len != rhs_len)
00017     return false;
00018 
00019   for (CORBA::ULong i = 0; i < lhs_len; ++i)
00020     if (ACE_OS::strcmp (lhs[i].id.in (), rhs[i].id.in ()) != 0
00021         || ACE_OS::strcmp (lhs[i].kind.in (), rhs[i].kind.in ()) != 0)
00022       return false;
00023 
00024   return true;
00025 }
00026 
00027 bool
00028 operator!= (const CosNaming::Name & lhs, const CosNaming::Name & rhs)
00029 {
00030   return !(lhs == rhs);
00031 }
00032 
00033 TAO_END_VERSIONED_NAMESPACE_DECL

Generated on Sun Jan 27 16:22:30 2008 for TAO_PortableGroup by doxygen 1.3.6