Caffa
1.1.0
C++ Application Framework for Embedded Systems with introspection
|
Abstract but typed data field accessor. Inherit to create different storage mechanisms. More...
#include <cafDataFieldAccessor.h>
Public Member Functions | |
virtual std::unique_ptr< DataFieldAccessor< DataType > > | clone () const =0 |
Clone the accessor using polymorphism. More... | |
virtual DataType | value ()=0 |
Get the field value. More... | |
virtual void | setValue (const DataType &value)=0 |
Set the value with the accessor. Will throw a std::runtime_exception if the accessor has limits and the value is outside those limits. More... | |
virtual bool | hasSetter () const =0 |
virtual bool | hasGetter () const =0 |
Abstract but typed data field accessor. Inherit to create different storage mechanisms.
DataType |
|
pure virtual |
Clone the accessor using polymorphism.
Implemented in caffa::DataFieldDirectStorageAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::rpc::DataFieldAccessor< DataType >.
|
pure virtual |
The accessor has a setter. Thus can be written to.
Implemented in caffa::DataFieldDirectStorageAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::rpc::DataFieldAccessor< DataType >.
|
pure virtual |
The accessor has a getter. Thus can be read.
Implemented in caffa::DataFieldDirectStorageAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::rpc::DataFieldAccessor< DataType >.
|
pure virtual |
Set the value with the accessor. Will throw a std::runtime_exception if the accessor has limits and the value is outside those limits.
value | The value to set |
Implemented in caffa::DataFieldDirectStorageAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::rpc::DataFieldAccessor< DataType >.
|
pure virtual |
Get the field value.
Implemented in caffa::DataFieldDirectStorageAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::rpc::DataFieldAccessor< DataType >.