41 template <
class DataType>
50 virtual std::unique_ptr<DataFieldAccessor<DataType>>
clone()
const = 0;
73 template <
class DataType>
94 std::unique_ptr<DataFieldAccessor<DataType>>
clone()
const override
96 return std::make_unique<DataFieldDirectStorageAccessor<DataType>>( m_value );
99 DataType
value()
override {
return m_value; };
Basic non-typed interface which exists only to allow non-typed pointers.
Definition: cafDataFieldAccessor.h:31
Abstract but typed data field accessor. Inherit to create different storage mechanisms.
Definition: cafDataFieldAccessor.h:43
virtual std::unique_ptr< DataFieldAccessor< DataType > > clone() const =0
Clone the accessor using polymorphism.
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 t...
virtual DataType value()=0
Get the field value.
Direct storage accessor, which stores data values in local memory.
Definition: cafDataFieldAccessor.h:75
std::unique_ptr< DataFieldAccessor< DataType > > clone() const override
Clone the accessor using polymorphism.
Definition: cafDataFieldAccessor.h:94
DataType value() override
Get the field value.
Definition: cafDataFieldAccessor.h:99
DataFieldDirectStorageAccessor(const DataType &value)
Construct a new Data Field Direct Storage Accessor object with a default value.
Definition: cafDataFieldAccessor.h:88
DataFieldDirectStorageAccessor()=default
Construct a new Data Field Direct Storage Accessor object.
void setValue(const DataType &value) override
Set the value with the accessor. Will throw a std::runtime_exception if the accessor has limits and t...
Definition: cafDataFieldAccessor.h:101
Main Caffa namespace.
Definition: __init__.py:1