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 45 of file WThreadedFunction_test.h.
WThreadedFunctionTest::FuncType::FuncType | ( | int | value | ) | [inline] |
Constructor, initialize some stuff.
value | An int value. |
Definition at line 53 of file WThreadedFunction_test.h.
References WSharedObject< T >::getWriteTicket(), m_result, and m_stopped.
int WThreadedFunctionTest::FuncType::getResult | ( | ) | [inline] |
A method to extract the result.
Definition at line 99 of file WThreadedFunction_test.h.
References WSharedObject< T >::getReadTicket(), and m_result.
void WThreadedFunctionTest::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 71 of file WThreadedFunction_test.h.
References WSharedObject< T >::getWriteTicket(), m_input, m_result, and m_stopped.
void WThreadedFunctionTest::FuncType::reset | ( | ) | [inline] |
Reset everything.
Definition at line 107 of file WThreadedFunction_test.h.
References WSharedObject< T >::getWriteTicket(), and m_result.
bool WThreadedFunctionTest::FuncType::stopped | ( | ) | [inline] |
Check if the thread was ordered to stop.
Definition at line 89 of file WThreadedFunction_test.h.
References WSharedObject< T >::getReadTicket(), and m_stopped.
boost::shared_ptr< int const > WThreadedFunctionTest::FuncType::m_input [private] |
WSharedObject< int > WThreadedFunctionTest::FuncType::m_result [private] |
the result
Definition at line 117 of file WThreadedFunction_test.h.
Referenced by FuncType(), getResult(), operator()(), and reset().
WSharedObject< bool > WThreadedFunctionTest::FuncType::m_stopped [private] |
thread stopped?
Definition at line 120 of file WThreadedFunction_test.h.
Referenced by FuncType(), operator()(), and stopped().