You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ta...@apache.org on 2013/03/22 23:21:10 UTC
svn commit: r1460032 - in
/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util: ArrayList.h
BitSet.cpp BitSet.h HashMap.h LinkedList.h
Author: tabish
Date: Fri Mar 22 22:21:09 2013
New Revision: 1460032
URL: http://svn.apache.org/r1460032
Log:
Add some missing operators
Modified:
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.cpp
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h
activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h?rev=1460032&r1=1460031&r2=1460032&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/ArrayList.h Fri Mar 22 22:21:09 2013
@@ -107,6 +107,14 @@ namespace util {
return *this;
}
+ bool operator==(const ArrayList<E>& other) const {
+ return this->equals(other);
+ }
+
+ bool operator!=(const ArrayList<E>& other) const {
+ return !this->equals(other);
+ }
+
public:
/**
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.cpp?rev=1460032&r1=1460031&r2=1460032&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.cpp Fri Mar 22 22:21:09 2013
@@ -38,7 +38,7 @@ namespace {
static const int ELM_SIZE = 1 << OFFSET;
static const int RIGHT_BITS = ELM_SIZE - 1;
- static long long TWO_N_ARRAY[64] = {
+ static unsigned long long TWO_N_ARRAY[64] = {
0x0000000000000001ULL, 0x0000000000000002ULL, 0x0000000000000004ULL,
0x0000000000000008ULL, 0x0000000000000010ULL, 0x0000000000000020ULL,
0x0000000000000040ULL, 0x0000000000000080ULL, 0x0000000000000100ULL,
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.h?rev=1460032&r1=1460031&r2=1460032&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/BitSet.h Fri Mar 22 22:21:09 2013
@@ -93,6 +93,26 @@ namespace util {
virtual ~BitSet();
+ /**
+ * Boolean comparison operator ==
+ *
+ * @param other
+ * The other BitSet to compare to this one.
+ */
+ bool operator==(const BitSet& other) const {
+ return this->equals(other);
+ }
+
+ /**
+ * Boolean comparison operator !=
+ *
+ * @param other
+ * The other BitSet to compare to this one.
+ */
+ bool operator!=(const BitSet& other) const {
+ return !this->equals(other);
+ }
+
public:
/**
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h?rev=1460032&r1=1460031&r2=1460032&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/HashMap.h Fri Mar 22 22:21:09 2013
@@ -910,6 +910,16 @@ namespace util {
public:
+ bool operator==(const Map<K, V>& other) const {
+ return this->equals(other);
+ }
+
+ bool operator!=(const Map<K, V>& other) const {
+ return !this->equals(other);
+ }
+
+ public:
+
virtual void clear() {
if (elementCount > 0) {
elementCount = 0;
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h?rev=1460032&r1=1460031&r2=1460032&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/LinkedList.h Fri Mar 22 22:21:09 2013
@@ -130,6 +130,14 @@ namespace util {
return *this;
}
+ bool operator==(const LinkedList<E>& other) const {
+ return this->equals(other);
+ }
+
+ bool operator!=(const LinkedList<E>& other) const {
+ return !this->equals(other);
+ }
+
public:
virtual E get(int index) const {