Fawkes API  Fawkes Development Version
XabslInterfaceFieldWrapper< XabslType, FieldType > Class Template Reference

Interface field wrapper for Xabsl. More...

#include <iface_field_wrapper.h>

Inheritance diagram for XabslInterfaceFieldWrapper< XabslType, FieldType >:

Public Member Functions

 XabslInterfaceFieldWrapper (fawkes::Interface::interface_fieldtype_t type, const char *name, FieldType *value)
 Constructor. More...
 
 ~XabslInterfaceFieldWrapper ()
 Destructor. More...
 
const char * get_name () const
 Get name of the field. More...
 
fawkes::Interface::interface_fieldtype_t get_type () const
 Get type of the field. More...
 
XabslType get_value () const
 Get current value. More...
 
void set_value (XabslType new_value)
 Set new value. More...
 

Detailed Description

template<typename XabslType, typename FieldType>
class XabslInterfaceFieldWrapper< XabslType, FieldType >

Interface field wrapper for Xabsl.

This wraps a field of an iterface in a Xabsl function provider such that the field can be used as input and/or output symbol in Xabsl. This class does an implicit conversion of types. For instance in a BlackBoard interface floats are stored, while Xabsl requires doubles. With an explicit casting conversion code is generated by the compiler to make it work.

Author
Tim Niemueller.

Definition at line 39 of file iface_field_wrapper.h.

Constructor & Destructor Documentation

◆ XabslInterfaceFieldWrapper()

template<typename XabslType, typename FieldType>
XabslInterfaceFieldWrapper< XabslType, FieldType >::XabslInterfaceFieldWrapper ( fawkes::Interface::interface_fieldtype_t  type,
const char *  name,
FieldType *  value 
)
inline

Constructor.

Parameters
typevalue type of the field
namename of the field
valuepointer to the value of the field

Definition at line 47 of file iface_field_wrapper.h.

◆ ~XabslInterfaceFieldWrapper()

template<typename XabslType, typename FieldType>
XabslInterfaceFieldWrapper< XabslType, FieldType >::~XabslInterfaceFieldWrapper ( )
inline

Destructor.

Definition at line 54 of file iface_field_wrapper.h.

Member Function Documentation

◆ get_name()

template<typename XabslType, typename FieldType>
const char* XabslInterfaceFieldWrapper< XabslType, FieldType >::get_name ( void  ) const
inline

Get name of the field.

Returns
name of the field.

Definition at line 62 of file iface_field_wrapper.h.

◆ get_type()

template<typename XabslType, typename FieldType>
fawkes::Interface::interface_fieldtype_t XabslInterfaceFieldWrapper< XabslType, FieldType >::get_type ( ) const
inline

Get type of the field.

Returns
type of the field.

Definition at line 70 of file iface_field_wrapper.h.

◆ get_value()

template<typename XabslType, typename FieldType>
XabslType XabslInterfaceFieldWrapper< XabslType, FieldType >::get_value ( ) const
inline

Get current value.

Returns
current value in the Xabsl type

Definition at line 78 of file iface_field_wrapper.h.

◆ set_value()

template<typename XabslType, typename FieldType>
void XabslInterfaceFieldWrapper< XabslType, FieldType >::set_value ( XabslType  new_value)
inline

Set new value.

Parameters
new_valuenew value, converted to field type

Definition at line 86 of file iface_field_wrapper.h.


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