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
framing
List.h
Go to the documentation of this file.
1
#ifndef QPID_FRAMING_LIST_H
2
#define QPID_FRAMING_LIST_H
3
4
/*
5
*
6
* Licensed to the Apache Software Foundation (ASF) under one
7
* or more contributor license agreements. See the NOTICE file
8
* distributed with this work for additional information
9
* regarding copyright ownership. The ASF licenses this file
10
* to you under the Apache License, Version 2.0 (the
11
* "License"); you may not use this file except in compliance
12
* with the License. You may obtain a copy of the License at
13
*
14
* http://www.apache.org/licenses/LICENSE-2.0
15
*
16
* Unless required by applicable law or agreed to in writing,
17
* software distributed under the License is distributed on an
18
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
19
* KIND, either express or implied. See the License for the
20
* specific language governing permissions and limitations
21
* under the License.
22
*
23
*/
24
#include "
qpid/CommonImportExport.h
"
25
#include "
qpid/framing/amqp_types.h
"
26
#include <iostream>
27
#include <list>
28
#include <boost/shared_ptr.hpp>
29
30
namespace
qpid {
31
namespace
framing {
32
33
class
Buffer;
34
class
FieldValue;
35
39
class
QPID_COMMON_CLASS_EXTERN
List
40
{
41
public
:
42
typedef
boost::shared_ptr<FieldValue>
ValuePtr
;
43
typedef
ValuePtr
value_type
;
44
typedef
std::list<ValuePtr>
Values
;
45
typedef
Values::const_iterator
const_iterator
;
46
typedef
Values::iterator
iterator
;
47
typedef
Values::const_reference
const_reference
;
48
typedef
Values::reference
reference
;
49
50
QPID_COMMON_EXTERN
uint32_t
encodedSize()
const
;
51
QPID_COMMON_EXTERN
void
encode
(
Buffer
& buffer)
const
;
52
QPID_COMMON_EXTERN
void
decode
(
Buffer
& buffer);
53
54
QPID_COMMON_EXTERN
bool
operator==
(
const
List
& other)
const
;
55
56
// std collection interface.
57
QPID_COMMON_INLINE_EXTERN
const_iterator
begin
()
const
{
return
values.begin(); }
58
QPID_COMMON_INLINE_EXTERN
const_iterator
end
()
const
{
return
values.end(); }
59
QPID_COMMON_INLINE_EXTERN
iterator
begin
() {
return
values.begin(); }
60
QPID_COMMON_INLINE_EXTERN
iterator
end
(){
return
values.end(); }
61
62
QPID_COMMON_INLINE_EXTERN
ValuePtr
front
()
const
{
return
values.front(); }
63
QPID_COMMON_INLINE_EXTERN
ValuePtr
back
()
const
{
return
values.back(); }
64
QPID_COMMON_INLINE_EXTERN
size_t
size
()
const
{
return
values.size(); }
65
66
QPID_COMMON_INLINE_EXTERN
iterator
insert
(
iterator
i,
ValuePtr
value) {
return
values.insert(i, value); }
67
QPID_COMMON_INLINE_EXTERN
void
erase
(
iterator
i) { values.erase(i); }
68
QPID_COMMON_INLINE_EXTERN
void
push_back
(
ValuePtr
value) { values.insert(end(), value); }
69
QPID_COMMON_INLINE_EXTERN
void
pop_back
() { values.pop_back(); }
70
71
private
:
72
Values values;
73
74
friend
QPID_COMMON_EXTERN
std::ostream&
operator<<
(std::ostream& out,
const
List
& list);
75
};
76
}}
// namespace qpid::framing
77
78
#endif
Qpid C++ API Reference
Generated on Tue Mar 5 2013 for Qpid C++ Client API by
1.8.1.1