17 #include <QtCore/QScopedPointer> 18 #include <QtCore/QReadWriteLock> 57 return mBuffer.data();
81 mValue.reset(
new T());
82 mBuffer.reset(
new T());
88 QScopedPointer<T> mValue;
91 QScopedPointer<T> mBuffer;
Definition: analogSensor.h:23
void sync()
Copies value from buffer to synced value, invalidates buffer.
Definition: synchronizedVar.h:69
void reset()
Resets buffer to initial state.
Definition: synchronizedVar.h:78
T * operator->()
Returns pointer to unsynced buffer.
Definition: synchronizedVar.h:55
Helper template for syncing reader and writer.
Definition: synchronizedVar.h:34
const T & operator*() const
Returns contents of unsynced buffer.
Definition: synchronizedVar.h:62
SynchronizedVar()
Constructor. Creates var with default buffer and value.
Definition: synchronizedVar.h:38