Ignition Physics

API Reference

2.0.0
RemoveEntities.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 IGNITION_PHYSICS_REMOVEENTITIES_HH_
19 #define IGNITION_PHYSICS_REMOVEENTITIES_HH_
20 
21 #include <string>
22 
24 
25 namespace ignition
26 {
27  namespace physics
28  {
29  class IGNITION_PHYSICS_VISIBLE RemoveModelFromWorld : public virtual Feature
30  {
31  public: template <typename PolicyT, typename FeaturesT>
32  class World : public virtual Feature::World<PolicyT, FeaturesT>
33  {
38  public: bool RemoveModel(std::size_t _index);
39 
44  public: bool RemoveModel(const std::string &_name);
45  };
46 
47  public: template <typename PolicyT, typename FeaturesT>
48  class Model : public virtual Feature::Model<PolicyT, FeaturesT>
49  {
52  public: bool Remove();
53 
55  public: bool Removed() const;
56  };
57 
58  public: template <typename PolicyT>
59  class Implementation : public virtual Feature::Implementation<PolicyT>
60  {
61  // World functions
62  public: virtual bool RemoveModelByIndex(
63  const Identity &_worldID, std::size_t _modelIndex) = 0;
64 
65  public: virtual bool RemoveModelByName(
66  const Identity &_worldID, const std::string &_modelName) = 0;
67 
68  // Model functions
69  public: virtual bool RemoveModel(
70  const Identity &_modelID) = 0;
71 
72  public: virtual bool ModelRemoved(const Identity &_modelID) const = 0;
73  };
74  };
75 
78  >;
79  }
80 }
81 
82 #include <ignition/physics/detail/RemoveEntities.hh>
83 
84 #endif
This class defines the concept of a Feature. It should be inherited by classes that define some plugi...
Definition: Feature.hh:35
STL class.
Definition: RemoveEntities.hh:48
Placeholder class in case a Feature does not define its own World API.
Definition: Feature.hh:49
Definition: RemoveEntities.hh:32
Placeholder class in case a Feature does not define its own Model API.
Definition: Feature.hh:58
Definition: RemoveEntities.hh:29
Use a FeatureList to aggregate a list of Features.
Definition: FeatureList.hh:51