activemq-cpp-3.8.2
BooleanStream.h
Go to the documentation of this file.
1 
18 #ifndef _ACTIVEMQ_WIREFORMAT_OPENWIRE_UTILS_BOOLEANSTREAM_H_
19 #define _ACTIVEMQ_WIREFORMAT_OPENWIRE_UTILS_BOOLEANSTREAM_H_
20 
23 #include <activemq/util/Config.h>
24 
25 namespace activemq{
26 namespace wireformat{
27 namespace openwire{
28 namespace utils{
29 
50  private:
51 
52  // Internal Buffer of data
53  std::vector<unsigned char> data;
54 
55  // Limit on buffer size
56  short arrayLimit;
57 
58  // Byte we are on from the buffer
59  short arrayPos;
60 
61  // Bit we are on in the byte we are on from the buffer
62  unsigned char bytePos;
63 
64  public:
65 
66  BooleanStream();
67 
68  virtual ~BooleanStream();
69 
77  bool readBoolean();
78 
85  void writeBoolean( bool value );
86 
93  void marshal( decaf::io::DataOutputStream* dataOut );
94 
101  void marshal( std::vector< unsigned char >& dataOut );
102 
109  void unmarshal( decaf::io::DataInputStream* dataIn );
110 
114  void clear();
115 
120  int marshalledSize();
121 
122  };
123 
124 }}}}
125 
126 #endif /*_ACTIVEMQ_WIREFORMAT_OPENWIRE_UTILS_BOOLEANSTREAM_H_*/
#define AMQCPP_API
Definition: Config.h:30
Manages the writing and reading of boolean data streams to and from a data source such as a DataInput...
Definition: BooleanStream.h:49
A data output stream lets an application write primitive Java data types to an output stream in a por...
Definition: DataOutputStream.h:34
A data input stream lets an application read primitive Java data types from an underlying input strea...
Definition: DataInputStream.h:46
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements...
Definition: CachedConsumer.h:24