Neo  0.5.0
Developer Documentation
Neo::ThreadFactory Class Reference

The ThreadFactory class allows you to register any subclass of Thread and Semaphore to provide the implementation of all newly created thread objects. More...

#include <Thread.h>

Public Member Functions

void clear ()
 Deletes all templates. More...
 
void setTemplateThread (Thread *thr)
 Sets the thread template object with the overwritten getNew method. More...
 
void setTemplateSemaphore (Semaphore *sem)
 Sets the semaphore template object with the overwritten getNew method. More...
 
ThreadgetNewThread ()
 Creates a new thread. More...
 
SemaphoregetNewSemaphore ()
 Creates a new semaphore. More...
 

Static Public Member Functions

static ThreadFactorygetInstance ()
 

Detailed Description

The ThreadFactory class allows you to register any subclass of Thread and Semaphore to provide the implementation of all newly created thread objects.

Member Function Documentation

void Neo::ThreadFactory::clear ( void  )
inline

Deletes all templates.

static ThreadFactory* Neo::ThreadFactory::getInstance ( )
static
Semaphore* Neo::ThreadFactory::getNewSemaphore ( )
inline

Creates a new semaphore.

Returns
The new semaphore.
Thread* Neo::ThreadFactory::getNewThread ( )
inline

Creates a new thread.

Returns
The new thread.
void Neo::ThreadFactory::setTemplateSemaphore ( Semaphore sem)
inline

Sets the semaphore template object with the overwritten getNew method.

Parameters
semThe template.
void Neo::ThreadFactory::setTemplateThread ( Thread thr)
inline

Sets the thread template object with the overwritten getNew method.

Parameters
thrThe template.

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