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 2010/07/29 17:30:47 UTC

svn commit: r980472 - in /activemq/activemq-cpp/trunk/activemq-cpp/src: main/activemq/transport/failover/ main/activemq/util/ main/activemq/wireformat/openwire/marshal/ main/decaf/util/ main/decaf/util/concurrent/ test/decaf/util/

Author: tabish
Date: Thu Jul 29 15:30:46 2010
New Revision: 980472

URL: http://svn.apache.org/viewvc?rev=980472&view=rev
Log:
Update the interface on some of the Collections object to make them all a bit more consistent.  Fix some warnings

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Collection.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/List.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlMap.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/BlockingQueue.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ConcurrentStlMap.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/SynchronousQueue.h
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/ListTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PriorityQueueTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/SetTest.cpp
    activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/StlMapTest.cpp

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/transport/failover/FailoverTransport.cpp Thu Jul 29 15:30:46 2010
@@ -568,7 +568,7 @@ void FailoverTransport::updateURIs( bool
 
             StlSet<URI> set;
 
-            for( std::size_t i = 0; i < updatedURIs.size(); i++ ) {
+            for( int i = 0; i < updatedURIs.size(); i++ ) {
                 set.add( updatedURIs.get(i) );
             }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.cpp Thu Jul 29 15:30:46 2010
@@ -52,7 +52,7 @@ std::string PrimitiveList::toString() co
 
     stream << "Begin Class PrimitiveList:" << std::endl;
 
-    for( std::size_t i = 0; i < this->size(); ++i ) {
+    for( int i = 0; i < this->size(); ++i ) {
         stream << "list[" << i << "] = "
                << this->get( i ).toString() << std::endl;
     }
@@ -63,14 +63,14 @@ std::string PrimitiveList::toString() co
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-bool PrimitiveList::getBool( std::size_t index ) const {
+bool PrimitiveList::getBool( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<bool>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setBool( std::size_t index, bool value ) {
+void PrimitiveList::setBool( int index, bool value ) {
 
     PrimitiveValueNode node;
     node.setBool( value );
@@ -79,14 +79,14 @@ void PrimitiveList::setBool( std::size_t
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-unsigned char PrimitiveList::getByte( std::size_t index ) const {
+unsigned char PrimitiveList::getByte( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<unsigned char>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setByte( std::size_t index, unsigned char value ) {
+void PrimitiveList::setByte( int index, unsigned char value ) {
 
     PrimitiveValueNode node;
     node.setByte( value );
@@ -95,14 +95,14 @@ void PrimitiveList::setByte( std::size_t
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-char PrimitiveList::getChar( std::size_t index ) const {
+char PrimitiveList::getChar( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<char>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setChar( std::size_t index, char value ) {
+void PrimitiveList::setChar( int index, char value ) {
 
     PrimitiveValueNode node;
     node.setChar( value );
@@ -111,14 +111,14 @@ void PrimitiveList::setChar( std::size_t
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-short PrimitiveList::getShort( std::size_t index ) const {
+short PrimitiveList::getShort( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<short>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setShort( std::size_t index, short value ) {
+void PrimitiveList::setShort( int index, short value ) {
 
     PrimitiveValueNode node;
     node.setShort( value );
@@ -127,14 +127,14 @@ void PrimitiveList::setShort( std::size_
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-int PrimitiveList::getInt( std::size_t index ) const {
+int PrimitiveList::getInt( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<int>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setInt( std::size_t index, int value ) {
+void PrimitiveList::setInt( int index, int value ) {
 
     PrimitiveValueNode node;
     node.setInt( value );
@@ -143,14 +143,14 @@ void PrimitiveList::setInt( std::size_t 
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-long long PrimitiveList::getLong( std::size_t index ) const {
+long long PrimitiveList::getLong( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<long long>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setLong( std::size_t index, long long value ) {
+void PrimitiveList::setLong( int index, long long value ) {
 
     PrimitiveValueNode node;
     node.setLong( value );
@@ -159,14 +159,14 @@ void PrimitiveList::setLong( std::size_t
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-double PrimitiveList::getDouble( std::size_t index ) const {
+double PrimitiveList::getDouble( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<double>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setDouble( std::size_t index, double value ) {
+void PrimitiveList::setDouble( int index, double value ) {
 
     PrimitiveValueNode node;
     node.setDouble( value );
@@ -175,14 +175,14 @@ void PrimitiveList::setDouble( std::size
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-float PrimitiveList::getFloat( std::size_t index ) const {
+float PrimitiveList::getFloat( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<float>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setFloat( std::size_t index, float value ) {
+void PrimitiveList::setFloat( int index, float value ) {
 
     PrimitiveValueNode node;
     node.setFloat( value );
@@ -191,14 +191,14 @@ void PrimitiveList::setFloat( std::size_
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-string PrimitiveList::getString( std::size_t index ) const {
+string PrimitiveList::getString( int index ) const {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert<std::string>( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setString( std::size_t index, const string& value ) {
+void PrimitiveList::setString( int index, const string& value ) {
 
     PrimitiveValueNode node;
     node.setString( value );
@@ -207,14 +207,14 @@ void PrimitiveList::setString( std::size
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-std::vector<unsigned char> PrimitiveList::getByteArray( std::size_t index ) const  {
+std::vector<unsigned char> PrimitiveList::getByteArray( int index ) const  {
 
     PrimitiveValueNode node = this->get( index );
     return converter.convert< std::vector<unsigned char> >( node );
 }
 
 ////////////////////////////////////////////////////////////////////////////////
-void PrimitiveList::setByteArray( std::size_t index, const std::vector<unsigned char>& value ) {
+void PrimitiveList::setByteArray( int index, const std::vector<unsigned char>& value ) {
 
     PrimitiveValueNode node;
     node.setByteArray( value );

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/util/PrimitiveList.h Thu Jul 29 15:30:46 2010
@@ -74,7 +74,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual bool getBool( std::size_t index ) const;
+        virtual bool getBool( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -85,7 +85,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setBool( std::size_t index, bool value );
+        virtual void setBool( int index, bool value );
 
         /**
          * Gets the Byte value at the specified index.
@@ -95,7 +95,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual unsigned char getByte( std::size_t index ) const;
+        virtual unsigned char getByte( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -106,7 +106,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setByte( std::size_t index, unsigned char value );
+        virtual void setByte( int index, unsigned char value );
 
         /**
          * Gets the Character value at the specified index.
@@ -116,7 +116,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual char getChar( std::size_t index ) const;
+        virtual char getChar( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -127,7 +127,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setChar( std::size_t index, char value );
+        virtual void setChar( int index, char value );
 
         /**
          * Gets the Short value at the specified index.
@@ -137,7 +137,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual short getShort( std::size_t index ) const;
+        virtual short getShort( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -148,7 +148,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setShort( std::size_t index, short value );
+        virtual void setShort( int index, short value );
 
         /**
          * Gets the Integer value at the specified index.
@@ -158,7 +158,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual int getInt( std::size_t index ) const;
+        virtual int getInt( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -169,7 +169,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setInt( std::size_t index, int value );
+        virtual void setInt( int index, int value );
 
         /**
          * Gets the Long value at the specified index.
@@ -179,7 +179,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual long long getLong( std::size_t index ) const;
+        virtual long long getLong( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -190,7 +190,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setLong( std::size_t index, long long value );
+        virtual void setLong( int index, long long value );
 
         /**
          * Gets the Float value at the specified index.
@@ -200,7 +200,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual float getFloat( std::size_t index ) const;
+        virtual float getFloat( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -211,7 +211,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setFloat( std::size_t index, float value );
+        virtual void setFloat( int index, float value );
 
         /**
          * Gets the Double value at the specified index.
@@ -221,7 +221,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual double getDouble( std::size_t index ) const;
+        virtual double getDouble( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -232,7 +232,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setDouble( std::size_t index, double value );
+        virtual void setDouble( int index, double value );
 
         /**
          * Gets the String value at the specified index.
@@ -242,7 +242,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual std::string getString( std::size_t index ) const;
+        virtual std::string getString( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -253,7 +253,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setString( std::size_t index, const std::string& value );
+        virtual void setString( int index, const std::string& value );
 
         /**
          * Gets the Byte Array value at the specified index.
@@ -263,7 +263,7 @@ namespace util{
          * @throw UnsupportedOperationException if the type at index is not of the
          * type that this method is to return or can convert to.
          */
-        virtual std::vector<unsigned char> getByteArray( std::size_t index ) const;
+        virtual std::vector<unsigned char> getByteArray( int index ) const;
 
         /**
          * Sets the value at the given index to the new value specified,
@@ -274,7 +274,7 @@ namespace util{
          * @param value - the new value to assign to the element at index
          * @throw IndexOutOfBoundsException if index > size().
          */
-        virtual void setByteArray( std::size_t index, const std::vector<unsigned char>& value );
+        virtual void setByteArray( int index, const std::vector<unsigned char>& value );
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/PrimitiveTypesMarshaller.cpp Thu Jul 29 15:30:46 2010
@@ -213,7 +213,7 @@ void PrimitiveTypesMarshaller::marshalPr
     try{
         dataOut.writeInt( (int)list.size() );
 
-        for( std::size_t ix = 0; ix < list.size(); ++ix ) {
+        for( int ix = 0; ix < list.size(); ++ix ) {
             marshalPrimitive( dataOut, list.get( ix ) );
         }
     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Collection.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Collection.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Collection.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Collection.h Thu Jul 29 15:30:46 2010
@@ -201,7 +201,7 @@ namespace util{
          * contains more than Integer.MAX_VALUE elements, returns Integer.MAX_VALUE.
          * @returns the number of elements in this collection
          */
-        virtual std::size_t size() const = 0;
+        virtual int size() const = 0;
 
         /**
          * Returns an array containing all of the elements in this collection. If

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/List.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/List.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/List.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/List.h Thu Jul 29 15:30:46 2010
@@ -69,8 +69,8 @@ namespace util{
          * @throws IndexOutOfBoundsException if the index is out of range
          *         (index < 0 || index > size())
          */
-        virtual ListIterator<E>* listIterator( std::size_t index ) = 0;
-        virtual ListIterator<E>* listIterator( std::size_t index ) const = 0;
+        virtual ListIterator<E>* listIterator( int index ) = 0;
+        virtual ListIterator<E>* listIterator( int index ) const = 0;
 
         /**
          * Returns the index of the first occurrence of the specified element in
@@ -83,7 +83,7 @@ namespace util{
          * this list,
          * @throw NoSuchElementException if value is not in the list
          */
-        virtual std::size_t indexOf( const E& value ) = 0;
+        virtual int indexOf( const E& value ) = 0;
 
         /**
          * Returns the index of the last occurrence of the specified element in
@@ -96,14 +96,14 @@ namespace util{
          * this list.
          * @throw NoSuchElementException if value is not in the list
          */
-        virtual size_t lastIndexOf( const E& value ) = 0;
+        virtual int lastIndexOf( const E& value ) = 0;
 
         /**
          * Gets the element contained at position passed
          * @param index - position to get
          * @return value at index
          */
-        virtual E get( std::size_t index ) const = 0;
+        virtual E get( int index ) const = 0;
 
         /**
          * Replaces the element at the specified position in this list with the
@@ -114,7 +114,7 @@ namespace util{
          * @return the element previously at the specified position
          * @throw IndexOutOfBoundsException - if the index is greater than size
          */
-        virtual E set( std::size_t index, const E& element ) = 0;
+        virtual E set( int index, const E& element ) = 0;
 
         /**
          * Inserts the specified element at the specified position in this list.
@@ -127,7 +127,7 @@ namespace util{
          * @throw IndexOutOfBoundsException - if the index is greater than size
          * @throw UnsupportedOperationException - If the collection is non-modifiable.
          */
-        virtual void add( std::size_t index, const E& element ) = 0;
+        virtual void add( int index, const E& element ) = 0;
 
         /**
          * Inserts all of the elements in the specified collection into this list at
@@ -149,7 +149,7 @@ namespace util{
          * @throw IndexOutOfBoundsException - if the index is greater than size
          * @throw UnsupportedOperationException - If the collection is non-modifiable.
          */
-        virtual bool addAll( std::size_t index, const Collection<E>& source ) = 0;
+        virtual bool addAll( int index, const Collection<E>& source ) = 0;
 
         /**
          * Removes the element at the specified position in this list.
@@ -161,7 +161,7 @@ namespace util{
          * @throw IndexOutOfBoundsException - if the index is greater than size
          * @throw UnsupportedOperationException - If the collection is non-modifiable.
          */
-        virtual E remove( std::size_t index ) = 0;
+        virtual E remove( int index ) = 0;
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/Map.h Thu Jul 29 15:30:46 2010
@@ -111,7 +111,7 @@ namespace util{
         /**
          * @return The number of elements (key/value pairs) in this map.
          */
-        virtual std::size_t size() const = 0;
+        virtual int size() const = 0;
 
         /**
          * Gets the value mapped to the specified key in the Map.  If there is no

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/PriorityQueue.h Thu Jul 29 15:30:46 2010
@@ -72,8 +72,8 @@ namespace util {
         static const int DEFAULT_CAPACITY = 11;
         static const int DEFAULT_CAPACITY_RATIO = 2;
 
-        std::size_t _size;
-        std::size_t capacity;
+        int _size;
+        int capacity;
         E* elements;
         decaf::lang::Pointer< Comparator<E> > _comparator;
 
@@ -82,7 +82,7 @@ namespace util {
         class PriorityQueueIterator : public Iterator<E> {
         private:
 
-            std::size_t position;
+            int position;
             bool allowRemove;
             PriorityQueue* queue;
 
@@ -150,7 +150,7 @@ namespace util {
          * @param initialCapacity
          *      The initial number of elements allocated to this PriorityQueue.
          */
-        PriorityQueue( std::size_t initialCapacity ) :
+        PriorityQueue( int initialCapacity ) :
             AbstractQueue<E>(), _size( 0 ), capacity( 0 ), elements( NULL ) {
 
             this->initQueue( initialCapacity, new comparators::Less<E>() );
@@ -168,7 +168,7 @@ namespace util {
          *
          * @throws NullPointerException if the passed Comparator is NULL.
          */
-        PriorityQueue( std::size_t initialCapacity, Comparator<E>* comparator ) :
+        PriorityQueue( int initialCapacity, Comparator<E>* comparator ) :
             AbstractQueue<E>(), _size( 0 ), capacity( 0 ), elements( NULL ) {
 
             if( comparator == NULL ) {
@@ -236,7 +236,7 @@ namespace util {
             return new ConstPriorityQueueIterator( this );
         }
 
-        virtual std::size_t size() const {
+        virtual int size() const {
             return this->_size;
         }
 
@@ -298,7 +298,7 @@ namespace util {
 
         virtual bool remove( const E& value ) {
 
-            std::size_t targetIndex = 0;
+            int targetIndex = 0;
             for( targetIndex = 0; targetIndex < _size; targetIndex++ ) {
                 if( 0 == _comparator->compare( value, elements[targetIndex] ) ) {
                     break;
@@ -338,7 +338,7 @@ namespace util {
 
     private:
 
-        void initQueue( std::size_t initialSize, Comparator<E>* comparator ) {
+        void initQueue( int initialSize, Comparator<E>* comparator ) {
             this->elements = new E[initialSize];
             this->capacity = initialSize;
             this->_size = 0;
@@ -347,8 +347,8 @@ namespace util {
 
         void upHeap() {
 
-            std::size_t current = _size - 1;
-            std::size_t parent = ( current - 1 ) / 2;
+            int current = _size - 1;
+            int parent = ( current - 1 ) / 2;
 
             while( current != 0 && _comparator->compare( elements[current], elements[parent] ) < 0 ) {
 
@@ -363,10 +363,10 @@ namespace util {
             }
         }
 
-        void downHeap( std::size_t pos ) {
+        void downHeap( int pos ) {
 
-            std::size_t current = pos;
-            std::size_t child = 2 * current + 1;
+            int current = pos;
+            int child = 2 * current + 1;
 
             while( child < _size && !Queue<E>::isEmpty() ) {
 
@@ -394,7 +394,7 @@ namespace util {
         void getFromPriorityQueue( const PriorityQueue<E>& c ) {
             initCapacity( c );
             _comparator = c.comparator();
-            for( std::size_t ix = 0; ix < c.size(); ++ix ) {
+            for( int ix = 0; ix < c.size(); ++ix ) {
                 this->elements[ix] = c.elements[ix];
             }
             _size = c.size();
@@ -409,7 +409,7 @@ namespace util {
             }
         }
 
-        void removeAt( std::size_t index ) {
+        void removeAt( int index ) {
             _size--;
             elements[index] = elements[_size];
             downHeap(index);
@@ -425,17 +425,17 @@ namespace util {
                 capacity = 1;
                 elements = new E[capacity];
             } else {
-                capacity = (std::size_t) lang::Math::ceil( (double)c.size() * 1.1 );
+                capacity = (int) lang::Math::ceil( (double)c.size() * 1.1 );
                 elements = new E[capacity];
             }
         }
 
-        void increaseCapacity( std::size_t size ) {
+        void increaseCapacity( int size ) {
 
             if( size > capacity ) {
                 E* newElements = new E[ size * DEFAULT_CAPACITY_RATIO ];
 
-                for( std::size_t ix = 0; ix < capacity; ix++ ) {
+                for( int ix = 0; ix < capacity; ix++ ) {
                     newElements[ix] = elements[ix];
                 }
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlList.h Thu Jul 29 15:30:46 2010
@@ -61,7 +61,7 @@ namespace util{
 
         public:
 
-            StlListIterator( typename std::list<E>* list, std::size_t index ) :
+            StlListIterator( typename std::list<E>* list, int index ) :
                 current( list->begin() ), prev( list->end() ), list( list ) {
 
                 std::advance( this->current, index );
@@ -161,7 +161,7 @@ namespace util{
 
         public:
 
-            ConstStlListIterator( const typename std::list<E>* list, std::size_t index ) :
+            ConstStlListIterator( const typename std::list<E>* list, int index ) :
                 ListIterator<E>(), current( list->begin() ), prev( list->end() ), list( list ) {
 
                 std::advance( this->current, index );
@@ -294,7 +294,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual ListIterator<E>* listIterator( std::size_t index ) {
+        virtual ListIterator<E>* listIterator( int index ) {
 
             if( index >= this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -304,7 +304,7 @@ namespace util{
 
             return new StlListIterator( &values, index );
         }
-        virtual ListIterator<E>* listIterator( std::size_t index ) const {
+        virtual ListIterator<E>* listIterator( int index ) const {
 
             if( index >= this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -342,7 +342,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual std::size_t indexOf( const E& value ) {
+        virtual int indexOf( const E& value ) {
 
             typename std::list<E>::iterator iter;
             iter = std::find( values.begin(), values.end(), value );
@@ -353,13 +353,13 @@ namespace util{
                     "List::indexOf - No matching element in list" );
             }
 
-            return std::distance( values.begin(), iter );
+            return (int)std::distance( values.begin(), iter );
         }
 
         /**
          * {@inheritDoc}
          */
-        virtual std::size_t lastIndexOf( const E& value ) {
+        virtual int lastIndexOf( const E& value ) {
 
             typename std::list<E>::reverse_iterator iter;
             iter = std::find( values.rbegin(), values.rend(), value );
@@ -371,7 +371,7 @@ namespace util{
             }
 
             // Now reverse the result to get the last index
-            return this->size() - std::distance( values.rbegin(), iter ) - 1;
+            return (int)( this->size() - std::distance( values.rbegin(), iter ) - 1 );
         }
 
         /**
@@ -384,14 +384,14 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual std::size_t size() const {
-            return values.size();
+        virtual int size() const {
+            return (int)values.size();
         }
 
         /**
          * {@inheritDoc}
          */
-        virtual E get( std::size_t index ) const {
+        virtual E get( int index ) const {
 
             if( index >= this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -408,7 +408,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual E set( std::size_t index, const E& element ) {
+        virtual E set( int index, const E& element ) {
 
             if( index >= this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -437,7 +437,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual void add( std::size_t index, const E& element ) {
+        virtual void add( int index, const E& element ) {
 
             if( index > this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -454,7 +454,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual bool addAll( std::size_t index, const Collection<E>& source ) {
+        virtual bool addAll( int index, const Collection<E>& source ) {
 
             if( index != 0 && index > this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(
@@ -475,7 +475,7 @@ namespace util{
          */
         virtual bool remove( const E& value ) {
 
-            std::size_t origSize = this->size();
+            int origSize = this->size();
             this->values.remove( value );
             return origSize != this->size();
         }
@@ -483,7 +483,7 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual E remove( std::size_t index ) {
+        virtual E remove( int index ) {
 
             if( index > this->size() ) {
                 throw decaf::lang::exceptions::IndexOutOfBoundsException(

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlMap.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlMap.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlMap.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlMap.h Thu Jul 29 15:30:46 2010
@@ -157,8 +157,8 @@ namespace util{
         /**
          * {@inheritDoc}
          */
-        virtual std::size_t size() const {
-            return valueMap.size();
+        virtual int size() const {
+            return (int)valueMap.size();
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/StlSet.h Thu Jul 29 15:30:46 2010
@@ -200,8 +200,8 @@ namespace util{
         /**
          * @return The number of elements in this set.
          */
-        virtual std::size_t size() const {
-            return values.size();
+        virtual int size() const {
+            return (int)values.size();
         }
 
         /**

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/BlockingQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/BlockingQueue.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/BlockingQueue.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/BlockingQueue.h Thu Jul 29 15:30:46 2010
@@ -188,14 +188,16 @@ namespace concurrent {
          *        <tt>unit</tt>
          * @param unit a <tt>TimeUnit</tt> determining how to interpret the
          *        <tt>timeout</tt> parameter
+         *
          * @return <tt>true</tt> if successful, or <tt>false</tt> if
          *         the specified waiting time elapses before space is available
+         *
          * @throws InterruptedException if interrupted while waiting
          * @throws NullPointerException if the specified element is null
          * @throws IllegalArgumentException if some property of the specified
          *         element prevents it from being added to this queue
          */
-        virtual bool offer( const E& e, long timeout, const TimeUnit& unit ) = 0;
+        virtual bool offer( const E& e, long long timeout, const TimeUnit& unit ) = 0;
 
         /**
          * Retrieves and removes the head of this queue, waiting if necessary until an
@@ -254,7 +256,7 @@ namespace concurrent {
          *         queue, or some property of an element of this queue prevents
          *         it from being added to the specified collection
          */
-        virtual std::size_t drainTo( Collection<E>& c ) = 0;
+        virtual int drainTo( Collection<E>& c ) = 0;
 
         /**
          * Removes at most the given number of available elements from
@@ -276,7 +278,7 @@ namespace concurrent {
          *         queue, or some property of an element of this queue prevents
          *         it from being added to the specified collection
          */
-        virtual std::size_t drainTo( Collection<E>& c, std::size_t maxElements ) = 0;
+        virtual int drainTo( Collection<E>& c, int maxElements ) = 0;
 
     };
 

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ConcurrentStlMap.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ConcurrentStlMap.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ConcurrentStlMap.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/ConcurrentStlMap.h Thu Jul 29 15:30:46 2010
@@ -183,9 +183,9 @@ namespace concurrent{
         /**
          * {@inheritDoc}
          */
-        virtual std::size_t size() const {
+        virtual int size() const {
             synchronized( &mutex ) {
-                return valueMap.size();
+                return (int)valueMap.size();
             }
 
             return 0;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/SynchronousQueue.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/SynchronousQueue.h?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/SynchronousQueue.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/util/concurrent/SynchronousQueue.h Thu Jul 29 15:30:46 2010
@@ -127,7 +127,7 @@ namespace concurrent {
          * @throws NullPointerException {@inheritDoc}
          * @throws IllegalArgumentException {@inheritDoc}
          */
-        virtual bool offer( const E& e, long timeout, const TimeUnit& unit ) {
+        virtual bool offer( const E& e, long long timeout, const TimeUnit& unit ) {
 
             //if (o == null) throw new NullPointerException();
             //if (transferer.transfer(o, true, unit.toNanos(timeout)) != null)
@@ -236,7 +236,7 @@ namespace concurrent {
             return true;
         }
 
-        virtual std::size_t size() const {
+        virtual int size() const {
             return 0;
         }
 
@@ -272,7 +272,7 @@ namespace concurrent {
 
         virtual std::vector<E> toArray() const { return std::vector<E>(); }
 
-        virtual std::size_t drainTo( Collection<E>& c ) {
+        virtual int drainTo( Collection<E>& c ) {
 
             if( (void*)&c == this ) {
                 throw decaf::lang::exceptions::IllegalArgumentException(
@@ -280,7 +280,7 @@ namespace concurrent {
                     "Cannot drain a Collection to Itself." );
             }
 
-            std::size_t count = 0;
+            int count = 0;
             E element;
 
             while( ( poll( element ) ) != false ) {
@@ -291,7 +291,7 @@ namespace concurrent {
             return count;
         }
 
-        virtual std::size_t drainTo( Collection<E>& c, std::size_t maxElements ) {
+        virtual int drainTo( Collection<E>& c, int maxElements ) {
 
             if( (void*)&c == this ) {
                 throw decaf::lang::exceptions::IllegalArgumentException(
@@ -299,7 +299,7 @@ namespace concurrent {
                     "Cannot drain a Collection to Itself." );
             }
 
-            std::size_t count = 0;
+            int count = 0;
             E element;
 
             while( count < maxElements && ( poll( element ) != false ) ) {

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/ListTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/ListTest.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/ListTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/ListTest.cpp Thu Jul 29 15:30:46 2010
@@ -285,7 +285,7 @@ void ListTest::testIterator(){
     CPPUNIT_ASSERT( iterator1 != NULL );
     CPPUNIT_ASSERT( iterator1->hasNext() == true );
 
-    size_t count = 0;
+    int count = 0;
     while( iterator1->hasNext() ) {
         iterator1->next();
         ++count;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PriorityQueueTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PriorityQueueTest.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PriorityQueueTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/PriorityQueueTest.cpp Thu Jul 29 15:30:46 2010
@@ -444,7 +444,7 @@ void PriorityQueueTest::testIteratorRemo
 
     int result;
     std::sort( newArray.begin(), newArray.end() );
-    for( std::size_t i = 0; i < intQueue.size(); i++ ) {
+    for( int i = 0; i < intQueue.size(); i++ ) {
         CPPUNIT_ASSERT( intQueue.poll( result ) );
         CPPUNIT_ASSERT( newArray[i] == result );
     }

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/SetTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/SetTest.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/SetTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/SetTest.cpp Thu Jul 29 15:30:46 2010
@@ -128,7 +128,7 @@ void SetTest::testIterator(){
     CPPUNIT_ASSERT( iterator1 != NULL );
     CPPUNIT_ASSERT( iterator1->hasNext() == true );
 
-    size_t count = 0;
+    int count = 0;
     while( iterator1->hasNext() ) {
         iterator1->next();
         ++count;

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/StlMapTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/StlMapTest.cpp?rev=980472&r1=980471&r2=980472&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/StlMapTest.cpp (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/decaf/util/StlMapTest.cpp Thu Jul 29 15:30:46 2010
@@ -140,8 +140,8 @@ public:
     /**
      * {@inheritDoc}
      */
-    virtual std::size_t size() const {
-        return valueMap.size();
+    virtual int size() const {
+        return (int)valueMap.size();
     }
 
     /**