class ThreadedSource

A data source with a thread of its own More...

Contains pure virtuals
Full nameTelEngine::ThreadedSource
Definition#include <yatephone.h>
InheritsTelEngine::DataSource [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Protected Methods


Detailed Description

A data source with a thread of its own

 ~ThreadedSource ()

~ThreadedSource

[virtual]

The destructor, stops the thread

bool  start (const char* name = "ThreadedSource", Thread::Priority prio = Thread::Normal)

start

Starts the worker thread

Parameters:
nameStatic name of this thread
prioThread's priority

Returns: True if started, false if an error occured

void  stop ()

stop

Stops and destroys the worker thread if running

Thread*  thread ()

thread

[const]

Return a pointer to the worker thread

Returns: Pointer to running worker thread or NULL

bool  running ()

running

[const]

Check if the data thread is running

Returns: True if the data thread was started and is running

inline bool  asyncDelete ()

asyncDelete

[const]

Get the current status of the asynchronous deletion flag

inline  ThreadedSource (const char* format = "slin")

ThreadedSource

[protected]

Threaded Source constructor

Parameters:
formatName of the data format, default "slin" (Signed Linear)

inline void  asyncDelete (bool async)

asyncDelete

[protected]

Derived classes should call this method to let the source to be destroyed asynchronously in the data thread

void  run ()

run

[protected pure virtual]

The worker method. You have to reimplement it as you need

void  cleanup ()

cleanup

[protected virtual]

The cleanup after thread method, deletes the source if already dereferenced and set for asynchronous deletion

void  zeroRefs ()

zeroRefs

[protected virtual]

Override so destruction can be delayed after all references were lost to let the data pumping thread end normally

Reimplemented from RefObject.


Generated by: root on dragoshel on Sat Apr 14 01:50:50 2007, using kdoc 2.0a54.