Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Buffer.h
Go to the documentation of this file.
1 #ifndef _Management_Buffer_
2 #define _Management_Buffer_
3 /*
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  *
21  */
23 #include "qpid/types/Exception.h"
24 #include "qpid/types/Variant.h"
25 #include <string>
26 
27 namespace qpid {
28 namespace framing {
29  class Buffer;
30 }
31 
32 namespace management {
33 
35  OutOfBounds() : qpid::types::Exception(std::string("Out of Bounds")) {}
36 };
37 
38 
43 class Buffer
44 {
45 public:
46  QPID_COMMON_EXTERN Buffer(char* data=0, uint32_t size=0);
48 
50 
56 
60  QPID_COMMON_EXTERN void putLongLong(uint64_t i);
61  QPID_COMMON_EXTERN void putInt8(int8_t i);
64  QPID_COMMON_EXTERN void putInt64(int64_t i);
65  QPID_COMMON_EXTERN void putFloat(float f);
66  QPID_COMMON_EXTERN void putDouble(double f);
67  QPID_COMMON_EXTERN void putBin128(const uint8_t* b);
68 
73  QPID_COMMON_EXTERN int8_t getInt8();
76  QPID_COMMON_EXTERN int64_t getInt64();
79 
80  QPID_COMMON_EXTERN void putShortString(const std::string& s);
81  QPID_COMMON_EXTERN void putMediumString(const std::string& s);
82  QPID_COMMON_EXTERN void putLongString(const std::string& s);
83  QPID_COMMON_EXTERN void getShortString(std::string& s);
84  QPID_COMMON_EXTERN void getMediumString(std::string& s);
85  QPID_COMMON_EXTERN void getLongString(std::string& s);
87 
92 
93  QPID_COMMON_EXTERN void putRawData(const std::string& s);
94  QPID_COMMON_EXTERN void getRawData(std::string& s, uint32_t size);
95 
96  QPID_COMMON_EXTERN void putRawData(const uint8_t* data, size_t size);
97  QPID_COMMON_EXTERN void getRawData(uint8_t* data, size_t size);
98 
99 private:
100  framing::Buffer* impl;
101 };
102 
103 }} // namespace qpid::management
104 
105 #endif
void putDouble(double f)
void getBin128(uint8_t *b)
void getMediumString(std::string &s)
void setPosition(uint32_t)
std::list< Variant > List
Definition: Variant.h:76
void getShortString(std::string &s)
unsigned char uint8_t
Definition: IntegerTypes.h:24
void putLongLong(uint64_t i)
unsigned int uint32_t
Definition: IntegerTypes.h:27
void putOctet(uint8_t i)
short int16_t
Definition: IntegerTypes.h:26
void putInt16(int16_t i)
void getMap(types::Variant::Map &map)
int int32_t
Definition: IntegerTypes.h:28
std::map< std::string, Variant > Map
Definition: Variant.h:75
Buffer(char *data=0, uint32_t size=0)
void getList(types::Variant::List &list)
This class is a wrapper around qpid::framing::Buffer that does not include any dependencies from boos...
Definition: Buffer.h:43
void putMediumString(const std::string &s)
void putShortString(const std::string &s)
void putInt64(int64_t i)
void getRawData(std::string &s, uint32_t size)
void putList(const types::Variant::List &list)
void putRawData(const std::string &s)
void putInt32(int32_t i)
void getLongString(std::string &s)
void putLongString(const std::string &s)
void putLong(uint32_t i)
void putBin128(const uint8_t *b)
unsigned short uint16_t
Definition: IntegerTypes.h:25
void putInt8(int8_t i)
void putShort(uint16_t i)
void putMap(const types::Variant::Map &map)
#define QPID_COMMON_EXTERN
Base class for Qpid runtime exceptions.
Definition: Exception.h:39

Qpid C++ API Reference
Generated on Fri Nov 1 2013 for Qpid C++ Client API by doxygen 1.8.5