mc_rtc::gui::FormGenericArrayInput< T > Struct Template Reference

#include <mc_rtc/gui/Form.h>

Inheritance diagram for mc_rtc::gui::FormGenericArrayInput< T >:
Collaboration diagram for mc_rtc::gui::FormGenericArrayInput< T >:

Public Member Functions

template<typename = std::enable_if_t<!details::is_form_element_v<T>>>
 FormGenericArrayInput (const std::string &name, bool required, T data={})
 
template<typename Element , typename = std::enable_if_t<details::is_form_element_v<Element>>>
 FormGenericArrayInput (const std::string &name, bool required, Element &&element, T data={})
 
void write_ (mc_rtc::MessagePackBuilder &builder)
 
- Public Member Functions inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
void write (mc_rtc::MessagePackBuilder &builder)
 
 FormElement ()
 
- Public Member Functions inherited from mc_rtc::gui::details::FormElements
template<typename... Args>
 FormElements (Args &&... args)
 
template<typename T >
void addElement (T &&element)
 
void write_impl (mc_rtc::MessagePackBuilder &builder)
 

Static Public Member Functions

static constexpr bool is_dynamic ()
 
static constexpr size_t write_size_ ()
 
- Static Public Member Functions inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
static constexpr size_t write_size ()
 
static constexpr bool is_dynamic ()
 

Additional Inherited Members

- Public Types inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
using is_form_element_t = std::true_type
 
- Static Public Attributes inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
static constexpr auto type
 
- Protected Member Functions inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
 FormElement (const std::string &name, bool required)
 
- Protected Member Functions inherited from mc_rtc::gui::details::FormElements
template<typename... Args>
void write_elements (mc_rtc::MessagePackBuilder &, Args &&...)
 
template<typename Arg , typename... Args>
void write_elements (mc_rtc::MessagePackBuilder &builder, Arg &&element, Args &&... args)
 
template<typename T >
void addDynamicElement (T &&element)
 
- Protected Attributes inherited from mc_rtc::gui::FormElement< FormGenericArrayInput< details::VoidValue >, Elements::GenericArray >
std::string name_
 
bool required_
 
- Protected Attributes inherited from mc_rtc::gui::details::FormElements
size_t count_
 
std::vector< std::function< void(mc_rtc::MessagePackBuilder &)> > dynamic_elements_
 
std::vector< char > data_
 
size_t data_size_
 

Detailed Description

template<typename T = details::VoidValue>
struct mc_rtc::gui::FormGenericArrayInput< T >

Creates an inputs to build a generic array

The element you pass to this element will be used to build the list, e.g.:

  • FormCheckbox will output a list of booleans
  • FormStringInput a list of strings
  • FormPoint3DInput a list of 3D points
  • FormObjectInput will output a list of objects

The name of the element you pass to this function has no effect

Constructor & Destructor Documentation

◆ FormGenericArrayInput() [1/2]

template<typename T = details::VoidValue>
template<typename = std::enable_if_t<!details::is_form_element_v<T>>>
mc_rtc::gui::FormGenericArrayInput< T >::FormGenericArrayInput ( const std::string &  name,
bool  required,
data = {} 
)
inline

◆ FormGenericArrayInput() [2/2]

template<typename T = details::VoidValue>
template<typename Element , typename = std::enable_if_t<details::is_form_element_v<Element>>>
mc_rtc::gui::FormGenericArrayInput< T >::FormGenericArrayInput ( const std::string &  name,
bool  required,
Element &&  element,
data = {} 
)
inline

Member Function Documentation

◆ is_dynamic()

template<typename T = details::VoidValue>
static constexpr bool mc_rtc::gui::FormGenericArrayInput< T >::is_dynamic ( )
inlinestaticconstexpr

◆ write_()

template<typename T = details::VoidValue>
void mc_rtc::gui::FormGenericArrayInput< T >::write_ ( mc_rtc::MessagePackBuilder builder)
inline

◆ write_size_()

template<typename T = details::VoidValue>
static constexpr size_t mc_rtc::gui::FormGenericArrayInput< T >::write_size_ ( )
inlinestaticconstexpr

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