Public Member Functions | Public Attributes

a5::Thread Class Reference

Object representing at thread. More...

#include <Thread.hpp>

List of all members.

Public Member Functions

 Thread (Thread_Proc &proc_)
 Creates a thread.
void Start ()
 Starts a thread.
void Join ()
 Signals that the thread should stop and waits for it to finish.
void Stop ()
 Signals that the thread should stop.
bool ShouldStop () const
 Checks if the stop flag has been set for this thread.
ALLEGRO_THREAD * Release ()
 Releases the held C structure so it is no longer automatically freed.
virtual ~Thread ()
 Destroys the thread Automatically joins the thread if it is still running.
 operator ALLEGRO_THREAD * () const
 Returns a pointer to the Allegro thread structure.

Public Attributes

Thread_Procproc
 Reference to the thread proc.

Detailed Description

Object representing at thread.


Constructor & Destructor Documentation

a5::Thread::Thread ( Thread_Proc proc_  ) 

Creates a thread.

virtual a5::Thread::~Thread (  )  [virtual]

Destroys the thread Automatically joins the thread if it is still running.


Member Function Documentation

void a5::Thread::Start (  ) 

Starts a thread.

void a5::Thread::Join (  ) 

Signals that the thread should stop and waits for it to finish.

void a5::Thread::Stop (  ) 

Signals that the thread should stop.

bool a5::Thread::ShouldStop (  )  const

Checks if the stop flag has been set for this thread.

ALLEGRO_THREAD* a5::Thread::Release (  ) 

Releases the held C structure so it is no longer automatically freed.

a5::Thread::operator ALLEGRO_THREAD * (  )  const

Returns a pointer to the Allegro thread structure.


Member Data Documentation

Reference to the thread proc.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Defines