Ignition Transport

API Reference

8.0.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 IGNITION_TRANSPORT_LOG_MSGITER_HH_
19 #define IGNITION_TRANSPORT_LOG_MSGITER_HH_
20 
21 #include <memory>
22 
23 #include <ignition/transport/config.hh>
24 #include <ignition/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  // TODO(anyone)
49  // public: MsgIter(const MsgIter &_orig);
50 
53  public: MsgIter(MsgIter &&_orig); // NOLINT
54 
56  public: ~MsgIter();
57 
61  // public: MsgIter &operator=(const MsgIter &_orig);
62 
65  public: MsgIter &operator++();
66 
69  // TODO(anyone)
70  // public: MsgIter operator++(int);
71 
75  public: bool operator==(const MsgIter &_other) const;
76 
80  public: bool operator!=(const MsgIter &_other) const;
81 
85  public: MsgIter& operator=(MsgIter &&_other); // NOLINT
86 
89  public: const Message &operator*() const;
90 
93  public: const Message *operator->() const;
94 
95 #ifdef _WIN32
96 // Disable warning C4251 which is triggered by
97 // std::*
98 #pragma warning(push)
99 #pragma warning(disable: 4251)
100 #endif
101  public: std::unique_ptr<MsgIterPrivate> dataPtr;
103 #ifdef _WIN32
104 #pragma warning(pop)
105 #endif
106 
110  private: MsgIter(
111  std::unique_ptr<MsgIterPrivate> &&_pimpl); // NOLINT(build/c++11)
112 
114  friend class Batch;
115  };
116  }
117  }
118  }
119 }
120 #endif
T log(T... args)
Represents a message in a bag file.
Definition: Message.hh:40
Holds the result of a query for messages.
Definition: Batch.hh:41
Implements iterator for reading messages.
Definition: MsgIter.hh:41
Definition: AdvertiseOptions.hh:28