summaryrefslogtreecommitdiff
path: root/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp
diff options
context:
space:
mode:
authorOssama Othman <ossama-othman@users.noreply.github.com>2002-06-04 00:11:39 +0000
committerOssama Othman <ossama-othman@users.noreply.github.com>2002-06-04 00:11:39 +0000
commit2958e6cb90bd776240dce36c8c5d633b5251afd0 (patch)
tree4f5e5ade70682f6038c112523ffaa4789e0a7fd6 /TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp
parente70cbda410ac80bcc95220f0816a3faa7170b88f (diff)
downloadATCD-2958e6cb90bd776240dce36c8c5d633b5251afd0.tar.gz
Mon Jun 03 17:10:38 2002 Ossama Othman <ossama@uci.edu>
Diffstat (limited to 'TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp')
-rw-r--r--TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp28
1 files changed, 28 insertions, 0 deletions
diff --git a/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp
new file mode 100644
index 00000000000..b5ed0f7d826
--- /dev/null
+++ b/TAO/orbsvcs/orbsvcs/PortableGroup/PG_Operators.cpp
@@ -0,0 +1,28 @@
+#include "PG_Operators.h"
+
+ACE_RCSID (PortableGroup,
+ PG_Operators,
+ "$Id$")
+
+int
+operator== (const CosNaming::Name & lhs, const CosNaming::Name & rhs)
+{
+ const CORBA::ULong lhs_len = lhs.length ();
+ const CORBA::ULong rhs_len = rhs.length ();
+
+ if (lhs_len != rhs_len)
+ return 0;
+
+ 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 0;
+
+ return 1;
+}
+
+int
+operator!= (const CosNaming::Name & lhs, const CosNaming::Name & rhs)
+{
+ return !(lhs == rhs);
+}