Main Page Class Hierarchy Compound List File List Compound Members File Members

# ThreadableObject Class Reference

`#include <threadableobject.h>`

Inheritance diagram for ThreadableObject:

List of all members.

## Public Member Functions
| ThreadableObject ()
virtual void | StartThreadFunc (void *p_argument)=0
## Static Public Member Functions
ThreadableObject * | GetThat ()
## Protected Member Functions
WORM_STATUS_CODE | StartThreadWithArg (TO_STACK_SIZE stack_size, TO_THREAD_ID *thread_id, void *arg)
WORM_STATUS_CODE | StartThread (TO_STACK_SIZE stack_size, TO_THREAD_ID *thread_id)
## Static Protected Member Functions
void | KillSelfThread ()
int | WaitForThread (TO_THREAD_ID *thread_id)
int | KillThread (TO_THREAD_ID tid)
## Static Protected Attributes
ThreadableObject * | That = NULL
TMutex * | ThatMutex = NULL

## Constructor & Destructor Documentation

ThreadableObject::ThreadableObject | ( |  | ) | `[inline]`

| Definition at line 217 of file threadableobject.h.

## Member Function Documentation

ThreadableObject* ThreadableObject::GetThat | ( |  | ) | `[inline, static]`

| Definition at line 230 of file threadableobject.h. Referenced by StartObjectThread().

void ThreadableObject::KillSelfThread | ( |  | ) | `[static, protected]`

| Definition at line 130 of file threadableobject.cpp.

int ThreadableObject::KillThread | ( | TO_THREAD_ID | tid | ) | `[static, protected]`

| Definition at line 152 of file threadableobject.cpp. References WORM_STAT_FAILURE, and WORM_STAT_SUCCESS. Referenced by WormServerBase::Listener().

WORM_STATUS_CODE ThreadableObject::StartThread | ( | TO_STACK_SIZE | stack_size,
|  | TO_THREAD_ID * | thread_id
| ) | `[inline, protected]`

| Definition at line 157 of file threadableobject.h. References StartThreadWithArg(), and WORM_STATUS_CODE. Referenced by WormServerBase::Run().

virtual void ThreadableObject::StartThreadFunc | ( | void * | p_argument | ) | `[pure virtual]`

| Implemented in TModuleBase, MutableServerBase, and WormServerBase. Referenced by StartObjectThread().

WORM_STATUS_CODE ThreadableObject::StartThreadWithArg | ( | TO_STACK_SIZE | stack_size,
|  | TO_THREAD_ID * | thread_id,
|  | void * | arg
| ) | `[protected]`

| Definition at line 67 of file threadableobject.cpp. References TMutex::ReleaseLock(), TMutex::RequestLock(), That, ThatMutex, WORM_STAT_FAILURE, WORM_STAT_SUCCESS, and WORM_STATUS_CODE. Referenced by WormServerBase::Listener(), MutableServerBase::MainThreadActions(), and StartThread().

int ThreadableObject::WaitForThread | ( | TO_THREAD_ID * | thread_id | ) | `[static, protected]`

| Definition at line 139 of file threadableobject.cpp. References WORM_STAT_FAILURE, and WORM_STAT_SUCCESS.

## Member Data Documentation

ThreadableObject * ThreadableObject::That = NULL`[static, protected]`

| Definition at line 19 of file threadableobject.cpp. Referenced by StartThreadWithArg().

TMutex * ThreadableObject::ThatMutex = NULL`[static, protected]`

| Definition at line 18 of file threadableobject.cpp. Referenced by StartThreadWithArg().

The documentation for this class was generated from the following files:

- threadableobject.h
- threadableobject.cpp