PG_Operators.cpp File Reference

#include "orbsvcs/PortableGroup/PG_Operators.h"
#include "ace/OS_NS_string.h"

Include dependency graph for PG_Operators.cpp:

Go to the source code of this file.

Functions

TAO_BEGIN_VERSIONED_NAMESPACE_DECL
bool 
operator== (const CosNaming::Name &lhs, const CosNaming::Name &rhs)
 Global CosNaming::Name equality operator.
bool operator!= (const CosNaming::Name &lhs, const CosNaming::Name &rhs)
 Global CosNaming::Name inequality operator.


Function Documentation

bool operator!= ( const CosNaming::Name lhs,
const CosNaming::Name rhs 
)

Global CosNaming::Name inequality operator.

This simple implementation simply negates the result of the equality operator.

Definition at line 28 of file PG_Operators.cpp.

00029 {
00030   return !(lhs == rhs);
00031 }

TAO_BEGIN_VERSIONED_NAMESPACE_DECL bool operator== ( const CosNaming::Name lhs,
const CosNaming::Name rhs 
)

Global CosNaming::Name equality operator.

Used for checking equality of PortableGroup::Location and PortableGroup::Property variables.

Definition at line 11 of file PG_Operators.cpp.

References ACE_OS::strcmp().

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 }


Generated on Tue Feb 2 17:49:54 2010 for TAO_PortableGroup by  doxygen 1.4.7