Caffa  1.1.0
C++ Application Framework for Embedded Systems with introspection
Public Member Functions | List of all members
caffa::DataFieldAccessor< DataType > Class Template Referenceabstract

Abstract but typed data field accessor. Inherit to create different storage mechanisms. More...

#include <cafDataFieldAccessor.h>

Inheritance diagram for caffa::DataFieldAccessor< DataType >:
Inheritance graph
[legend]
Collaboration diagram for caffa::DataFieldAccessor< DataType >:
Collaboration graph
[legend]

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...
 

Detailed Description

template<class DataType>
class caffa::DataFieldAccessor< DataType >

Abstract but typed data field accessor. Inherit to create different storage mechanisms.

Template Parameters
DataType

Member Function Documentation

◆ clone()

template<class DataType >
virtual std::unique_ptr<DataFieldAccessor<DataType> > caffa::DataFieldAccessor< DataType >::clone ( ) const
pure virtual

Clone the accessor using polymorphism.

Returns
A unique pointer to object of implementation class.

Implemented in caffa::rpc::DataFieldAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::DataFieldDirectStorageAccessor< DataType >.

◆ setValue()

template<class DataType >
virtual void caffa::DataFieldAccessor< DataType >::setValue ( const DataType &  value)
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.

Parameters
valueThe value to set

Implemented in caffa::rpc::DataFieldAccessor< DataType >, caffa::FieldProxyAccessor< DataType >, and caffa::DataFieldDirectStorageAccessor< DataType >.

◆ value()

template<class DataType >
virtual DataType caffa::DataFieldAccessor< DataType >::value ( )
pure virtual

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