activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1336900 - /activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
Date Thu, 10 May 2012 21:25:32 GMT
Author: tabish
Date: Thu May 10 21:25:32 2012
New Revision: 1336900

URL: http://svn.apache.org/viewvc?rev=1336900&view=rev
Log:
Add an ostream operator to make debug logging easier.

Modified:
    activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h

Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h?rev=1336900&r1=1336899&r2=1336900&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/decaf/lang/Pointer.h Thu May 10 21:25:32
2012
@@ -339,6 +339,13 @@ namespace lang {
         return right.get() != left;
     }
 
+    ////////////////////////////////////////////////////////////////////////////
+    template< typename T, typename R>
+    std::ostream& operator<<(std::ostream &out, const Pointer<T,R>&
pointer){
+        out << pointer.get();
+        return out;
+    }
+
     /**
      * This implementation of Comparator is designed to allows objects in a Collection
      * to be sorted or tested for equality based on the value of the Object being Pointed



Mime
View raw message