Ignition Physics

API Reference

2.3.0
RequestEngine< FeaturePolicyT, FeatureListT > Struct Template Reference

This class provides utilities for inspecting what features are available in a plugin. More...

#include <RequestEngine.hh>

Public Types

using EnginePtrType = EnginePtr< FeaturePolicyT, FeatureListT >
 
using Features = FeatureListT
 

Static Public Member Functions

template<typename PtrT >
static EnginePtrType From (const PtrT &_pimpl, const std::size_t _engineID=0)
 Get an Engine from the given physics plugin. More...
 
template<typename PtrT >
static std::set< std::stringMissingFeatureNames (const PtrT &_pimpl)
 Get a set of the names of the requested features that are missing from this plugin. More...
 
template<typename PtrT >
static bool Verify (const PtrT &_pimpl)
 Check that a physics plugin has all the requested features. More...
 

Detailed Description

template<typename FeaturePolicyT, typename FeatureListT>
struct ignition::physics::RequestEngine< FeaturePolicyT, FeatureListT >

This class provides utilities for inspecting what features are available in a plugin.

Member Typedef Documentation

◆ EnginePtrType

using EnginePtrType = EnginePtr<FeaturePolicyT, FeatureListT>

◆ Features

using Features = FeatureListT

Member Function Documentation

◆ From()

static EnginePtrType From ( const PtrT &  _pimpl,
const std::size_t  _engineID = 0 
)
static

Get an Engine from the given physics plugin.

Parameters
[in]_pimplPluginPtr to the physics plugin
[in]_engineIDThe ID of the engine that you want to receive from the plugin. Usually this will be 0. The result of requesting a value other than 0 is determined by the plugin that you are using.
Template Parameters
PtrTThe type of PluginPtr that you are providing. This will typically be inferred from the input argument.
Returns
A pointer to a physics engine with the requested features. If any of the requested features aren't available in the given plugin, this will be a nullptr. MissingFeatureNames() can be used to inspect which features are missing.

◆ MissingFeatureNames()

static std::set<std::string> MissingFeatureNames ( const PtrT &  _pimpl)
static

Get a set of the names of the requested features that are missing from this plugin.

Parameters
[in]_pimplThe PluginPtr to the plugin.
Template Parameters
PtrTThe type of PluginPtr that you are providing. This will typically be inferred from the input argument.
Returns
A set of all the names of the requested features that are missing from the plugin.

◆ Verify()

static bool Verify ( const PtrT &  _pimpl)
static

Check that a physics plugin has all the requested features.

Parameters
[in]_pimplThe PluginPtr to the plugin.
Template Parameters
PtrTThe type of PluginPtr that you are providing. This will typically be inferred from the input argument.
Returns
True if all the requested features are available from the plugin.

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