Gazebo Physics

API Reference

8.0.0~pre2
Feature.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 GZ_PHYSICS_FEATURE_HH_
19#define GZ_PHYSICS_FEATURE_HH_
20
21#include <cstddef>
22#include <memory>
23#include <tuple>
24
25#include <gz/physics/Export.hh>
26#include <gz/physics/Entity.hh>
27
28namespace gz
29{
30 namespace physics
31 {
35 class Feature
36 {
39 public: template <typename Policy, typename FeaturesT>
40 class Engine : public virtual Entity<Policy, FeaturesT>
41 {
43 public: virtual ~Engine() = default;
44 };
45
48 public: template <typename Policy, typename FeaturesT>
49 class World : public virtual Entity<Policy, FeaturesT>
50 {
52 public: virtual ~World() = default;
53 };
54
57 public: template <typename Policy, typename FeaturesT>
58 class Model : public virtual Entity<Policy, FeaturesT>
59 {
61 public: virtual ~Model() = default;
62 };
63
66 public: template <typename Policy, typename FeaturesT>
67 class Link : public virtual Entity<Policy, FeaturesT>
68 {
70 public: virtual ~Link() = default;
71 };
72
75 public: template <typename Policy, typename FeaturesT>
76 class Joint : public virtual Entity<Policy, FeaturesT>
77 {
79 public: virtual ~Joint() = default;
80 };
81
84 public: template <typename Policy, typename FeaturesT>
85 class Shape : public virtual Entity<Policy, FeaturesT>
86 {
88 public: virtual ~Shape() = default;
89 };
90
91 public: template <typename Policy>
92 class Implementation : public detail::Implementation
93 {
107 public: virtual Identity InitiateEngine(std::size_t engineID = 0) = 0;
108
110 public: virtual ~Implementation() = default;
111 };
112
117 template <typename SomeFeatureList, bool /*AssertNoConflict*/ = false>
118 static constexpr bool ConflictsWith()
119 {
120 return false;
121 }
122
127 using RequiredFeatures = void;
128 };
129 }
130}
131
132#endif