40 #ifndef CORELIB_DATAOBJECT_UNSYNC_HPP 41 #define CORELIB_DATAOBJECT_UNSYNC_HPP 75 : data(), status(
NoData), initialized(false) {}
81 : data(initial_value), status(
NoData), initialized(true) {}
83 virtual FlowStatus Get( reference_t pull,
bool copy_old_data =
true )
const {
88 }
else if ((status ==
OldData) && copy_old_data) {
94 virtual value_t
Get()
const {
95 value_t cache = value_t();
100 virtual bool Set( param_t push ) {
107 if (!initialized || reset) {
virtual value_t Get() const
Get a copy of the data of this data object.
virtual value_t data_sample() const
Reads back a data sample.
DataObjectUnSync()
Construct an uninitialized DataObjectUnSync.
FlowStatus
Returns the status of a data flow read operation.
DataObjectUnSync(param_t initial_value)
Construct a DataObjectUnSync with initial value.
virtual FlowStatus Get(reference_t pull, bool copy_old_data=true) const
Get a copy of the Data of this data object.
virtual bool Set(param_t push)
Set the data to a certain value.
A class which provides unprotected (not thread-safe) access to one typed element of data...
boost::call_traits< T >::param_type param_t
virtual bool data_sample(param_t sample, bool reset)
Provides a data sample to initialize this data object.
A DataObjectInterface implements multi-threaded read/write solutions.
boost::call_traits< T >::reference reference_t
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual void clear()
Clears any data stored by this data object, so that any subsequent Get() without a new Set() will ret...