Caffa  0.12.1
C++ Application Framework for Embedded Systems with introspection
Public Types | Public Member Functions | Protected Attributes | List of all members
caffa::Field< DataType > Class Template Reference

#include <cafField.h>

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

Public Types

typedef DataFieldAccessor< DataType > DataAccessor
 
typedef DataFieldDirectStorageAccessor< DataType > DirectStorageAccessor
 
- Public Types inherited from caffa::TypedField< DataType >
using FieldDataType = DataType
 

Public Member Functions

 Field (const Field &other)
 
 Field (const DataType &fieldValue)
 
 Field (std::unique_ptr< DataAccessor > accessor)
 
Fieldoperator= (const Field &other)
 
Fieldoperator= (const DataType &fieldValue)
 
DataType value () const override
 
void setValue (const DataType &fieldValue) override
 
 operator DataType () const
 
DataType operator() () const
 
bool operator== (const DataType &fieldValue) const
 
bool operator!= (const DataType &fieldValue) const
 
void setAccessor (std::unique_ptr< DataAccessor > accessor)
 
void setUntypedAccessor (std::unique_ptr< DataFieldAccessorInterface > accessor) override
 
template<typename ValidatorType >
const ValidatorType * valueValidator () const
 
template<typename ValidatorType >
ValidatorType * valueValidator ()
 
std::vector< const FieldValidator< DataType > * > valueValidators () const
 
std::vector< FieldValidator< DataType > * > valueValidators ()
 
void addValidator (std::unique_ptr< FieldValidator< DataType >> valueValidator)
 
void clearValidators ()
 
std::optional< DataType > defaultValue () const
 
void setDefaultValue (const DataType &val)
 
- Public Member Functions inherited from caffa::TypedField< DataType >
std::string dataType () const override
 
- Public Member Functions inherited from caffa::FieldHandle
std::string keyword () const
 
bool matchesKeyword (const std::string &keyword) const
 
ObjectHandleownerObject ()
 
bool hasChildObjects ()
 
virtual std::vector< ObjectHandle * > childObjects () const
 
virtual std::unique_ptr< ObjectHandleremoveChildObject (ObjectHandle *)
 
void addCapability (std::unique_ptr< FieldCapability > capability)
 
template<typename CapabilityType >
CapabilityType * capability ()
 
template<typename CapabilityType >
const CapabilityType * capability () const
 
- Public Member Functions inherited from caffa::SignalEmitter
void addEmittedSignal (AbstractSignal *signalToAdd) const
 
std::list< AbstractSignal * > emittedSignals () const
 

Protected Attributes

std::unique_ptr< DataAccessorm_fieldDataAccessor
 
std::vector< std::unique_ptr< FieldValidator< DataType > > > m_valueValidators
 
std::optional< DataType > m_defaultValue
 

Additional Inherited Members

- Protected Member Functions inherited from caffa::FieldHandle
bool isInitialized () const
 
std::vector< FieldCapability * > capabilities ()
 

Detailed Description

template<typename DataType>
class caffa::Field< DataType >

Field class encapsulating data with input and output of this data to/from JSON read/write-FieldData is supposed to be specialized for types needing specialization


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