Gazebo Fuel_tools

API Reference

8.2.0
gz/fuel_tools/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
33 {
34  namespace fuel_tools
35  {
37  class WorldIdentifier;
38  class WorldIterPrivate;
39  class WorldIterFactory;
40 
42  class GZ_FUEL_TOOLS_VISIBLE WorldIter
43  {
44  friend WorldIterFactory;
45 
48  protected: explicit WorldIter(std::unique_ptr<WorldIterPrivate> _dptr);
49 
52  public: WorldIter(WorldIter && _old);
53 
55  public: ~WorldIter();
56 
59  public: operator bool() const;
60 
63  public: operator WorldIdentifier() const;
64 
67  public: WorldIter &operator++();
68 
71  public: WorldIdentifier *operator->();
72 
75  public: WorldIdentifier &operator*();
76 
78  private: std::unique_ptr<WorldIterPrivate> dataPtr;
79  };
80  }
81 }
82 
83 #ifdef _MSC_VER
84 #pragma warning(pop)
85 #endif
86 
87 #endif