Gazebo Transport

API Reference

11.4.1
gz/transport/log/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 
27 namespace ignition
28 {
29  namespace transport
30  {
31  namespace log
32  {
33  // Inline bracket to help doxygen filtering.
34  inline namespace IGNITION_TRANSPORT_VERSION_NAMESPACE {
35  //
37  class MsgIterPrivate;
38  class Log;
39 
41  class IGNITION_TRANSPORT_LOG_VISIBLE MsgIter
42  {
44  public: MsgIter();
45 
48  public: MsgIter(MsgIter &&_orig); // NOLINT
49 
51  public: ~MsgIter();
52 
56  // public: MsgIter &operator=(const MsgIter &_orig);
57 
60  public: MsgIter &operator++();
61 
65  public: bool operator==(const MsgIter &_other) const;
66 
70  public: bool operator!=(const MsgIter &_other) const;
71 
75  public: MsgIter& operator=(MsgIter &&_other); // NOLINT
76 
79  public: const Message &operator*() const;
80 
83  public: const Message *operator->() const;
84 
85 #ifdef _WIN32
86 // Disable warning C4251 which is triggered by
87 // std::*
88 #pragma warning(push)
89 #pragma warning(disable: 4251)
90 #endif
91  private: std::unique_ptr<MsgIterPrivate> dataPtr;
93 #ifdef _WIN32
94 #pragma warning(pop)
95 #endif
96 
100  private: MsgIter(
101  std::unique_ptr<MsgIterPrivate> &&_pimpl); // NOLINT(build/c++11)
102 
104  friend class Batch;
105  };
106  }
107  }
108  }
109 }
110 #endif
Definition: gz/transport/AdvertiseOptions.hh:28
Holds the result of a query for messages.
Definition: gz/transport/log/Batch.hh:41
Implements iterator for reading messages.
Definition: gz/transport/log/MsgIter.hh:41
T log(T... args)
Represents a message in a bag file.
Definition: gz/transport/log/Message.hh:40