Ignition Fuel_tools

API Reference

8.0.0~pre1
LocalCache.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_FUEL_TOOLS_LOCALCACHE_HH_
19 #define IGNITION_FUEL_TOOLS_LOCALCACHE_HH_
20 
21 #include <memory>
22 #include <string>
23 
28 
29 #ifdef _WIN32
30 // Disable warning C4251 which is triggered by
31 // std::shared_ptr
32 #pragma warning(push)
33 #pragma warning(disable: 4251)
34 #endif
35 
36 namespace ignition
37 {
38  namespace fuel_tools
39  {
41  class ClientConfig;
42  class LocalCachePrivate;
43  class ModelIdentifier;
44 
46  class IGNITION_FUEL_TOOLS_VISIBLE LocalCache
47  {
50  public:
51  explicit IGN_DEPRECATED(5) LocalCache(const ClientConfig *_config);
52 
54  public: virtual ~LocalCache();
55 
58  public: virtual ModelIter AllModels();
59 
62  public: virtual WorldIter AllWorlds() const;
63 
67  public: virtual Model MatchingModel(const ModelIdentifier &_id);
68 
72  public: virtual bool MatchingWorld(WorldIdentifier &_id) const;
73 
78  public: virtual ModelIter MatchingModels(const ModelIdentifier &_id);
79 
84  public: virtual WorldIter MatchingWorlds(
85  const WorldIdentifier &_id) const;
86 
93  public: virtual bool SaveModel(
94  const ModelIdentifier &_id,
95  const std::string &_data,
96  const bool _overwrite);
97 
103  public: virtual bool SaveWorld(
104  WorldIdentifier &_id,
105  const std::string &_data,
106  const bool _overwrite);
107 
109  private: std::shared_ptr<LocalCachePrivate> dataPtr;
110  };
111  }
112 }
113 
114 #ifdef _MSC_VER
115 #pragma warning(pop)
116 #endif
117 
118 #endif
High level interface to ignition fuel.
Definition: ClientConfig.hh:109
Class for managing stuff in the local cache.
Definition: LocalCache.hh:46
Defines how to identify a world.
Definition: WorldIdentifier.hh:42
class for iterating through worlds
Definition: WorldIter.hh:42
Defines how to identify a model.
Definition: ModelIdentifier.hh:45
STL class.
class for iterating through models
Definition: ModelIter.hh:43
Defines how to identify a model.
Definition: Model.hh:67