libbmq 1359a5310784b41971ab3d2bad73a97c1b6072cf
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
bmqa_messageiterator.h
Go to the documentation of this file.
1// Copyright 2014-2023 Bloomberg Finance L.P.
2// SPDX-License-Identifier: Apache-2.0
3//
4// Licensed under the Apache License, Version 2.0 (the "License");
5// you may not use this file except in compliance with the License.
6// You may obtain a copy of the License at
7//
8// http://www.apache.org/licenses/LICENSE-2.0
9//
10// Unless required by applicable law or agreed to in writing, software
11// distributed under the License is distributed on an "AS IS" BASIS,
12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13// See the License for the specific language governing permissions and
14// limitations under the License.
15
16// bmqa_messageiterator.h -*-C++-*-
17#ifndef INCLUDED_BMQA_MESSAGEITERATOR
18#define INCLUDED_BMQA_MESSAGEITERATOR
19
40
41// BMQ
42
43#include <bmqa_message.h>
44
45// BDE
46#include <ball_log.h>
47
48namespace BloombergLP {
49
50// FORWARD DECLARATION
51namespace bmqimp {
52class Event;
53}
54
55namespace bmqa {
56
57// ==========================
58// struct MessageIteratorImpl
59// ==========================
60
65struct MessageIteratorImpl {
66 // PUBLIC DATA
67
69 bmqimp::Event* d_event_p;
70
75 bmqa::Message d_message;
76
78 int d_messageIndex;
79};
80
81// =====================
82// class MessageIterator
83// =====================
84
88 private:
89 // CLASS-SCOPE CATEGORY
90 BALL_LOG_SET_CLASS_CATEGORY("BMQA.MESSAGEITERATOR");
91
92 private:
93 // DATA
94 MessageIteratorImpl d_impl; // Implementation. Abstracted in its own
95 // struct and private so that we can do some
96 // magic to manipulate it without exposing any
97 // accessors/manipulators (this is wanted
98 // since this class is a public class).
99
100 public:
101 // CREATORS
102
105
106 // MANIPULATORS
107
114
115 // ACCESSORS
116
121 const Message& message() const;
122};
123
124} // close package namespace
125} // close enterprise namespace
126
127#endif
Provide the application with a message data object.
Definition bmqa_messageiterator.h:87
MessageIterator()
Default constructor.
const Message & message() const
A message sent/received to/from the BlazingMQ broker.
Definition bmqa_message.h:170
Definition bmqa_abstractsession.h:42