Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members

ThreadedSource Class Reference

#include <yatephone.h>

Inheritance diagram for ThreadedSource:

DataSource DataNode RefObject GenObject List of all members.

Public Member Functions

virtual ~ThreadedSource ()
bool start (const char *name="ThreadedSource", Thread::Priority prio=Thread::Normal)
void stop ()
Threadthread () const

Protected Member Functions

 ThreadedSource (const char *format="slin")
virtual void run ()=0
virtual void cleanup ()

Friends

class ThreadedSourcePrivate

Detailed Description

A data source with a thread of its own


Constructor & Destructor Documentation

virtual ~ThreadedSource  )  [virtual]
 

The destructor, stops the thread

ThreadedSource const char *  format = "slin"  )  [inline, protected]
 

Threaded Source constructor

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


Member Function Documentation

virtual void cleanup  )  [protected, virtual]
 

The cleanup after thread method

virtual void run  )  [protected, pure virtual]
 

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

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

Starts the worker thread

Parameters:
name Static name of this thread
prio Thread's priority
Returns:
True if started, false if an error occured

void stop  ) 
 

Stops and destroys the worker thread if running

Thread* thread  )  const
 

Return a pointer to the worker thread

Returns:
Pointer to running worker thread or NULL


The documentation for this class was generated from the following file:
Generated on Fri Jul 7 03:11:38 2006 for Yate by  doxygen 1.4.4