Gazebo Transport

API Reference

14.1.0
MsgIter.hh
Go to the documentation of this file.
1/*
2 * Copyright (C) 2017 Open Source Robotics Foundation
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*/
17
18#ifndef GZ_TRANSPORT_LOG_MSGITER_HH_
19#define GZ_TRANSPORT_LOG_MSGITER_HH_
20
21#include <memory>
22
23#include <gz/transport/config.hh>
24#include <gz/transport/log/Export.hh>
26
27namespace gz::transport::log
28{
29 // Inline bracket to help doxygen filtering.
30 inline namespace GZ_TRANSPORT_VERSION_NAMESPACE {
31 //
33 class MsgIterPrivate;
34 class Log;
35
37 class GZ_TRANSPORT_LOG_VISIBLE MsgIter
38 {
40 public: MsgIter();
41
44 public: MsgIter(MsgIter &&_orig); // NOLINT
45
47 public: ~MsgIter();
48
53 // public: MsgIter &operator=(const MsgIter &_orig);
55
58 public: MsgIter &operator++();
59
63 public: bool operator==(const MsgIter &_other) const;
64
68 public: bool operator!=(const MsgIter &_other) const;
69
73 public: MsgIter& operator=(MsgIter &&_other); // NOLINT
74
77 public: const Message &operator*() const;
78
81 public: const Message *operator->() const;
82
83#ifdef _WIN32
84// Disable warning C4251 which is triggered by
85// std::*
86#pragma warning(push)
87#pragma warning(disable: 4251)
88#endif
90 private: std::unique_ptr<MsgIterPrivate> dataPtr;
91#ifdef _WIN32
92#pragma warning(pop)
93#endif
94
98 private: MsgIter(
99 std::unique_ptr<MsgIterPrivate> &&_pimpl); // NOLINT(build/c++11)
100
102 friend class Batch;
103 };
104 }
105}
106#endif