PG_Operators.h File Reference

#include "orbsvcs/PortableGroup/portablegroup_export.h"
#include "orbsvcs/CosNamingC.h"

Include dependency graph for PG_Operators.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

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


Detailed Description

Id
PG_Operators.h 71526 2006-03-14 06:14:35Z jtc

Author:
Ossama Othman <ossama@uci.edu>

Definition in file PG_Operators.h.


Function Documentation

bool TAO_PortableGroup_Export 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 TAO_PortableGroup_Export 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