activemq-cpp-3.3.0

src/main/cms/StreamMessage.h

Go to the documentation of this file.
00001 
00018 #ifndef _CMS_STREAMMESSAGE_H_
00019 #define _CMS_STREAMMESSAGE_H_
00020 
00021 #include <cms/Config.h>
00022 #include <cms/Message.h>
00023 #include <cms/CMSException.h>
00024 #include <cms/MessageNotReadableException.h>
00025 #include <cms/MessageNotWriteableException.h>
00026 #include <cms/MessageFormatException.h>
00027 #include <cms/MessageEOFException.h>
00028 
00029 namespace cms {
00030 
00061     class CMS_API StreamMessage : public Message {
00062     public:
00063 
00064         virtual ~StreamMessage() throw();
00065 
00076         virtual bool readBoolean() const = 0;
00077 
00089         virtual void writeBoolean( bool value ) = 0;
00090 
00101         virtual unsigned char readByte() const = 0;
00102 
00112         virtual void writeByte( unsigned char value ) = 0;
00113 
00138         virtual int readBytes( std::vector<unsigned char>& value ) const = 0;
00139 
00150         virtual void writeBytes( const std::vector<unsigned char>& value ) = 0;
00151 
00183         virtual int readBytes( unsigned char* buffer, int length ) const = 0;
00184 
00199         virtual void writeBytes( const unsigned char* value, int offset, int length ) = 0;
00200 
00211         virtual char readChar() const = 0;
00212 
00222         virtual void writeChar( char value ) = 0;
00223 
00234         virtual float readFloat() const = 0;
00235 
00244         virtual void writeFloat( float value ) = 0;
00245 
00256         virtual double readDouble() const = 0;
00257 
00266         virtual void writeDouble( double value ) = 0;
00267 
00278         virtual short readShort() const = 0;
00279 
00289         virtual void writeShort( short value ) = 0;
00290 
00301         virtual unsigned short readUnsignedShort() const = 0;
00302 
00312         virtual void writeUnsignedShort( unsigned short value ) = 0;
00313 
00324         virtual int readInt() const = 0;
00325 
00335         virtual void writeInt( int value ) = 0;
00336 
00347         virtual long long readLong() const = 0;
00348 
00358         virtual void writeLong( long long value ) = 0;
00359 
00370         virtual std::string readString() const = 0;
00371 
00381         virtual void writeString( const std::string& value ) = 0;
00382 
00383     };
00384 
00385 }
00386 
00387 #endif /*_CMS_STREAMMESSAGE_H_*/