PG_Operators.h File Reference

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

Include dependency graph for PG_Operators.h:

Include dependency graph

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

Included by dependency graph

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

PG_Operators.h,v 1.9 2006/03/14 06:14:34 jtc Exp

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 Thu Nov 9 14:04:10 2006 for TAO_PortableGroup by doxygen 1.3.6