Gazebo Fuel_tools

API Reference

9.1.0
WorldIter.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_FUEL_TOOLS_WORLDITER_HH_
19 #define GZ_FUEL_TOOLS_WORLDITER_HH_
20 
21 #include <memory>
22 
23 #include "gz/fuel_tools/Helpers.hh"
24 
25 #ifdef _WIN32
26 // Disable warning C4251 which is triggered by
27 // std::unique_ptr
28 #pragma warning(push)
29 #pragma warning(disable: 4251)
30 #endif
31 
32 namespace gz::fuel_tools
33 {
35  class WorldIdentifier;
36  class WorldIterPrivate;
37  class WorldIterFactory;
38 
40  class GZ_FUEL_TOOLS_VISIBLE WorldIter
41  {
42  friend WorldIterFactory;
43 
46  protected: explicit WorldIter(std::unique_ptr<WorldIterPrivate> _dptr);
47 
50  public: WorldIter(WorldIter && _old);
51 
53  public: ~WorldIter();
54 
57  public: operator bool() const;
58 
61  public: operator WorldIdentifier() const;
62 
65  public: WorldIter &operator++();
66 
70 
74 
76  private: std::unique_ptr<WorldIterPrivate> dataPtr;
77  };
78 } // namespace gz::fuel_tools
79 
80 #ifdef _MSC_VER
81 #pragma warning(pop)
82 #endif
83 
84 #endif // GZ_FUEL_TOOLS_WORLDITER_HH_