38 #ifndef CORELIB_DATAOBJECT_LOCKED_HPP 39 #define CORELIB_DATAOBJECT_LOCKED_HPP 42 #include "../os/MutexLock.hpp" 79 : data(), status(
NoData), initialized(false) {}
85 : data(initial_value), status(
NoData), initialized(true) {}
92 virtual FlowStatus Get( reference_t pull,
bool copy_old_data =
true )
const {
98 }
else if ((status ==
OldData) && copy_old_data) {
104 virtual value_t
Get()
const {
110 virtual bool Set( param_t push ) {
119 if (!initialized || reset) {
DataObjectLocked(param_t initial_value)
DataObjectInterface< T >::reference_t reference_t
virtual FlowStatus Get(reference_t pull, bool copy_old_data=true) const
virtual value_t data_sample() const
virtual value_t Get() const
boost::call_traits< T >::param_type param_t
virtual bool Set(param_t push)
DataObjectInterface< T >::param_t param_t
A DataObjectInterface implements multi-threaded read/write solutions.
DataObjectInterface< T >::value_t value_t
A class which provides locked/protected access to one typed element of data.
boost::call_traits< T >::reference reference_t
An object oriented wrapper around a non recursive mutex.
Contains TaskContext, Activity, OperationCaller, Operation, Property, InputPort, OutputPort, Attribute.
virtual bool data_sample(param_t sample, bool reset)
MutexLock is a scope based Monitor, protecting critical sections with a Mutex object through locking ...