Gazebo Physics

API Reference

8.0.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::CombineLists< FeaturesT... >::Result
 
using FeatureTuple = std::tuple< FeaturesT... >
 
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 SomeFeatureList.
 
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::CombineLists<FeaturesT...>::Result

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.

◆ FeatureTuple

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

◆ 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 SomeFeatureList.

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: