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