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/06/16 16:17:09 UTC
svn commit: r955237 [12/19] - in
/activemq/activemq-cpp/trunk/activemq-cpp/src: main/
main/activemq/wireformat/openwire/
main/activemq/wireformat/openwire/marshal/generated/
main/activemq/wireformat/openwire/marshal/universal/ test/
test/activemq/wiref...
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.cpp Wed Jun 16 14:17:04 2010
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h>
+
+#include <activemq/commands/WireFormatInfo.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/Pointer.h>
+
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::generated;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+
+///////////////////////////////////////////////////////////////////////////////
+DataStructure* WireFormatInfoMarshaller::createObject() const {
+ return new WireFormatInfo();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+unsigned char WireFormatInfoMarshaller::getDataStructureType() const {
+ return WireFormatInfo::ID_WIREFORMATINFO;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void WireFormatInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ WireFormatInfo* info =
+ dynamic_cast<WireFormatInfo*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+
+ info->setMagic( tightUnmarshalConstByteArray( dataIn, bs, 8 ) );
+ info->setVersion( dataIn->readInt() );
+ info->setMarshalledProperties( tightUnmarshalByteArray( dataIn, bs ) );
+
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+int WireFormatInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ WireFormatInfo* info =
+ dynamic_cast<WireFormatInfo*>( dataStructure );
+
+ info->beforeMarshal( wireFormat );
+ int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ bs->writeBoolean( info->getMarshalledProperties().size() != 0 );
+ rc += info->getMarshalledProperties().size() == 0 ? 0 : (int)info->getMarshalledProperties().size() + 4;
+
+ return rc + 12;
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void WireFormatInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ WireFormatInfo* info =
+ dynamic_cast<WireFormatInfo*>( dataStructure );
+ dataOut->write( (const unsigned char*)(&info->getMagic()[0]), 8, 0, 8 );
+ dataOut->writeInt( info->getVersion() );
+ if( bs->readBoolean() ) {
+ dataOut->writeInt( (int)info->getMarshalledProperties().size() );
+ dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size(), 0, (int)info->getMarshalledProperties().size() );
+ }
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void WireFormatInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) {
+
+ try {
+
+ BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ WireFormatInfo* info =
+ dynamic_cast<WireFormatInfo*>( dataStructure );
+ info->beforeUnmarshal( wireFormat );
+ info->setMagic( looseUnmarshalConstByteArray( dataIn, 8 ) );
+ info->setVersion( dataIn->readInt() );
+ info->setMarshalledProperties( looseUnmarshalByteArray( dataIn ) );
+ info->afterUnmarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void WireFormatInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) {
+
+ try {
+
+ WireFormatInfo* info =
+ dynamic_cast<WireFormatInfo*>( dataStructure );
+ info->beforeMarshal( wireFormat );
+ BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ dataOut->write( (const unsigned char*)(&info->getMagic()[0]), 8, 0, 8 );
+ dataOut->writeInt( info->getVersion() );
+ dataOut->write( info->getMarshalledProperties().size() != 0 );
+ if( info->getMarshalledProperties().size() != 0 ) {
+ dataOut->writeInt( (int)info->getMarshalledProperties().size() );
+ dataOut->write( (const unsigned char*)(&info->getMarshalledProperties()[0]), (int)info->getMarshalledProperties().size(), 0, (int)info->getMarshalledProperties().size() );
+ }
+ info->afterMarshal( wireFormat );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h Wed Jun 16 14:17:04 2010
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_WIREFORMATINFOMARSHALLER_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_WIREFORMATINFOMARSHALLER_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/wireformat/openwire/marshal/BaseDataStreamMarshaller.h>
+
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <activemq/util/Config.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace generated{
+
+ /**
+ * Marshaling code for Open Wire Format for WireFormatInfoMarshaller
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class AMQCPP_API WireFormatInfoMarshaller : public BaseDataStreamMarshaller {
+ public:
+
+ WireFormatInfoMarshaller() {}
+ virtual ~WireFormatInfoMarshaller() {}
+
+ /**
+ * Creates a new instance of this marshalable type.
+ *
+ * @return new DataStructure object pointer caller owns it.
+ */
+ virtual commands::DataStructure* createObject() const;
+
+ /**
+ * Get the Data Structure Type that identifies this Marshaler
+ *
+ * @return byte holding the data structure type value
+ */
+ virtual unsigned char getDataStructureType() const;
+
+ /**
+ * Un-marshal an object instance from the data input stream.
+ *
+ * @param wireFormat - describes the wire format of the broker.
+ * @param dataStructure - Object to be un-marshaled.
+ * @param dataIn - BinaryReader that provides that data.
+ * @param bs - BooleanStream stream used to unpack bits from the wire.
+ *
+ * @throws IOException if an error occurs during the unmarshal.
+ */
+ virtual void tightUnmarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataInputStream* dataIn,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param bs - BooleanStream stream used to pack bits from the wire.
+ * @returns int value indicating the size of the marshaled object.
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual int tightMarshal1( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataOut - BinaryReader that provides that data sink
+ * @param bs - BooleanStream stream used to pack bits from the wire.
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual void tightMarshal2( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataOutputStream* dataOut,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataIn - BinaryReader that provides that data source
+ *
+ * @throws IOException if an error occurs during the unmarshal.
+ */
+ virtual void looseUnmarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException );
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat - describs the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataOut - BinaryWriter that provides that data sink
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual void looseMarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException );
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_WIREFORMATINFOMARSHALLER_H_*/
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshaller.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.cpp Wed Jun 16 14:17:04 2010
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h>
+
+#include <activemq/commands/XATransactionId.h>
+#include <activemq/exceptions/ActiveMQException.h>
+#include <decaf/lang/Pointer.h>
+
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::generated;
+using namespace decaf;
+using namespace decaf::io;
+using namespace decaf::lang;
+
+///////////////////////////////////////////////////////////////////////////////
+DataStructure* XATransactionIdMarshaller::createObject() const {
+ return new XATransactionId();
+}
+
+///////////////////////////////////////////////////////////////////////////////
+unsigned char XATransactionIdMarshaller::getDataStructureType() const {
+ return XATransactionId::ID_XATRANSACTIONID;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void XATransactionIdMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ TransactionIdMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs );
+
+ XATransactionId* info =
+ dynamic_cast<XATransactionId*>( dataStructure );
+ info->setFormatId( dataIn->readInt() );
+ info->setGlobalTransactionId( tightUnmarshalByteArray( dataIn, bs ) );
+ info->setBranchQualifier( tightUnmarshalByteArray( dataIn, bs ) );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+int XATransactionIdMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ XATransactionId* info =
+ dynamic_cast<XATransactionId*>( dataStructure );
+
+ int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs );
+ bs->writeBoolean( info->getGlobalTransactionId().size() != 0 );
+ rc += info->getGlobalTransactionId().size() == 0 ? 0 : (int)info->getGlobalTransactionId().size() + 4;
+ bs->writeBoolean( info->getBranchQualifier().size() != 0 );
+ rc += info->getBranchQualifier().size() == 0 ? 0 : (int)info->getBranchQualifier().size() + 4;
+
+ return rc + 4;
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void XATransactionIdMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) {
+
+ try {
+
+ TransactionIdMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs );
+
+ XATransactionId* info =
+ dynamic_cast<XATransactionId*>( dataStructure );
+ dataOut->writeInt( info->getFormatId() );
+ if( bs->readBoolean() ) {
+ dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
+ dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size(), 0, (int)info->getGlobalTransactionId().size() );
+ }
+ if( bs->readBoolean() ) {
+ dataOut->writeInt( (int)info->getBranchQualifier().size() );
+ dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size(), 0, (int)info->getBranchQualifier().size() );
+ }
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void XATransactionIdMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) {
+
+ try {
+
+ TransactionIdMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn );
+ XATransactionId* info =
+ dynamic_cast<XATransactionId*>( dataStructure );
+ info->setFormatId( dataIn->readInt() );
+ info->setGlobalTransactionId( looseUnmarshalByteArray( dataIn ) );
+ info->setBranchQualifier( looseUnmarshalByteArray( dataIn ) );
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void XATransactionIdMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) {
+
+ try {
+
+ XATransactionId* info =
+ dynamic_cast<XATransactionId*>( dataStructure );
+ TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut );
+ dataOut->writeInt( info->getFormatId() );
+ dataOut->write( info->getGlobalTransactionId().size() != 0 );
+ if( info->getGlobalTransactionId().size() != 0 ) {
+ dataOut->writeInt( (int)info->getGlobalTransactionId().size() );
+ dataOut->write( (const unsigned char*)(&info->getGlobalTransactionId()[0]), (int)info->getGlobalTransactionId().size(), 0, (int)info->getGlobalTransactionId().size() );
+ }
+ dataOut->write( info->getBranchQualifier().size() != 0 );
+ if( info->getBranchQualifier().size() != 0 ) {
+ dataOut->writeInt( (int)info->getBranchQualifier().size() );
+ dataOut->write( (const unsigned char*)(&info->getBranchQualifier()[0]), (int)info->getBranchQualifier().size(), 0, (int)info->getBranchQualifier().size() );
+ }
+ }
+ AMQ_CATCH_RETHROW( decaf::io::IOException )
+ AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException )
+ AMQ_CATCHALL_THROW( decaf::io::IOException )
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h Wed Jun 16 14:17:04 2010
@@ -0,0 +1,144 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_XATRANSACTIONIDMARSHALLER_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_XATRANSACTIONIDMARSHALLER_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <activemq/wireformat/openwire/marshal/generated/TransactionIdMarshaller.h>
+
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <activemq/util/Config.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace generated{
+
+ /**
+ * Marshaling code for Open Wire Format for XATransactionIdMarshaller
+ *
+ * NOTE!: This file is auto generated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class AMQCPP_API XATransactionIdMarshaller : public TransactionIdMarshaller {
+ public:
+
+ XATransactionIdMarshaller() {}
+ virtual ~XATransactionIdMarshaller() {}
+
+ /**
+ * Creates a new instance of this marshalable type.
+ *
+ * @return new DataStructure object pointer caller owns it.
+ */
+ virtual commands::DataStructure* createObject() const;
+
+ /**
+ * Get the Data Structure Type that identifies this Marshaler
+ *
+ * @return byte holding the data structure type value
+ */
+ virtual unsigned char getDataStructureType() const;
+
+ /**
+ * Un-marshal an object instance from the data input stream.
+ *
+ * @param wireFormat - describes the wire format of the broker.
+ * @param dataStructure - Object to be un-marshaled.
+ * @param dataIn - BinaryReader that provides that data.
+ * @param bs - BooleanStream stream used to unpack bits from the wire.
+ *
+ * @throws IOException if an error occurs during the unmarshal.
+ */
+ virtual void tightUnmarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataInputStream* dataIn,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Write the booleans that this object uses to a BooleanStream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param bs - BooleanStream stream used to pack bits from the wire.
+ * @returns int value indicating the size of the marshaled object.
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual int tightMarshal1( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataOut - BinaryReader that provides that data sink
+ * @param bs - BooleanStream stream used to pack bits from the wire.
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual void tightMarshal2( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataOutputStream* dataOut,
+ utils::BooleanStream* bs ) throw( decaf::io::IOException );
+
+ /**
+ * Un-marshal an object instance from the data input stream
+ *
+ * @param wireFormat - describes the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataIn - BinaryReader that provides that data source
+ *
+ * @throws IOException if an error occurs during the unmarshal.
+ */
+ virtual void looseUnmarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataInputStream* dataIn ) throw( decaf::io::IOException );
+
+ /**
+ * Write a object instance to data output stream
+ *
+ * @param wireFormat - describs the wire format of the broker
+ * @param dataStructure - Object to be marshaled
+ * @param dataOut - BinaryWriter that provides that data sink
+ *
+ * @throws IOException if an error occurs during the marshal.
+ */
+ virtual void looseMarshal( OpenWireFormat* wireFormat,
+ commands::DataStructure* dataStructure,
+ decaf::io::DataOutputStream* dataOut ) throw( decaf::io::IOException );
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_XATRANSACTIONIDMARSHALLER_H_*/
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshaller.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am?rev=955237&r1=955236&r2=955237&view=diff
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am (original)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/Makefile.am Wed Jun 16 14:17:04 2010
@@ -65,62 +65,62 @@ cc_sources = \
activemq/wireformat/openwire/OpenWireFormatTest.cpp \
activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.cpp \
activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQBlobMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQBytesMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQMapMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQObjectMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQQueueMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQStreamMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTempQueueMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTempTopicMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTextMessageMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTopicMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/BrokerIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/BrokerInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConnectionControlMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConnectionErrorMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConnectionIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConnectionInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConsumerControlMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConsumerIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ConsumerInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ControlCommandMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/DataArrayResponseMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/DataResponseMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/DestinationInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/DiscoveryEventMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ExceptionResponseMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/FlushCommandMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/IntegerResponseMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/JournalQueueAckMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/JournalTopicAckMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/JournalTraceMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/JournalTransactionMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/KeepAliveInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/LastPartialCommandMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/LocalTransactionIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/MessageAckMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/MessageDispatchMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/MessageDispatchNotificationMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/MessageIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/MessagePullMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/NetworkBridgeFilterMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/PartialCommandMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ProducerAckMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ProducerIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ProducerInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/RemoveInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/RemoveSubscriptionInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ReplayCommandMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ResponseMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/SessionIdMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/SessionInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/ShutdownInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/SubscriptionInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/TransactionInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/WireFormatInfoMarshallerTest.cpp \
- activemq/wireformat/openwire/marshal/universal/XATransactionIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQObjectMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQQueueMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQStreamMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTempQueueMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTempTopicMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTextMessageMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTopicMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/BrokerIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/BrokerInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConnectionControlMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConnectionErrorMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConnectionIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConsumerControlMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConsumerIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ConsumerInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ControlCommandMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/DataArrayResponseMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/DataResponseMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/DestinationInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/DiscoveryEventMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ExceptionResponseMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/FlushCommandMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/IntegerResponseMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/MessageDispatchNotificationMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/MessageIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/MessagePullMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/NetworkBridgeFilterMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/PartialCommandMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ProducerAckMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ProducerIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ProducerInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/RemoveInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/RemoveSubscriptionInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ReplayCommandMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ResponseMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/SessionIdMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/SessionInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/ShutdownInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/SubscriptionInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/TransactionInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshallerTest.cpp \
+ activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshallerTest.cpp \
activemq/wireformat/openwire/utils/BooleanStreamTest.cpp \
activemq/wireformat/openwire/utils/HexTableTest.cpp \
activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.cpp \
@@ -275,62 +275,62 @@ h_sources = \
activemq/wireformat/openwire/OpenWireFormatTest.h \
activemq/wireformat/openwire/marshal/BaseDataStreamMarshallerTest.h \
activemq/wireformat/openwire/marshal/PrimitiveTypesMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQBlobMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQBytesMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQMapMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQObjectMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQQueueMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQStreamMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTempQueueMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTempTopicMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTextMessageMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ActiveMQTopicMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/BrokerIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/BrokerInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConnectionControlMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConnectionErrorMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConnectionIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConnectionInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConsumerControlMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConsumerIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ConsumerInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ControlCommandMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/DataArrayResponseMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/DataResponseMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/DestinationInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/DiscoveryEventMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ExceptionResponseMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/FlushCommandMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/IntegerResponseMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/JournalQueueAckMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/JournalTopicAckMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/JournalTraceMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/JournalTransactionMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/KeepAliveInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/LastPartialCommandMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/LocalTransactionIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/MessageAckMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/MessageDispatchMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/MessageDispatchNotificationMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/MessageIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/MessagePullMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/NetworkBridgeFilterMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/PartialCommandMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ProducerAckMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ProducerIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ProducerInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/RemoveInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/RemoveSubscriptionInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ReplayCommandMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ResponseMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/SessionIdMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/SessionInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/ShutdownInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/SubscriptionInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/TransactionInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/WireFormatInfoMarshallerTest.h \
- activemq/wireformat/openwire/marshal/universal/XATransactionIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQObjectMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQQueueMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQStreamMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTempQueueMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTempTopicMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTextMessageMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ActiveMQTopicMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/BrokerIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/BrokerInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConnectionControlMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConnectionErrorMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConnectionIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConnectionInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConsumerControlMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConsumerIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ConsumerInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ControlCommandMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/DataArrayResponseMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/DataResponseMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/DestinationInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/DiscoveryEventMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ExceptionResponseMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/FlushCommandMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/IntegerResponseMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/JournalQueueAckMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/JournalTopicAckMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/JournalTraceMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/JournalTransactionMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/KeepAliveInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/LastPartialCommandMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/LocalTransactionIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/MessageAckMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/MessageDispatchMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/MessageDispatchNotificationMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/MessageIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/MessagePullMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/NetworkBridgeFilterMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/PartialCommandMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ProducerAckMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ProducerIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ProducerInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/RemoveInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/RemoveSubscriptionInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ReplayCommandMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ResponseMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/SessionIdMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/SessionInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/ShutdownInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/SubscriptionInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/TransactionInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/WireFormatInfoMarshallerTest.h \
+ activemq/wireformat/openwire/marshal/generated/XATransactionIdMarshallerTest.h \
activemq/wireformat/openwire/utils/BooleanStreamTest.h \
activemq/wireformat/openwire/utils/HexTableTest.h \
activemq/wireformat/openwire/utils/MessagePropertyInterceptorTest.h \
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp Wed Jun 16 14:17:04 2010
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshaller.h>
+#include <activemq/commands/ActiveMQBlobMessage.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+#include <decaf/lang/Pointer.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::test() {
+
+ ActiveMQBlobMessageMarshaller myMarshaller;
+ ActiveMQBlobMessage myCommand;
+ ActiveMQBlobMessage* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ActiveMQBlobMessage*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::testLooseMarshal() {
+
+ ActiveMQBlobMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ActiveMQBlobMessage outCommand;
+ ActiveMQBlobMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBlobMessageMarshallerTest::testTightMarshal() {
+
+ ActiveMQBlobMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ActiveMQBlobMessage outCommand;
+ ActiveMQBlobMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h Wed Jun 16 14:17:04 2010
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ActiveMQBlobMessageMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ActiveMQBlobMessageMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ActiveMQBlobMessageMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ActiveMQBlobMessageMarshallerTest() {}
+ virtual ~ActiveMQBlobMessageMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBLOBMESSAGEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBlobMessageMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp Wed Jun 16 14:17:04 2010
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshaller.h>
+#include <activemq/commands/ActiveMQBytesMessage.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+#include <decaf/lang/Pointer.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::test() {
+
+ ActiveMQBytesMessageMarshaller myMarshaller;
+ ActiveMQBytesMessage myCommand;
+ ActiveMQBytesMessage* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ActiveMQBytesMessage*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::testLooseMarshal() {
+
+ ActiveMQBytesMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ActiveMQBytesMessage outCommand;
+ ActiveMQBytesMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQBytesMessageMarshallerTest::testTightMarshal() {
+
+ ActiveMQBytesMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ActiveMQBytesMessage outCommand;
+ ActiveMQBytesMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h Wed Jun 16 14:17:04 2010
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ActiveMQBytesMessageMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ActiveMQBytesMessageMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ActiveMQBytesMessageMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ActiveMQBytesMessageMarshallerTest() {}
+ virtual ~ActiveMQBytesMessageMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQBYTESMESSAGEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQBytesMessageMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp Wed Jun 16 14:17:04 2010
@@ -0,0 +1,181 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h>
+
+#include <activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshaller.h>
+#include <activemq/commands/ActiveMQMapMessage.h>
+
+#include <activemq/wireformat/openwire/OpenWireFormat.h>
+#include <activemq/commands/DataStructure.h>
+#include <activemq/commands/MessageId.h>
+#include <activemq/commands/ProducerId.h>
+#include <activemq/wireformat/openwire/utils/BooleanStream.h>
+#include <decaf/io/DataInputStream.h>
+#include <decaf/io/DataOutputStream.h>
+#include <decaf/io/IOException.h>
+#include <decaf/io/ByteArrayOutputStream.h>
+#include <decaf/io/ByteArrayInputStream.h>
+#include <decaf/util/Properties.h>
+#include <decaf/lang/Pointer.h>
+//
+// NOTE!: This file is autogenerated - do not modify!
+// if you need to make a change, please see the Java Classes in the
+// activemq-core module
+//
+
+using namespace std;
+using namespace activemq;
+using namespace activemq::util;
+using namespace activemq::exceptions;
+using namespace activemq::commands;
+using namespace activemq::wireformat;
+using namespace activemq::wireformat::openwire;
+using namespace activemq::wireformat::openwire::marshal;
+using namespace activemq::wireformat::openwire::utils;
+using namespace activemq::wireformat::openwire::marshal::generated;
+using namespace decaf::io;
+using namespace decaf::lang;
+using namespace decaf::util;
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::test() {
+
+ ActiveMQMapMessageMarshaller myMarshaller;
+ ActiveMQMapMessage myCommand;
+ ActiveMQMapMessage* myCommand2;
+
+ CPPUNIT_ASSERT( myMarshaller.getDataStructureType() == myCommand.getDataStructureType() );
+ myCommand2 = dynamic_cast<ActiveMQMapMessage*>( myMarshaller.createObject() );
+ CPPUNIT_ASSERT( myCommand2 != NULL );
+ delete myCommand2;
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::testLooseMarshal() {
+
+ ActiveMQMapMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( false );
+
+ ActiveMQMapMessage outCommand;
+ ActiveMQMapMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ marshaller.looseMarshal( &openWireFormat, &outCommand, &dataOut );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ marshaller.looseUnmarshal( &openWireFormat, &inCommand, &dataIn );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
+///////////////////////////////////////////////////////////////////////////////
+void ActiveMQMapMessageMarshallerTest::testTightMarshal() {
+
+ ActiveMQMapMessageMarshaller marshaller;
+ Properties props;
+ OpenWireFormat openWireFormat( props );
+
+ // Configure for this test.
+ openWireFormat.setVersion( 6 );
+ openWireFormat.setTightEncodingEnabled( true );
+
+ ActiveMQMapMessage outCommand;
+ ActiveMQMapMessage inCommand;
+
+ Pointer<ProducerId> producerId( new ProducerId() );
+ producerId->setConnectionId( "ConnectionId" );
+ producerId->setSessionId( 123 );
+ producerId->setValue( 42 );
+
+ Pointer<MessageId> messageId( new MessageId() );
+ messageId->setBrokerSequenceId( 1 );
+ messageId->setProducerSequenceId( 3 );
+ messageId->setProducerId( producerId );
+
+ outCommand.setMessageId( messageId );
+
+ try {
+
+ // Marshal the dataStructure to a byte array.
+ ByteArrayOutputStream baos;
+ DataOutputStream dataOut( &baos );
+ // Phase 1 - count the size
+ int size = 1;
+ BooleanStream bs;
+ size += marshaller.tightMarshal1( &openWireFormat, &outCommand, &bs );
+ size += bs.marshalledSize();
+ // Phase 2 - marshal
+ dataOut.writeByte( outCommand.getDataStructureType() );
+ bs.marshal( &dataOut );
+ marshaller.tightMarshal2( &openWireFormat, &outCommand, &dataOut, &bs );
+
+ // Now read it back in and make sure it's all right.
+ std::pair<const unsigned char*, int> array = baos.toByteArray();
+ ByteArrayInputStream bais( array.first, array.second, true );
+ DataInputStream dataIn( &bais );
+
+ unsigned char dataType = dataIn.readByte();
+ CPPUNIT_ASSERT( dataType == outCommand.getDataStructureType() );
+ bs.clear();
+ bs.unmarshal( &dataIn );
+ marshaller.tightUnmarshal( &openWireFormat, &inCommand, &dataIn, &bs );
+
+ CPPUNIT_ASSERT( inCommand.equals( &outCommand ) == true );
+
+ } catch( ActiveMQException& e ) {
+ e.printStackTrace();
+ CPPUNIT_ASSERT( false );
+ } catch( ... ) {
+ CPPUNIT_ASSERT( false );
+ }
+}
+
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.cpp
------------------------------------------------------------------------------
svn:eol-style = native
Added: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h
URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h?rev=955237&view=auto
==============================================================================
--- activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h (added)
+++ activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h Wed Jun 16 14:17:04 2010
@@ -0,0 +1,66 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_
+
+// Turn off warning message for ignored exception specification
+#ifdef _MSC_VER
+#pragma warning( disable : 4290 )
+#endif
+
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+namespace activemq{
+namespace wireformat{
+namespace openwire{
+namespace marshal{
+namespace generated{
+
+ /**
+ * Marshalling Test code for Open Wire Format for ActiveMQMapMessageMarshallerTest
+ *
+ * NOTE!: This file is autogenerated - do not modify!
+ * if you need to make a change, please see the Java Classes
+ * in the activemq-openwire-generator module
+ */
+ class ActiveMQMapMessageMarshallerTest : public CppUnit::TestFixture {
+
+ CPPUNIT_TEST_SUITE( ActiveMQMapMessageMarshallerTest );
+ CPPUNIT_TEST( test );
+ CPPUNIT_TEST( testLooseMarshal );
+ CPPUNIT_TEST( testTightMarshal );
+ CPPUNIT_TEST_SUITE_END();
+
+ public:
+
+ ActiveMQMapMessageMarshallerTest() {}
+ virtual ~ActiveMQMapMessageMarshallerTest() {}
+
+ /**
+ * Test the marshaller and its marshalled type.
+ */
+ virtual void test();
+ virtual void testLooseMarshal();
+ virtual void testTightMarshal();
+
+ };
+
+}}}}}
+
+#endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_GENERATED_ACTIVEMQMAPMESSAGEMARSHALLERTEST_H_*/
Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/test/activemq/wireformat/openwire/marshal/generated/ActiveMQMapMessageMarshallerTest.h
------------------------------------------------------------------------------
svn:eol-style = native