Author: tabish Date: Wed Nov 15 10:01:28 2006 New Revision: 475339 URL: http://svn.apache.org/viewvc?view=rev&rev=475339 Log: Adding new file to build for Openwire Support
Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.h incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/v2/WireFormatInfoMarshaller.cpp Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.h?view=diff&rev=475339&r1=475338&r2=475339 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/commands/WireFormatInfo.h Wed Nov 15 10:01:28 2006 @@ -171,6 +171,38 @@ void setMaxInactivityDuration( long maxInactivityDuration ) { this->maxInactivityDuration = maxInactivityDuration; } + + /** + * Get the Magic field + * @return const reference to a std::vector<char> + */ + const std::vector<char>& getMagic() const { + return magic; + } + + /** + * Sets the value of the magic field + * @param magic - const std::vector<char> + */ + void setMagic( const std::vector<char>& magic ) { + this->magic = magic; + } + + /** + * Get the marshalledProperties field + * @return const reference to a std::vector<char> + */ + const std::vector<char>& getMarshalledProperties() const { + return magic; + } + + /** + * Sets the value of the marshalledProperties field + * @param magic - const std::vector<char> + */ + void setMarshalledProperties( const std::vector<char>& magic ) { + this->magic = magic; + } private: Modified: incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h URL: http://svn.apache.org/viewvc/incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h?view=diff&rev=475339&r1=475338&r2=475339 ============================================================================== --- incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h (original) +++ incubator/activemq/activemq-cpp/trunk/activemq-cpp/src/main/activemq/connector/openwire/marshal/BaseDataStreamMarshaller.h Wed Nov 15 10:01:28 2006 @@ -119,6 +119,31 @@ { return std::vector<char>(); } /** + * Tight Unmarshal a fixed size array from that data input stream + * and return an stl vector of char as the resultant. + * @param dataIn - the DataInputStream to Un-Marshal from + * @param bs - boolean stream to unmarshal from. + * @param size - size of the const array to unmarshal + * @returns the unmarshalled vector of chars. + */ + virtual std::vector<char> tightUnmarshalConstByteArray( + io::DataInputStream* dataIn, + utils::BooleanStream* bs, + int size ) { return std::vector<char>(); } + + /** + * Tight Unmarshal a fixed size array from that data input stream + * and return an stl vector of char as the resultant. + * @param dataIn - the DataInputStream to Un-Marshal from + * @param bs - boolean stream to unmarshal from. + * @param size - size of the const array to unmarshal + * @returns the unmarshalled vector of chars. + */ + virtual std::vector<char> looseUnmarshalConstByteArray( + io::DataInputStream* dataIn, + int size ) { return std::vector<char>(); } + + /** * Performs Tight Unmarshalling of String Objects * @param dataIn - the DataInputStream to Un-Marshal from * @param bs - boolean stream to unmarshal from. 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=475339&r1=475338&r2=475339 ============================================================================== --- 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 Wed Nov 15 10:01:28 2006 @@ -81,7 +81,7 @@ WireFormatInfo* info = dynamic_cast<WireFormatInfo*>( dataStructure ); - dataOut->write( info->getMagic(), 0, 8 ); + dataOut->write( &info->getMagic()[0], 0, 8 ); dataOut->write( info->getVersion() ); if( bs->readBoolean() ) { dataOut->write( info->getMarshalledProperties().size() ); @@ -109,7 +109,7 @@ info->beforeMarshall( wireFormat ); BaseDataStreamMarshaller::looseMarshal( wireFormat, dataStructure, dataOut ); - dataOut->write( info->getMagic(), 0, 8 ); + dataOut->write( &info->getMagic()[0], 0, 8 ); dataOut->write( info->getVersion() ); dataOut->write( info->getMarshalledProperties().size() != 0 ); if( info->getMarshalledProperties().size() != 0 ) {