Bluetooth Framework C++ Edition
Public Member Functions | Protected Member Functions | List of all members
CwclThread Class Reference

The class allows to use WCL components in threads, console and service applications. More...

#include <wclThread.h>

Public Member Functions

 CwclThread ()
 Creates new Thread object.
 
virtual ~CwclThread ()
 Terminates (if running) and frees the Thread object.
 
int Run ()
 Starts the Thread execution.
 
int Signal (const unsigned char Id)
 Posts signal to the Thread.
 
int Terminate ()
 Terminates the thread.
 
bool GetRunning ()
 Gets the thread state.
 
 __declspec (property(get=GetRunning)) bool Running
 Gets the thread state.
 

Protected Member Functions

int Synchronize (const void *const Param)
 Executes a method call within the main thread.
 
virtual void MessageReceived (const CwclMessage *const Message)
 The method called when new message received.
 
virtual bool OnInitialize ()
 The method called by the thread when it just started. An application must override this method to execute initialization code.
 
virtual void OnSignal (const unsigned char Id)
 This procedure is called when a signal received from the other thread.
 
virtual void OnSynchronize (const void *const Param)
 This procedure called by the Syncrhonize method.
 
virtual void OnTerminate ()
 The procedure is called when the thread is about termination. An application must execute all finalization code here.
 

Detailed Description

The class allows to use WCL components in threads, console and service applications.