OpenWalnut
1.4.0
|
A threaded function. More...
Public Member Functions | |
FuncType (int value) | |
Constructor, initialize some stuff. | |
void | operator() (std::size_t, std::size_t, WBoolFlag const &shutdown) |
This is the actual thread function. | |
bool | stopped () |
Check if the thread was ordered to stop. | |
int | getResult () |
A method to extract the result. | |
void | reset () |
Reset everything. | |
Private Attributes | |
boost::shared_ptr< int const > | m_input |
the input data | |
WSharedObject< int > | m_result |
the result | |
WSharedObject< bool > | m_stopped |
thread stopped? |
A threaded function.
Definition at line 43 of file WWorkerThread_test.h.
WWorkerThreadTest::FuncType::FuncType | ( | int | value | ) | [inline] |
Constructor, initialize some stuff.
value | An int value. |
Definition at line 51 of file WWorkerThread_test.h.
References WSharedObject< T >::getWriteTicket(), m_result, and m_stopped.
int WWorkerThreadTest::FuncType::getResult | ( | ) | [inline] |
A method to extract the result.
Definition at line 96 of file WWorkerThread_test.h.
References WSharedObject< T >::getReadTicket(), and m_result.
void WWorkerThreadTest::FuncType::operator() | ( | std::size_t | , |
std::size_t | , | ||
WBoolFlag const & | shutdown | ||
) | [inline] |
This is the actual thread function.
shutdown | A flag indicating the thread is supposed to stop. |
Definition at line 69 of file WWorkerThread_test.h.
References WSharedObject< T >::getWriteTicket(), m_input, m_result, and m_stopped.
void WWorkerThreadTest::FuncType::reset | ( | ) | [inline] |
Reset everything.
Definition at line 104 of file WWorkerThread_test.h.
References WSharedObject< T >::getWriteTicket(), and m_result.
bool WWorkerThreadTest::FuncType::stopped | ( | ) | [inline] |
Check if the thread was ordered to stop.
Definition at line 86 of file WWorkerThread_test.h.
References WSharedObject< T >::getReadTicket(), and m_stopped.
boost::shared_ptr< int const > WWorkerThreadTest::FuncType::m_input [private] |
WSharedObject< int > WWorkerThreadTest::FuncType::m_result [private] |
the result
Definition at line 114 of file WWorkerThread_test.h.
Referenced by FuncType(), getResult(), operator()(), and reset().
WSharedObject< bool > WWorkerThreadTest::FuncType::m_stopped [private] |
thread stopped?
Definition at line 117 of file WWorkerThread_test.h.
Referenced by FuncType(), operator()(), and stopped().