mc_rtc::gui::details::FormImpl< Callback > Struct Template Reference

#include <mc_rtc/gui/Form.h>

Inheritance diagram for mc_rtc::gui::details::FormImpl< Callback >:
Collaboration diagram for mc_rtc::gui::details::FormImpl< Callback >:

Public Member Functions

template<typename... Args>
 FormImpl (const std::string &name, Callback cb, Args &&... args)
 
void write (mc_rtc::MessagePackBuilder &builder)
 
 FormImpl ()
 
- Public Member Functions inherited from mc_rtc::gui::CallbackElement< Element, Callback >
bool handleRequest (const mc_rtc::Configuration &data)
 
 CallbackElement (const std::string &name, Callback cb, Args &&... args)
 
 CallbackElement ()
 
- Public Member Functions inherited from mc_rtc::gui::Element
const std::string & name () const
 
int id () const
 
void id (int idIn)
 
void write (mc_rtc::MessagePackBuilder &)
 
bool handleRequest (const mc_rtc::Configuration &)
 
 Element ()
 
- 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 size_t write_size ()
 
- Static Public Member Functions inherited from mc_rtc::gui::Element
static constexpr size_t write_size ()
 

Static Public Attributes

static constexpr auto type = Elements::Form
 

Additional Inherited Members

- Protected Member Functions inherited from mc_rtc::gui::Element
 Element (const std::string &name)
 
- 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::CallbackElement< Element, Callback >
Callback cb_
 
- Protected Attributes inherited from mc_rtc::gui::Element
std::string name_
 
int id_
 
- 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 Callback>
struct mc_rtc::gui::details::FormImpl< Callback >

Create a user-defined form

A form is composed of 1 or more elements (FormInput) that can be required for the form completion (this must be checked on client side)

Template Parameters
CallbackWill be called when the form is completed on client side

Constructor & Destructor Documentation

◆ FormImpl() [1/2]

template<typename Callback >
template<typename... Args>
mc_rtc::gui::details::FormImpl< Callback >::FormImpl ( const std::string &  name,
Callback  cb,
Args &&...  args 
)
inline

◆ FormImpl() [2/2]

template<typename Callback >
mc_rtc::gui::details::FormImpl< Callback >::FormImpl ( )
inline

Invalid element

Member Function Documentation

◆ write()

template<typename Callback >
void mc_rtc::gui::details::FormImpl< Callback >::write ( mc_rtc::MessagePackBuilder builder)
inline

◆ write_size()

template<typename Callback >
static constexpr size_t mc_rtc::gui::details::FormImpl< Callback >::write_size ( )
inlinestaticconstexpr

Member Data Documentation

◆ type

template<typename Callback >
constexpr auto mc_rtc::gui::details::FormImpl< Callback >::type = Elements::Form
staticconstexpr

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