Gazebo Physics

API Reference

8.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 GZ_PHYSICS_REMOVEENTITIES_HH_
19#define GZ_PHYSICS_REMOVEENTITIES_HH_
20
21#include <string>
22
24
25namespace gz
26{
27 namespace physics
28 {
32 class GZ_PHYSICS_VISIBLE RemoveModelFromWorld : public virtual Feature
33 {
34 public: template <typename PolicyT, typename FeaturesT>
35 class World : public virtual Feature::World<PolicyT, FeaturesT>
36 {
41 public: bool RemoveModel(std::size_t _index);
42
47 public: bool RemoveModel(const std::string &_name);
48 };
49
50 public: template <typename PolicyT, typename FeaturesT>
51 class Model : public virtual Feature::Model<PolicyT, FeaturesT>
52 {
55 public: bool Remove();
56
58 public: bool Removed() const;
59 };
60
61 public: template <typename PolicyT>
62 class Implementation : public virtual Feature::Implementation<PolicyT>
63 {
64 // World functions
65 public: virtual bool RemoveModelByIndex(
66 const Identity &_worldID, std::size_t _modelIndex) = 0;
67
68 public: virtual bool RemoveModelByName(
69 const Identity &_worldID, const std::string &_modelName) = 0;
70
71 // Model functions
72 public: virtual bool RemoveModel(
73 const Identity &_modelID) = 0;
74
75 public: virtual bool ModelRemoved(const Identity &_modelID) const = 0;
76 };
77 };
78
82 class GZ_PHYSICS_VISIBLE RemoveNestedModelFromModel
83 : public virtual Feature
84 {
85 public: template <typename PolicyT, typename FeaturesT>
86 class Model : public virtual Feature::Model<PolicyT, FeaturesT>
87 {
92 public: bool RemoveNestedModel(std::size_t _index);
93
98 public: bool RemoveNestedModel(const std::string &_name);
99 };
100
101 public: template <typename PolicyT>
102 class Implementation : public virtual Feature::Implementation<PolicyT>
103 {
104 public: virtual bool RemoveNestedModelByIndex(
105 const Identity &_modelID, std::size_t _modelIndex) = 0;
106
107 public: virtual bool RemoveNestedModelByName(
108 const Identity &_modelID, const std::string &_modelName) = 0;
109 };
110 };
111
115 >;
116 }
117}
118
119#include <gz/physics/detail/RemoveEntities.hh>
120
121#endif