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 2006/11/17 01:59:35 UTC

svn commit: r476008 - in /incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands: ActiveMQDestination.h BrokerError.h

Author: tabish
Date: Thu Nov 16 16:59:34 2006
New Revision: 476008

URL: http://svn.apache.org/viewvc?view=rev&rev=476008
Log:
Updates for planned Openwire Support

Modified:
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQDestination.h
    incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerError.h

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQDestination.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQDestination.h?view=diff&rev=476008&r1=476007&r2=476008
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQDestination.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/ActiveMQDestination.h Thu Nov 16 16:59:34 2006
@@ -27,6 +27,7 @@
 
 #include <vector>
 #include <string>
+#include <map>
 
 namespace activemq{
 namespace connector{

Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerError.h
URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerError.h?view=diff&rev=476008&r1=476007&r2=476008
==============================================================================
--- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerError.h (original)
+++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/BrokerError.h Thu Nov 16 16:59:34 2006
@@ -19,7 +19,7 @@
 #define _ACTIVEMQ_CONNECTOR_OPENWIRE_COMMANDS_BROKERERROR_H_
 
 #include <activemq/connector/openwire/commands/BaseCommand.h>
-#icnlude <activemq/exceptions/NullPointerException.h>
+#include <activemq/exceptions/NullPointerException.h>
 
 #include <string>
 #include <vector>
@@ -61,7 +61,7 @@
          */
         virtual void copyCommand( const DataStructure* src ) {
             
-            BrokerError* srcErr = dynamic_cast<const BrokerError*>( src );
+            const BrokerError* srcErr = dynamic_cast<const BrokerError*>( src );
             
             if( srcErr == NULL || src == NULL ) {
                 throw activemq::exceptions::NullPointerException(
@@ -73,17 +73,18 @@
             this->setExceptionClass( srcErr->getExceptionClass() );
             
             for( int i = 0; i < srcErr->getStackTraceElements().size(); ++i ) {
-                if( src->getStackTraceElements()[i] != NULL ) {
-                    StackTraceElement* element = new StatckTraceElement;
-                    element = *( srcErr->getStackTraceElements()[i] );
+                if( srcErr->getStackTraceElements()[i] != NULL ) {
+                    StackTraceElement* element = new StackTraceElement;
+                    *element = *( srcErr->getStackTraceElements()[i] );
 
                     // store the copy
-                    this->getStackTraceElements().push_back( element );
+                    this->stackTraceElements.push_back( element );
                 }
             }
             
             if( srcErr->getCause() ) {
-                this->cause = srcErr->getCause()->copyCommand();
+                this->cause = dynamic_cast<BrokerError*>( 
+                    srcErr->getCause()->cloneDataStructure() );
             }
         }
 
@@ -147,7 +148,7 @@
          * Sets the Stack Trace Elements for this Exception
          * @param stackTraceElements - Stack Trace Elements
          */
-        virtual void setCause( const std::vector<StackTraceElement*>& stackTraceElements ) {
+        virtual void getStackTraceElements( const std::vector<StackTraceElement*>& stackTraceElements ) {
             this->stackTraceElements = stackTraceElements;
         }