5DT Data Glove plugin
1.0
|
#include <ou_thread.h>
Public Member Functions | |
Thread () | |
Thread (const char *nm) | |
void | setName (const char *nm) |
std::string | getName () const |
void | start () |
virtual void | run () |
void | sleep (long ms) |
void | suspend () |
void | resume () |
void | stop () |
void | setPriority (int p) |
bool | wait (const char *m, long ms=5000) |
void | release (const char *m) |
Detailed Description
class Thread Represents a thread of execution in the process. To create a new Thread write an inherited class ot Thread and override the run() function
Definition at line 51 of file ou_thread.h.
Constructor & Destructor Documentation
Thread::Thread | ( | ) |
@ The Thread class implementation @/
/** Thread() default constructor
Definition at line 63 of file ou_thread.cpp.
Thread::Thread | ( | const char * | nm | ) |
Thread(const char* nm) overloaded constructor creates a Thread object identified by "nm"
Definition at line 72 of file ou_thread.cpp.
Member Function Documentation
string Thread::getName | ( | ) | const |
getName() return the Thread object's name as a string
Definition at line 93 of file ou_thread.cpp.
void Thread::release | ( | const char * | m | ) |
release(const char* m) releases the mutex "m" and makes it available for other threads
Definition at line 207 of file ou_thread.cpp.
void Thread::resume | ( | ) |
resume() resumes a suspended thread
Definition at line 168 of file ou_thread.cpp.
|
virtual |
run() called by the thread callback _ou_thread_proc() to be overridden by child classes of Thread
Reimplemented in GloveCalibration.
Definition at line 101 of file ou_thread.cpp.
void Thread::setName | ( | const char * | nm | ) |
setName(const char* nm) sets the Thread object's name to "nm"
Definition at line 86 of file ou_thread.cpp.
void Thread::setPriority | ( | int | tp | ) |
setPriority(int tp) sets the priority of the thread to "tp" "tp" must be a valid priority defined in the Thread class
Definition at line 142 of file ou_thread.cpp.
void Thread::sleep | ( | long | ms | ) |
sleep(long ms) holds back the thread's execution for "ms" milliseconds
Definition at line 109 of file ou_thread.cpp.
void Thread::start | ( | ) |
start() creates a low-level thread object and calls the run() function
Definition at line 117 of file ou_thread.cpp.
void Thread::stop | ( | ) |
stop() stops the running thread and frees the thread handle
Definition at line 130 of file ou_thread.cpp.
void Thread::suspend | ( | ) |
suspend() suspends the thread
Definition at line 155 of file ou_thread.cpp.
bool Thread::wait | ( | const char * | m, |
long | ms = 5000 |
||
) |
wait(const char* m,long ms) makes the thread suspend execution until the mutex represented by "m" is released by another thread. "ms" specifies a time-out for the wait operation. "ms" defaults to 5000 milli-seconds
Definition at line 184 of file ou_thread.cpp.
The documentation for this class was generated from the following files:
- include/ou_thread.h
- src/ou_thread.cpp
Generated on Tue Jan 6 2015 10:46:19 for 5DT Data Glove plugin by 1.8.1.2