Gazebo Transport

API Reference

11.4.1
gz/transport/log/Batch.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 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_BATCH_HH_
19 #define GZ_TRANSPORT_LOG_BATCH_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 BatchPrivate;
38  class Log;
39 
41  class IGNITION_TRANSPORT_LOG_VISIBLE Batch
42  {
44  public: Batch();
45 
48  public: Batch(Batch &&_old); // NOLINT
49 
53  public: Batch& operator=(Batch &&_other); // NOLINT
54 
56  public: ~Batch();
57 
59  public: using iterator = MsgIter;
60 
65  public: iterator begin();
66 
72  public: iterator end();
73 
74 #ifdef _WIN32
75 // Disable warning C4251 which is triggered by
76 // std::*
77 #pragma warning(push)
78 #pragma warning(disable: 4251)
79 #endif
80  private: std::unique_ptr<BatchPrivate> dataPtr;
82 #ifdef _WIN32
83 #pragma warning(pop)
84 #endif
85 
89  private: Batch(
90  std::unique_ptr<BatchPrivate> &&_pimpl); // NOLINT(build/c++11)
91 
93  friend class Log;
94  };
95  }
96  }
97  }
98 }
99 #endif
Definition: gz/transport/AdvertiseOptions.hh:28
Holds the result of a query for messages.
Definition: gz/transport/log/Batch.hh:41
Interface to a log file.
Definition: gz/transport/log/Log.hh:45
Implements iterator for reading messages.
Definition: gz/transport/log/MsgIter.hh:41