Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET
Apache Qpid Documentation
Main Page
Modules
Namespaces
Classes
Files
File List
File Members
qpid
management
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
*/
22
#include "
qpid/CommonImportExport.h
"
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
34
struct
OutOfBounds
:
qpid::types::Exception
{
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);
47
QPID_COMMON_EXTERN
~Buffer
();
48
49
QPID_COMMON_EXTERN
void
reset
();
50
51
QPID_COMMON_EXTERN
uint32_t
available
();
52
QPID_COMMON_EXTERN
uint32_t
getSize
();
53
QPID_COMMON_EXTERN
uint32_t
getPosition
();
54
QPID_COMMON_EXTERN
void
setPosition
(
uint32_t
);
55
QPID_COMMON_EXTERN
char
*
getPointer
();
56
57
QPID_COMMON_EXTERN
void
putOctet
(
uint8_t
i);
58
QPID_COMMON_EXTERN
void
putShort
(
uint16_t
i);
59
QPID_COMMON_EXTERN
void
putLong
(
uint32_t
i);
60
QPID_COMMON_EXTERN
void
putLongLong
(uint64_t i);
61
QPID_COMMON_EXTERN
void
putInt8
(int8_t i);
62
QPID_COMMON_EXTERN
void
putInt16
(
int16_t
i);
63
QPID_COMMON_EXTERN
void
putInt32
(
int32_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
69
QPID_COMMON_EXTERN
uint8_t
getOctet
();
70
QPID_COMMON_EXTERN
uint16_t
getShort
();
71
QPID_COMMON_EXTERN
uint32_t
getLong
();
72
QPID_COMMON_EXTERN
uint64_t
getLongLong
();
73
QPID_COMMON_EXTERN
int8_t
getInt8
();
74
QPID_COMMON_EXTERN
int16_t
getInt16
();
75
QPID_COMMON_EXTERN
int32_t
getInt32
();
76
QPID_COMMON_EXTERN
int64_t
getInt64
();
77
QPID_COMMON_EXTERN
float
getFloat
();
78
QPID_COMMON_EXTERN
double
getDouble
();
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);
86
QPID_COMMON_EXTERN
void
getBin128
(
uint8_t
* b);
87
88
QPID_COMMON_EXTERN
void
putMap
(
const
types::Variant::Map
& map);
89
QPID_COMMON_EXTERN
void
putList
(
const
types::Variant::List
& list);
90
QPID_COMMON_EXTERN
void
getMap
(
types::Variant::Map
& map);
91
QPID_COMMON_EXTERN
void
getList
(
types::Variant::List
& list);
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 Tue Jan 29 2013 for Qpid C++ Client API by
1.8.3