Gazebo Physics

API Reference

8.0.0
RequestEngine.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_REQUESTENGINE_HH_
19#define GZ_PHYSICS_REQUESTENGINE_HH_
20
21#include <memory>
22#include <set>
23#include <string>
24
26
27namespace gz
28{
29 namespace physics
30 {
33 template <typename FeaturePolicyT, typename FeatureListT>
35 {
36 // Forward declaration of the Engine type that will be returned
37 using EnginePtrType = EnginePtr<FeaturePolicyT, FeatureListT>;
38
39 // Tuple of features that are being requested
40 using Features = FeatureListT;
41
58 template <typename PtrT>
60 const PtrT &_pimpl,
61 const std::size_t _engineID = 0);
62
73 template <typename PtrT>
74 static bool Verify(const PtrT &_pimpl);
75
87 template <typename PtrT>
88 static std::set<std::string> MissingFeatureNames(const PtrT &_pimpl);
89 };
90
91#define GZ_PHYSICS_REQUEST_FEATURES_MACRO(X) \
92 template <typename FeatureList> \
93 using RequestEngine ## X = \
94 RequestEngine<FeaturePolicy ## X, FeatureList>;
95
100 }
101}
102
103#include <gz/physics/detail/RequestEngine.hh>
104
105#endif