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

Qpid C++ API Reference
Generated on Thu Dec 5 2013 for Qpid C++ Client API by doxygen 1.8.3.1