You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by jo...@apache.org on 2010/03/05 22:51:53 UTC

svn commit: r919631 - /qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp

Author: jonathan
Date: Fri Mar  5 21:51:53 2010
New Revision: 919631

URL: http://svn.apache.org/viewvc?rev=919631&view=rev
Log:
Modified to either support the older XQilla 2.1.3 API or to use
xqilla/ast/XQEffectiveBooleanValue.hpp, depending on a constant
set in configure.ac.

Modified:
    qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp?rev=919631&r1=919630&r2=919631&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/xml/XmlExchange.cpp Fri Mar  5 21:51:53 2010
@@ -34,6 +34,10 @@
 
 #include <xercesc/framework/MemBufInputSource.hpp>
 
+#ifndef XQILLA_2_1_3
+#include <xqilla/ast/XQEffectiveBooleanValue.hpp>
+#endif
+
 #include <xqilla/ast/XQGlobalVariable.hpp>
 
 #include <xqilla/context/ItemFactory.hpp>
@@ -51,7 +55,7 @@
 namespace broker {
 
 
-    XmlExchange::XmlExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b)
+XmlExchange::XmlExchange(const string& _name, Manageable* _parent, Broker* b) : Exchange(_name, _parent, b)
 {
     if (mgmtExchange != 0)
         mgmtExchange->set_type (typeName);
@@ -180,7 +184,13 @@
       }
 
       Result result = query->execute(context.get());
+#ifndef XQILLA_BEFORE_2_2_3
+      Item::Ptr first_ = result->next(context.get());
+      Item::Ptr second_ = result->next(context.get());
+      return XQEffectiveBooleanValue::get(first_, second_, context.get(), 0);
+#else
       return result->getEffectiveBooleanValue(context.get(), 0);
+#endif
   }
   catch (XQException& e) {
       QPID_LOG(warning, "Could not parse XML content (or message headers):" << msgContent);



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org