Author: tabish Date: Mon Nov 13 16:50:34 2006 New Revision: 474612 URL: http://svn.apache.org/viewvc?view=rev&rev=474612 Log: (empty)
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp?view=diff&rev=474612&r1=474611&r2=474612 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/MessageMarshaller.cpp Mon Nov 13 16:50:34 2006 @@ -109,10 +109,10 @@ rc += tightMarshalNestedObject1( wireFormat, info->getReplyTo(), bs ); rc += tightMarshalLong1( wireFormat, info->getTimestamp(), bs ); rc += tightMarshalString1( info->getType(), bs ); - bs->writeBoolean( info->getContent() != NULL ); - rc += info->getContent()() == NULL ? 0 : info->getContent().Length + 4; - bs->writeBoolean( info->getMarshalledProperties() != NULL ); - rc += info->getMarshalledProperties()() == NULL ? 0 : info->getMarshalledProperties().Length + 4; + bs->writeBoolean( info->getContent().size() != 0 ); + rc += info->getContent().size() == 0 ? 0 : info->getContent().size() + 4; + bs->writeBoolean( info->getMarshalledProperties().size() != 0 ); + rc += info->getMarshalledProperties().size() == 0 ? 0 : info->getMarshalledProperties().size() + 4; rc += tightMarshalNestedObject1( wireFormat, info->getDataStructure(), bs ); rc += tightMarshalCachedObject1( wireFormat, info->getTargetConsumerId(), bs ); bs->writeBoolean( info->isCompressed() ); @@ -148,12 +148,12 @@ tightMarshalLong2( wireFormat, info->getTimestamp(), dataOut, bs ); tightMarshalString2( info->getType(), dataOut, bs ); if( bs->readBoolean() ) { - dataOut->write( info->getContent().Length ); - dataOut->write( info->getContent() ); + dataOut->write( info->getContent().size() ); + dataOut->write( (const unsigned char*)&(info->getContent()[0]), info->getContent().size() ); } if( bs->readBoolean() ) { - dataOut->write( info->getMarshalledProperties().Length ); - dataOut->write( info->getMarshalledProperties() ); + dataOut->write( info->getMarshalledProperties().size() ); + dataOut->write( (const unsigned char*)&(info->getMarshalledProperties()[0]), info->getMarshalledProperties().size() ); } tightMarshalNestedObject2( wireFormat, info->getDataStructure(), dataOut, bs ); tightMarshalCachedObject2( wireFormat, info->getTargetConsumerId(), dataOut, bs ); @@ -240,15 +240,15 @@ looseMarshalNestedObject( wireFormat, info->getReplyTo(), dataOut ); looseMarshalLong( wireFormat, info->getTimestamp(), dataOut ); looseMarshalString( info->getType(), dataOut ); - dataOut->write( info->getContent() != NULL ); - if( info->getContent() != NULL ) { - dataOut->write( info->getContent().Length ); - dataOut->write( info->getContent() ); + dataOut->write( info->getContent().size() != 0 ); + if( info->getContent().size() != 0 ) { + dataOut->write( info->getContent().size() ); + dataOut->write( (const unsigned char*)&(info->getContent()[0]), info->getContent().size() ); } - dataOut->write( info->getMarshalledProperties() != NULL ); - if( info->getMarshalledProperties() != NULL ) { - dataOut->write( info->getMarshalledProperties().Length ); - dataOut->write( info->getMarshalledProperties() ); + dataOut->write( info->getMarshalledProperties().size() != 0 ); + if( info->getMarshalledProperties().size() != 0 ) { + dataOut->write( info->getMarshalledProperties().size() ); + dataOut->write( (const unsigned char*)&(info->getMarshalledProperties()[0]), info->getMarshalledProperties().size() ); } looseMarshalNestedObject( wireFormat, info->getDataStructure(), dataOut ); looseMarshalCachedObject( wireFormat, info->getTargetConsumerId(), dataOut ); Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp?view=diff&rev=474612&r1=474611&r2=474612 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/PartialCommandMarshaller.cpp Mon Nov 13 16:50:34 2006 @@ -62,8 +62,8 @@ dynamic_cast<PartialCommand*>( dataStructure ); int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - bs->writeBoolean( info->getData() != NULL ); - rc += info->getData()() == NULL ? 0 : info->getData().Length + 4; + bs->writeBoolean( info->getData().size() != 0 ); + rc += info->getData().size() == 0 ? 0 : info->getData().size() + 4; return rc + 4; } @@ -77,8 +77,8 @@ dynamic_cast<PartialCommand*>( dataStructure ); dataOut->write( info->getCommandId() ); if( bs->readBoolean() ) { - dataOut->write( info->getData().Length ); - dataOut->write( info->getData() ); + dataOut->write( info->getData().size() ); + dataOut->write( (const unsigned char*)&(info->getData()[0]), info->getData().size() ); } } @@ -98,10 +98,10 @@ BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); dataOut->write( info->getCommandId() ); - dataOut->write( info->getData() != NULL ); - if( info->getData() != NULL ) { - dataOut->write( info->getData().Length ); - dataOut->write( info->getData() ); + dataOut->write( info->getData().size() != 0 ); + if( info->getData().size() != 0 ) { + dataOut->write( info->getData().size() ); + dataOut->write( (const unsigned char*)&(info->getData()[0]), info->getData().size() ); } } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp?view=diff&rev=474612&r1=474611&r2=474612 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp Mon Nov 13 16:50:34 2006 @@ -68,8 +68,8 @@ info->beforeMarshall( wireFormat ); int rc = BaseDataStreamMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - bs->writeBoolean( info->getMarshalledProperties() != NULL ); - rc += info->getMarshalledProperties()() == NULL ? 0 : info->getMarshalledProperties().Length + 4; + bs->writeBoolean( info->getMarshalledProperties().size() != 0 ); + rc += info->getMarshalledProperties().size() == 0 ? 0 : info->getMarshalledProperties().size() + 4; return rc + 12; } @@ -84,8 +84,8 @@ dataOut->write( info->getMagic(), 0, 8 ); dataOut->write( info->getVersion() ); if( bs->readBoolean() ) { - dataOut->write( info->getMarshalledProperties().Length ); - dataOut->write( info->getMarshalledProperties() ); + dataOut->write( info->getMarshalledProperties().size() ); + dataOut->write( (const unsigned char*)&(info->getMarshalledProperties()[0]), info->getMarshalledProperties().size() ); } info->afterMarshall( wireFormat ); } @@ -111,10 +111,10 @@ dataOut->write( info->getMagic(), 0, 8 ); dataOut->write( info->getVersion() ); - dataOut->write( info->getMarshalledProperties() != NULL ); - if( info->getMarshalledProperties() != NULL ) { - dataOut->write( info->getMarshalledProperties().Length ); - dataOut->write( info->getMarshalledProperties() ); + dataOut->write( info->getMarshalledProperties().size() != 0 ); + if( info->getMarshalledProperties().size() != 0 ) { + dataOut->write( info->getMarshalledProperties().size() ); + dataOut->write( (const unsigned char*)&(info->getMarshalledProperties()[0]), info->getMarshalledProperties().size() ); } info->afterMarshall( wireFormat ); } Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp?view=diff&rev=474612&r1=474611&r2=474612 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/XATransactionIdMarshaller.cpp Mon Nov 13 16:50:34 2006 @@ -63,10 +63,10 @@ dynamic_cast<XATransactionId*>( dataStructure ); int rc = TransactionIdMarshaller::tightMarshal1( wireFormat, dataStructure, bs ); - bs->writeBoolean( info->getGlobalTransactionId() != NULL ); - rc += info->getGlobalTransactionId()() == NULL ? 0 : info->getGlobalTransactionId().Length + 4; - bs->writeBoolean( info->getBranchQualifier() != NULL ); - rc += info->getBranchQualifier()() == NULL ? 0 : info->getBranchQualifier().Length + 4; + bs->writeBoolean( info->getGlobalTransactionId().size() != 0 ); + rc += info->getGlobalTransactionId().size() == 0 ? 0 : info->getGlobalTransactionId().size() + 4; + bs->writeBoolean( info->getBranchQualifier().size() != 0 ); + rc += info->getBranchQualifier().size() == 0 ? 0 : info->getBranchQualifier().size() + 4; return rc + 4; } @@ -80,12 +80,12 @@ dynamic_cast<XATransactionId*>( dataStructure ); dataOut->write( info->getFormatId() ); if( bs->readBoolean() ) { - dataOut->write( info->getGlobalTransactionId().Length ); - dataOut->write( info->getGlobalTransactionId() ); + dataOut->write( info->getGlobalTransactionId().size() ); + dataOut->write( (const unsigned char*)&(info->getGlobalTransactionId()[0]), info->getGlobalTransactionId().size() ); } if( bs->readBoolean() ) { - dataOut->write( info->getBranchQualifier().Length ); - dataOut->write( info->getBranchQualifier() ); + dataOut->write( info->getBranchQualifier().size() ); + dataOut->write( (const unsigned char*)&(info->getBranchQualifier()[0]), info->getBranchQualifier().size() ); } } @@ -106,15 +106,15 @@ TransactionIdMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); dataOut->write( info->getFormatId() ); - dataOut->write( info->getGlobalTransactionId() != NULL ); - if( info->getGlobalTransactionId() != NULL ) { - dataOut->write( info->getGlobalTransactionId().Length ); - dataOut->write( info->getGlobalTransactionId() ); + dataOut->write( info->getGlobalTransactionId().size() != 0 ); + if( info->getGlobalTransactionId().size() != 0 ) { + dataOut->write( info->getGlobalTransactionId().size() ); + dataOut->write( (const unsigned char*)&(info->getGlobalTransactionId()[0]), info->getGlobalTransactionId().size() ); } - dataOut->write( info->getBranchQualifier() != NULL ); - if( info->getBranchQualifier() != NULL ) { - dataOut->write( info->getBranchQualifier().Length ); - dataOut->write( info->getBranchQualifier() ); + dataOut->write( info->getBranchQualifier().size() != 0 ); + if( info->getBranchQualifier().size() != 0 ) { + dataOut->write( info->getBranchQualifier().size() ); + dataOut->write( (const unsigned char*)&(info->getBranchQualifier()[0]), info->getBranchQualifier().size() ); } }