Return-Path: Delivered-To: apmail-activemq-commits-archive@www.apache.org Received: (qmail 98054 invoked from network); 24 Jul 2009 20:09:58 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 24 Jul 2009 20:09:58 -0000 Received: (qmail 388 invoked by uid 500); 24 Jul 2009 20:11:03 -0000 Delivered-To: apmail-activemq-commits-archive@activemq.apache.org Received: (qmail 165 invoked by uid 500); 24 Jul 2009 20:11:02 -0000 Mailing-List: contact commits-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@activemq.apache.org Delivered-To: mailing list commits@activemq.apache.org Received: (qmail 99638 invoked by uid 99); 24 Jul 2009 20:10:58 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 20:10:58 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 24 Jul 2009 20:10:50 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id DFC0B23888FE; Fri, 24 Jul 2009 20:10:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r797633 [7/37] - in /activemq/activemq-cpp/trunk/activemq-cpp: ./ src/main/ src/main/activemq/commands/ src/main/activemq/core/ src/main/activemq/wireformat/openwire/ src/main/activemq/wireformat/openwire/marshal/v1/ src/main/activemq/wiref... Date: Fri, 24 Jul 2009 20:09:44 -0000 To: commits@activemq.apache.org From: tabish@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090724201005.DFC0B23888FE@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_CONTROLCOMMANDMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_CONTROLCOMMANDMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for ControlCommandMarshaller + * + * 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 ControlCommandMarshaller : public BaseCommandMarshaller { + public: + + ControlCommandMarshaller() {} + virtual ~ControlCommandMarshaller() {} + + /** + * 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_V4_CONTROLCOMMANDMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ControlCommandMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,155 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* DataArrayResponseMarshaller::createObject() const { + return new DataArrayResponse(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char DataArrayResponseMarshaller::getDataStructureType() const { + return DataArrayResponse::ID_DATAARRAYRESPONSE; +} + +/////////////////////////////////////////////////////////////////////////////// +void DataArrayResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + DataArrayResponse* info = + dynamic_cast( dataStructure ); + + if( bs->readBoolean() ) { + short size = dataIn->readShort(); + info->getData().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getData().push_back( Pointer( dynamic_cast< DataStructure* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ) ); + } + } + else { + info->getData().clear(); + } + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int DataArrayResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + DataArrayResponse* info = + dynamic_cast( dataStructure ); + + int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalObjectArray1( wireFormat, info->getData(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataArrayResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + DataArrayResponse* info = + dynamic_cast( dataStructure ); + tightMarshalObjectArray2( wireFormat, info->getData(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataArrayResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + DataArrayResponse* info = + dynamic_cast( dataStructure ); + + if( dataIn->readBoolean() ) { + short size = dataIn->readShort(); + info->getData().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getData().push_back( Pointer( dynamic_cast( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ) ); + } + } + else { + info->getData().clear(); + } + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataArrayResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + DataArrayResponse* info = + dynamic_cast( dataStructure ); + ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalObjectArray( wireFormat, info->getData(), dataOut ); + } + 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/v4/DataArrayResponseMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_DATAARRAYRESPONSEMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DATAARRAYRESPONSEMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for DataArrayResponseMarshaller + * + * 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 DataArrayResponseMarshaller : public ResponseMarshaller { + public: + + DataArrayResponseMarshaller() {} + virtual ~DataArrayResponseMarshaller() {} + + /** + * 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_V4_DATAARRAYRESPONSEMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataArrayResponseMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,135 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* DataResponseMarshaller::createObject() const { + return new DataResponse(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char DataResponseMarshaller::getDataStructureType() const { + return DataResponse::ID_DATARESPONSE; +} + +/////////////////////////////////////////////////////////////////////////////// +void DataResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + DataResponse* info = + dynamic_cast( dataStructure ); + info->setData( Pointer( dynamic_cast< DataStructure* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int DataResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + DataResponse* info = + dynamic_cast( dataStructure ); + + int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalNestedObject1( wireFormat, info->getData().get(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + DataResponse* info = + dynamic_cast( dataStructure ); + tightMarshalNestedObject2( wireFormat, info->getData().get(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + DataResponse* info = + dynamic_cast( dataStructure ); + info->setData( Pointer( dynamic_cast< DataStructure* >( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DataResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + DataResponse* info = + dynamic_cast( dataStructure ); + ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalNestedObject( wireFormat, info->getData().get(), dataOut ); + } + 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/v4/DataResponseMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_DATARESPONSEMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DATARESPONSEMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for DataResponseMarshaller + * + * 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 DataResponseMarshaller : public ResponseMarshaller { + public: + + DataResponseMarshaller() {} + virtual ~DataResponseMarshaller() {} + + /** + * 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_V4_DATARESPONSEMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DataResponseMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,178 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* DestinationInfoMarshaller::createObject() const { + return new DestinationInfo(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char DestinationInfoMarshaller::getDataStructureType() const { + return DestinationInfo::ID_DESTINATIONINFO; +} + +/////////////////////////////////////////////////////////////////////////////// +void DestinationInfoMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + DestinationInfo* info = + dynamic_cast( dataStructure ); + info->setConnectionId( Pointer( dynamic_cast< ConnectionId* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ) ); + info->setDestination( Pointer( dynamic_cast< ActiveMQDestination* >( + tightUnmarshalCachedObject( wireFormat, dataIn, bs ) ) ) ); + info->setOperationType( dataIn->readByte() ); + info->setTimeout( tightUnmarshalLong( wireFormat, dataIn, bs ) ); + + if( bs->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( Pointer( dynamic_cast< BrokerId* >( + tightUnmarshalNestedObject( wireFormat, dataIn, bs ) ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int DestinationInfoMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + DestinationInfo* info = + dynamic_cast( dataStructure ); + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getConnectionId().get(), bs ); + rc += tightMarshalCachedObject1( wireFormat, info->getDestination().get(), bs ); + rc += tightMarshalLong1( wireFormat, info->getTimeout(), bs ); + rc += tightMarshalObjectArray1( wireFormat, info->getBrokerPath(), bs ); + + return rc + 1; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DestinationInfoMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + DestinationInfo* info = + dynamic_cast( dataStructure ); + tightMarshalCachedObject2( wireFormat, info->getConnectionId().get(), dataOut, bs ); + tightMarshalCachedObject2( wireFormat, info->getDestination().get(), dataOut, bs ); + dataOut->write( info->getOperationType() ); + tightMarshalLong2( wireFormat, info->getTimeout(), dataOut, bs ); + tightMarshalObjectArray2( wireFormat, info->getBrokerPath(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DestinationInfoMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + DestinationInfo* info = + dynamic_cast( dataStructure ); + info->setConnectionId( Pointer( dynamic_cast< ConnectionId* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ) ); + info->setDestination( Pointer( dynamic_cast< ActiveMQDestination* >( + looseUnmarshalCachedObject( wireFormat, dataIn ) ) ) ); + info->setOperationType( dataIn->readByte() ); + info->setTimeout( looseUnmarshalLong( wireFormat, dataIn ) ); + + if( dataIn->readBoolean() ) { + short size = dataIn->readShort(); + info->getBrokerPath().reserve( size ); + for( int i = 0; i < size; i++ ) { + info->getBrokerPath().push_back( Pointer( dynamic_cast( + looseUnmarshalNestedObject( wireFormat, dataIn ) ) ) ); + } + } + else { + info->getBrokerPath().clear(); + } + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DestinationInfoMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + DestinationInfo* info = + dynamic_cast( dataStructure ); + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalCachedObject( wireFormat, info->getConnectionId().get(), dataOut ); + looseMarshalCachedObject( wireFormat, info->getDestination().get(), dataOut ); + dataOut->write( info->getOperationType() ); + looseMarshalLong( wireFormat, info->getTimeout(), dataOut ); + looseMarshalObjectArray( wireFormat, info->getBrokerPath(), dataOut ); + } + 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/v4/DestinationInfoMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_DESTINATIONINFOMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DESTINATIONINFOMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for DestinationInfoMarshaller + * + * 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 DestinationInfoMarshaller : public BaseCommandMarshaller { + public: + + DestinationInfoMarshaller() {} + virtual ~DestinationInfoMarshaller() {} + + /** + * 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_V4_DESTINATIONINFOMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DestinationInfoMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,138 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* DiscoveryEventMarshaller::createObject() const { + return new DiscoveryEvent(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char DiscoveryEventMarshaller::getDataStructureType() const { + return DiscoveryEvent::ID_DISCOVERYEVENT; +} + +/////////////////////////////////////////////////////////////////////////////// +void DiscoveryEventMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + DiscoveryEvent* info = + dynamic_cast( dataStructure ); + info->setServiceName( tightUnmarshalString( dataIn, bs ) ); + info->setBrokerName( tightUnmarshalString( dataIn, bs ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int DiscoveryEventMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + DiscoveryEvent* info = + dynamic_cast( dataStructure ); + + int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalString1( info->getServiceName(), bs ); + rc += tightMarshalString1( info->getBrokerName(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DiscoveryEventMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + DiscoveryEvent* info = + dynamic_cast( dataStructure ); + tightMarshalString2( info->getServiceName(), dataOut, bs ); + tightMarshalString2( info->getBrokerName(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DiscoveryEventMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseDataStreamMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + DiscoveryEvent* info = + dynamic_cast( dataStructure ); + info->setServiceName( looseUnmarshalString( dataIn ) ); + info->setBrokerName( looseUnmarshalString( dataIn ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void DiscoveryEventMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + DiscoveryEvent* info = + dynamic_cast( dataStructure ); + BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalString( info->getServiceName(), dataOut ); + looseMarshalString( info->getBrokerName(), dataOut ); + } + 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/v4/DiscoveryEventMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_DISCOVERYEVENTMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_DISCOVERYEVENTMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for DiscoveryEventMarshaller + * + * 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 DiscoveryEventMarshaller : public BaseDataStreamMarshaller { + public: + + DiscoveryEventMarshaller() {} + virtual ~DiscoveryEventMarshaller() {} + + /** + * 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_V4_DISCOVERYEVENTMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/DiscoveryEventMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,135 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* ExceptionResponseMarshaller::createObject() const { + return new ExceptionResponse(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char ExceptionResponseMarshaller::getDataStructureType() const { + return ExceptionResponse::ID_EXCEPTIONRESPONSE; +} + +/////////////////////////////////////////////////////////////////////////////// +void ExceptionResponseMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + ExceptionResponse* info = + dynamic_cast( dataStructure ); + info->setException( Pointer( dynamic_cast< BrokerError* >( + tightUnmarshalBrokerError( wireFormat, dataIn, bs ) ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int ExceptionResponseMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ExceptionResponse* info = + dynamic_cast( dataStructure ); + + int rc = ResponseMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + rc += tightMarshalBrokerError1( wireFormat, info->getException().get(), bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ExceptionResponseMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + ExceptionResponse* info = + dynamic_cast( dataStructure ); + tightMarshalBrokerError2( wireFormat, info->getException().get(), dataOut, bs ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ExceptionResponseMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + ResponseMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + ExceptionResponse* info = + dynamic_cast( dataStructure ); + info->setException( Pointer( dynamic_cast< BrokerError* >( + looseUnmarshalBrokerError( wireFormat, dataIn ) ) ) ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void ExceptionResponseMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + ExceptionResponse* info = + dynamic_cast( dataStructure ); + ResponseMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + looseMarshalBrokerError( wireFormat, info->getException().get(), dataOut ); + } + 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/v4/ExceptionResponseMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.h URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.h?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.h (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.h Fri Jul 24 20:09:31 2009 @@ -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_V4_EXCEPTIONRESPONSEMARSHALLER_H_ +#define _ACTIVEMQ_WIREFORMAT_OPENWIRE_MARSAHAL_V4_EXCEPTIONRESPONSEMARSHALLER_H_ + +// Turn off warning message for ignored exception specification +#ifdef _MSC_VER +#pragma warning( disable : 4290 ) +#endif + +#include + +#include +#include +#include +#include +#include +#include +#include + +namespace activemq{ +namespace wireformat{ +namespace openwire{ +namespace marshal{ +namespace v4{ + + /** + * Marshaling code for Open Wire Format for ExceptionResponseMarshaller + * + * 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 ExceptionResponseMarshaller : public ResponseMarshaller { + public: + + ExceptionResponseMarshaller() {} + virtual ~ExceptionResponseMarshaller() {} + + /** + * 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_V4_EXCEPTIONRESPONSEMARSHALLER_H_*/ + Propchange: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/ExceptionResponseMarshaller.h ------------------------------------------------------------------------------ svn:eol-style = native Added: activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/FlushCommandMarshaller.cpp URL: http://svn.apache.org/viewvc/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/FlushCommandMarshaller.cpp?rev=797633&view=auto ============================================================================== --- activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/FlushCommandMarshaller.cpp (added) +++ activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/wireformat/openwire/marshal/v4/FlushCommandMarshaller.cpp Fri Jul 24 20:09:31 2009 @@ -0,0 +1,117 @@ +/* + * 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 + +#include +#include +#include + +// +// 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::v4; +using namespace decaf; +using namespace decaf::io; +using namespace decaf::lang; + +/////////////////////////////////////////////////////////////////////////////// +DataStructure* FlushCommandMarshaller::createObject() const { + return new FlushCommand(); +} + +/////////////////////////////////////////////////////////////////////////////// +unsigned char FlushCommandMarshaller::getDataStructureType() const { + return FlushCommand::ID_FLUSHCOMMAND; +} + +/////////////////////////////////////////////////////////////////////////////// +void FlushCommandMarshaller::tightUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightUnmarshal( wireFormat, dataStructure, dataIn, bs ); + + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +int FlushCommandMarshaller::tightMarshal1( OpenWireFormat* wireFormat, DataStructure* dataStructure, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + int rc = BaseCommandMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); + + return rc + 0; + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void FlushCommandMarshaller::tightMarshal2( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut, BooleanStream* bs ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::tightMarshal2( wireFormat, dataStructure, dataOut, bs ); + + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void FlushCommandMarshaller::looseUnmarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataInputStream* dataIn ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseUnmarshal( wireFormat, dataStructure, dataIn ); + } + AMQ_CATCH_RETHROW( decaf::io::IOException ) + AMQ_CATCH_EXCEPTION_CONVERT( exceptions::ActiveMQException, decaf::io::IOException ) + AMQ_CATCHALL_THROW( decaf::io::IOException ) +} + +/////////////////////////////////////////////////////////////////////////////// +void FlushCommandMarshaller::looseMarshal( OpenWireFormat* wireFormat, DataStructure* dataStructure, DataOutputStream* dataOut ) throw( decaf::io::IOException ) { + + try { + + BaseCommandMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); + + } + 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/v4/FlushCommandMarshaller.cpp ------------------------------------------------------------------------------ svn:eol-style = native