mc_rtc::gui::details Namespace Reference

Classes

struct  ArrayInputImpl
 
struct  ArrayLabelImpl
 
struct  ArrowImpl
 
struct  ArrowROImpl
 
struct  ButtonImpl
 
struct  CallbackOrValue
 
struct  CallbackOrValue< VoidValue >
 
struct  CheckboxImpl
 
struct  CheckReturnType
 
struct  CheckReturnType< GetT, T >
 
struct  CheckReturnType< GetT, T, Args... >
 
struct  ColoredPolyhedronImpl
 
struct  ComboInputImpl
 
struct  DataComboInputImpl
 
struct  ForceImpl
 
struct  ForceROImpl
 
struct  FormArrayInput
 
struct  FormattedTableImpl
 
struct  FormDataInput
 
struct  FormDataInputBase
 
struct  FormElements
 
struct  FormImpl
 
struct  FormInteractiveDataInput
 
struct  IntegerInputImpl
 
struct  is_form_element
 
struct  is_variant
 
struct  is_variant< std::variant< Args... > >
 
struct  LabelImpl
 
struct  Labels
 
struct  Labels< Eigen::Quaterniond >
 
struct  Labels< Eigen::Vector2d >
 
struct  Labels< Eigen::Vector3d >
 
struct  Labels< Eigen::Vector4d >
 
struct  Labels< sva::ForceVecd >
 
struct  Labels< sva::ImpedanceVecd >
 
struct  Labels< sva::MotionVecd >
 
struct  NotAGetter
 
struct  NumberInputImpl
 
struct  NumberSliderImpl
 
struct  Point3DImpl
 
struct  PolygonImpl
 
struct  PolyhedronTrianglesListImpl
 
struct  PolyhedronVerticesTrianglesImpl
 
struct  ReturnType
 
struct  ReturnTypeImpl
 
struct  ReturnTypeImpl< GetT, false >
 
struct  RobotImpl
 
struct  RobotMsgImpl
 
struct  RotationImpl
 
struct  RPYLabels
 
struct  RPYLabels< false >
 
struct  SchemaImpl
 
struct  StaticTableImpl
 
struct  StringInputImpl
 
struct  TableImpl
 
struct  TrajectoryImpl
 
struct  TransformImpl
 
struct  VisualImpl
 
struct  VoidValue
 
struct  XYThetaImpl
 

Typedefs

template<typename... >
using void_t = void
 
template<typename GetT >
using ReturnTypeT = typename ReturnType< GetT >::type
 

Functions

template<typename GetT >
constexpr bool is_getter_impl (void_t< decltype(std::declval< GetT >()())> *)
 
template<typename GetT >
constexpr bool is_getter_impl (...)
 
template<typename GetT >
constexpr bool is_getter ()
 
template<typename T >
auto read (const T &&value)
 
template<bool Degrees, typename T >
auto read_rpy (const T &&value)
 
template<typename T >
auto read (const T &value)
 
template<bool Degrees, typename T >
auto read_rpy (const T &value)
 
template<typename T >
auto write (T &value)
 
template<typename T >
auto GetValueOrCallbackValue (const T &value_or_cb)
 

Variables

template<typename CallbackT , typename FunT >
constexpr bool has_compatible_signature_v = std::is_convertible_v<CallbackT, std::function<FunT>>
 
template<typename T >
constexpr bool is_variant_v = is_variant<T>::value
 
template<typename T >
constexpr bool is_form_element_v = decltype(is_form_element::test<T>(nullptr))::value
 

Detailed Description

This file contains some utility template metaprogramming functions for the GUI

Typedef Documentation

◆ ReturnTypeT

template<typename GetT >
using mc_rtc::gui::details::ReturnTypeT = typedef typename ReturnType<GetT>::type

Helper

◆ void_t

template<typename... >
using mc_rtc::gui::details::void_t = typedef void

Same as std::void_t

Function Documentation

◆ GetValueOrCallbackValue()

template<typename T >
auto mc_rtc::gui::details::GetValueOrCallbackValue ( const T &  value_or_cb)

If

Template Parameters
Tis callable returns value_or_cb() otherwise return value_or_cb

◆ is_getter()

template<typename GetT >
constexpr bool mc_rtc::gui::details::is_getter ( )
constexpr

This traits is true if:

  • Template Parameters
    GetTis a nullary functor
  • Template Parameters
    GetTfunctor returns a non-void value

◆ is_getter_impl() [1/2]

template<typename GetT >
constexpr bool mc_rtc::gui::details::is_getter_impl (   ...)
constexpr

◆ is_getter_impl() [2/2]

template<typename GetT >
constexpr bool mc_rtc::gui::details::is_getter_impl ( void_t< decltype(std::declval< GetT >()())> *  )
constexpr

Helper for is_getter

◆ read() [1/2]

template<typename T >
auto mc_rtc::gui::details::read ( const T &&  value)

Wrap a temporary value into a callback

◆ read() [2/2]

template<typename T >
auto mc_rtc::gui::details::read ( const T &  value)

Wrap a variable into a callback

◆ read_rpy() [1/2]

template<bool Degrees, typename T >
auto mc_rtc::gui::details::read_rpy ( const T &&  value)

Read RPY angles from a value

◆ read_rpy() [2/2]

template<bool Degrees, typename T >
auto mc_rtc::gui::details::read_rpy ( const T &  value)

Read RPY angles from a variable

◆ write()

template<typename T >
auto mc_rtc::gui::details::write ( T &  value)

Make a setter callback for a variable

Variable Documentation

◆ has_compatible_signature_v

template<typename CallbackT , typename FunT >
constexpr bool mc_rtc::gui::details::has_compatible_signature_v = std::is_convertible_v<CallbackT, std::function<FunT>>
inlineconstexpr

◆ is_form_element_v

template<typename T >
constexpr bool mc_rtc::gui::details::is_form_element_v = decltype(is_form_element::test<T>(nullptr))::value
inlineconstexpr

◆ is_variant_v

template<typename T >
constexpr bool mc_rtc::gui::details::is_variant_v = is_variant<T>::value
inlineconstexpr