Gazebo Physics

API Reference

9.2.0
FeatureList< FeaturesT > Struct Template Reference

Use a FeatureList to aggregate a list of Features. More...

#include <FeatureList.hh>

Public Types

using Features = typename detail::ToTuple< FlatFeatureTypeList >::type
 
using FeatureTuple = std::tuple< FeaturesT... >
 std::tuple containing the raw list of features
 
using FeatureTypeList = TypeList< FeaturesT... >
 TypeList containing the raw list of features.
 
using FlatFeatureTypeList = typename detail::CombineLists< FeaturesT... >::Result
 
using RequiredFeatures = void
 All the features required by this FeatureList will be included in CombineLists.
 

Static Public Member Functions

template<typename SomeFeatureList , bool AssertNoConflict = false>
static constexpr bool ConflictsWith ()
 A static constexpr function which indicates whether any features in SomeFeatureList conflict with any features in this list.
 
template<typename F >
static constexpr bool HasFeature ()
 A static constexpr function which indicates whether a given Feature, F, is contained in this list.
 

Detailed Description

template<typename... FeaturesT>
struct gz::physics::FeatureList< FeaturesT >

Use a FeatureList to aggregate a list of Features.

FeatureLists can be constructed in hierarchies, e.g. a FeatureList can be passed into another FeatureList, and the set of all features in the new list will be the sum.

// FeatureA, FeatureB, AdvancedA, and AdvancedB are all feature classes.

Member Typedef Documentation

◆ Features

template<typename... FeaturesT>
using Features = typename detail::ToTuple<FlatFeatureTypeList>::type

Features is a std::tuple containing all the feature classes that are bundled in this list. This list is fully seralialized; any hierarchy that was used to construct this FeatureList will be collapsed in this member.

Note
This type is the same as FlatFeatureTypeList but the features are contained in a std::tuple. Users are encouraged to use FlatFeatureTypeList since it provides faster build times

◆ FeatureTuple

template<typename... FeaturesT>
using FeatureTuple = std::tuple<FeaturesT...>

std::tuple containing the raw list of features

◆ FeatureTypeList

template<typename... FeaturesT>
using FeatureTypeList = TypeList<FeaturesT...>

TypeList containing the raw list of features.

◆ FlatFeatureTypeList

template<typename... FeaturesT>
using FlatFeatureTypeList = typename detail::CombineLists<FeaturesT...>::Result

FlatFeatureTypeList is a TypeList containing all the feature classes that are bundled in this list. This list is fully seralialized; any hierarchy that was used to construct this FeatureList will be collapsed in this member.

◆ RequiredFeatures

template<typename... FeaturesT>
using RequiredFeatures = void

All the features required by this FeatureList will be included in CombineLists.

Member Function Documentation

◆ ConflictsWith()

template<typename... FeaturesT>
template<typename SomeFeatureList , bool AssertNoConflict = false>
static constexpr bool ConflictsWith ( )
staticconstexpr

A static constexpr function which indicates whether any features in SomeFeatureList conflict with any features in this list.

Template Parameters
SomeFeatureListThe list to compare against for conflicts.
AssertNoConflictSetting this to true will result in a static_assert if a conflict is found. That way, if a conflict exists, you will get a compilation error, and the compilation error will tell you which feature is conflicting.
Returns
true if any features in SomeFeatureList conflict with this list or vice versa.

◆ HasFeature()

template<typename... FeaturesT>
template<typename F >
static constexpr bool HasFeature ( )
staticconstexpr

A static constexpr function which indicates whether a given Feature, F, is contained in this list.

Template Parameters
FThe feature class to check for in this FeatureList
Returns
true if F is in this FeatureList; false otherwise.

The documentation for this struct was generated from the following file: