Functions

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

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.

{
  return !(lhs == rhs);
}

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.

{
  const CORBA::ULong lhs_len = lhs.length ();
  const CORBA::ULong rhs_len = rhs.length ();

  if (lhs_len != rhs_len)
    return false;

  for (CORBA::ULong i = 0; i < lhs_len; ++i)
    if (ACE_OS::strcmp (lhs[i].id.in (), rhs[i].id.in ()) != 0
        || ACE_OS::strcmp (lhs[i].kind.in (), rhs[i].kind.in ()) != 0)
      return false;

  return true;
}

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines