activemq-cpp-3.9.5
StreamMessage.h
Go to the documentation of this file.
1
17
18#ifndef _CMS_STREAMMESSAGE_H_
19#define _CMS_STREAMMESSAGE_H_
20
21#include <cms/Config.h>
22#include <cms/Message.h>
23#include <cms/CMSException.h>
28
29namespace cms {
30
62 public:
63
64 virtual ~StreamMessage();
65
80 virtual ValueType getNextValueType() const = 0;
81
92 virtual bool readBoolean() const = 0;
93
105 virtual void writeBoolean(bool value) = 0;
106
117 virtual unsigned char readByte() const = 0;
118
128 virtual void writeByte(unsigned char value) = 0;
129
154 virtual int readBytes(std::vector<unsigned char>& value) const = 0;
155
166 virtual void writeBytes(const std::vector<unsigned char>& value) = 0;
167
199 virtual int readBytes(unsigned char* buffer, int length) const = 0;
200
215 virtual void writeBytes(const unsigned char* value, int offset, int length) = 0;
216
227 virtual char readChar() const = 0;
228
238 virtual void writeChar(char value) = 0;
239
250 virtual float readFloat() const = 0;
251
260 virtual void writeFloat(float value) = 0;
261
272 virtual double readDouble() const = 0;
273
282 virtual void writeDouble(double value) = 0;
283
294 virtual short readShort() const = 0;
295
305 virtual void writeShort(short value) = 0;
306
317 virtual unsigned short readUnsignedShort() const = 0;
318
328 virtual void writeUnsignedShort(unsigned short value) = 0;
329
340 virtual int readInt() const = 0;
341
351 virtual void writeInt(int value) = 0;
352
363 virtual long long readLong() const = 0;
364
374 virtual void writeLong(long long value) = 0;
375
386 virtual std::string readString() const = 0;
387
397 virtual void writeString(const std::string& value) = 0;
398
406 virtual void reset() = 0;
407
408 };
409
410}
411
412#endif /*_CMS_STREAMMESSAGE_H_*/
Root of all messages.
Definition Message.h:88
ValueType
Defines the Type Identifiers used to identify the type contained within a specific Message property o...
Definition Message.h:112
Interface for a StreamMessage.
Definition StreamMessage.h:61
virtual void writeShort(short value)=0
Writes a signed short to the Stream message stream as a 2 byte value.
virtual void writeBytes(const std::vector< unsigned char > &value)=0
Writes a byte array to the Stream message stream using the vector size as the number of bytes to writ...
virtual double readDouble() const =0
Reads a 64 bit double from the Stream message stream.
virtual void reset()=0
Puts the message body in read-only mode and repositions the stream of bytes to the beginning.
virtual long long readLong() const =0
Reads a 64 bit long from the Stream message stream.
virtual void writeLong(long long value)=0
Writes a long long to the Stream message stream as a 8 byte value.
virtual void writeByte(unsigned char value)=0
Writes a byte to the Stream message stream as a 1-byte value.
virtual int readInt() const =0
Reads a 32 bit signed integer from the Stream message stream.
virtual void writeChar(char value)=0
Writes a char to the Stream message stream as a 1-byte value.
virtual ValueType getNextValueType() const =0
Returns the value type for the element in the StreamMessage.
virtual unsigned char readByte() const =0
Reads a Byte from the Stream message stream.
virtual ~StreamMessage()
virtual char readChar() const =0
Reads a Char from the Stream message stream.
virtual void writeBytes(const unsigned char *value, int offset, int length)=0
Writes a portion of a byte array to the Stream message stream.
virtual void writeDouble(double value)=0
Writes a double to the Stream message stream as a 8 byte value.
virtual bool readBoolean() const =0
Reads a Boolean from the Stream message stream.
virtual void writeString(const std::string &value)=0
Writes an ASCII String to the Stream message stream.
virtual short readShort() const =0
Reads a 16 bit signed short from the Stream message stream.
virtual std::string readString() const =0
Reads an ASCII String from the Stream message stream.
virtual void writeBoolean(bool value)=0
Writes a boolean to the Stream message stream as a 1-byte value.
virtual float readFloat() const =0
Reads a 32 bit float from the Stream message stream.
virtual void writeUnsignedShort(unsigned short value)=0
Writes a unsigned short to the Stream message stream as a 2 byte value.
virtual int readBytes(std::vector< unsigned char > &value) const =0
Reads a byte array from the Stream message stream.
virtual void writeFloat(float value)=0
Writes a float to the Stream message stream as a 4 byte value.
virtual void writeInt(int value)=0
Writes a signed int to the Stream message stream as a 4 byte value.
virtual int readBytes(unsigned char *buffer, int length) const =0
Reads a portion of the Stream message stream.
virtual unsigned short readUnsignedShort() const =0
Reads a 16 bit unsigned short from the Stream message stream.
#define CMS_API
Definition Config.h:31
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements.
Definition DestinationResolver.h:23