getCurrentBackend#
Fully qualified name: isaacsim::foundation::utils::getCurrentBackend
- std::string isaacsim::foundation::utils::getCurrentBackend(
- const std::initializer_list<std::string> &supportedBackends,
- std::optional<bool> raiseOnUnsupported = std::nullopt,
Returns the currently active backend name for this thread.
If a BackendGuard is active on this thread, its backend name is returned. Otherwise, the first entry of
supportedBackendsis used as the default.If the active backend is not in
supportedBackends, the behavior depends onraiseOnUnsupported(and the corresponding flag stored in the context):If either is
true, astd::runtime_erroris thrown.Otherwise, the first entry of
supportedBackendsis returned as a fallback.
- Parameters:
supportedBackends – [in] Ordered list of backend names accepted by the caller. The first entry is used as the default and fallback.
raiseOnUnsupported – [in] Override for the raise-on-unsupported flag. When not
nullopt, takes precedence over the value stored in the context.
- Throws:
- Returns:
The active backend name, or the first entry of
supportedBackendsas fallback.- Pre:
supportedBackendsmust not be empty.