![]() |
stromx
0.8.0
|
Write access to a data container. More...
#include <WriteAccess.h>
Public Member Functions | |
| WriteAccess () | |
| WriteAccess (const DataContainer &data) | |
| WriteAccess (const DataContainer &data, const unsigned int timeout) | |
| bool | empty () const |
| template<typename data_t > | |
| data_t & | get () const |
| Data & | get () const |
| void | release () |
Write access to a data container.
A read access allows to read and change the content of a data container which contains data of the type data_t.
|
inline |
Constructs an empty write access.
|
explicit |
Constructs a write access from a data container. This functions waits until write access is possible, i.e. until no other read or write access to data exists.
| data | The container which contains the data to be accessed. |
| WrongArgument | The container is read-only. |
| stromx::runtime::WriteAccess::WriteAccess | ( | const DataContainer & | data, |
| const unsigned int | timeout | ||
| ) |
Constructs a write access from a data container. This functions waits until write access is possible, i.e. until no other read or write access to data exists.
| data | The container which contains the data to be accessed. |
| timeout | The maximal time to wait in milliseconds. |
| Timeout | If no read access could be obtained during the timeout. |
| WrongArgument | The container is read-only. |
|
inline |
Returns true if the write access is empty.
|
inline |
Returns a casted reference to the content of the data container.
| AccessEmpty | If the read access is empty. |
| BadCast | If the data can not be casted to data_t. |
| Data & stromx::runtime::WriteAccess::get | ( | ) | const |
Returns a reference to the content of the data container.
| AccessEmpty | If the read access is empty. |
| void stromx::runtime::WriteAccess::release | ( | ) |
Releases the write access. The access is empty after calling this function.
1.8.12