#include <Thread.h>
Inheritance diagram for clawsoft.Thread:
Definition at line 21 of file Thread.h.
Public Methods | |
Thread () | |
Default constructor. | |
virtual | ~Thread () |
This is the class destructor, it simply calls detach for cleanup purposes. | |
int | start () |
Call this method when you want to start running your thread. | |
virtual void * | run ()=0 |
Very important You must override this method so you can provide the thread process itself whatever you define this method does in your subclass is what the thread will start doing when you call start() | |
void | killMe () |
This method detaches the thread from the current running program, just like detach() does. | |
char * | getClassName () |
Returns the name of the current class. | |
Data Fields | |
bool | autodetach |
This variable is just for knowing if the thread can be autodetached or no, currently it does nothing, but is here for backward compatibility. | |
Protected Methods | |
int | _start () |
This is a wrapper and is intended to be used only for derived classes. | |
void | detach () |
This method detaches the thread from the current running program. | |
void | setClassName (char *n) |
Call this method when you need to set the name of the class you're creating, typically int it's constructor, remeber that you must set the classname for every clas you create, that way you can have more information while being in a debuging process. | |
Static Private Methods | |
int | runMethod (void *thethread) |
This is the wrapping function which calls the run method so it can be executed as a thread, for GNU Pth this function must return an int. | |
Private Attributes | |
SDL_Thread * | thread |
Thread identifier this one is used when GNU Pth has been activated. |
|
Default constructor.
Definition at line 18 of file Thread.cpp. References clawsoft.Object.setClassName(). |
|
This is the class destructor, it simply calls detach for cleanup purposes.
Definition at line 52 of file Thread.h. References clawsoft.Thread.detach(). |
|
This is a wrapper and is intended to be used only for derived classes.
Definition at line 44 of file Thread.cpp. References clawsoft.Thread.start(), and clawsoft.Thread.thread. |
|
This method detaches the thread from the current running program.
Definition at line 33 of file Thread.cpp. References clawsoft.Thread.thread. Referenced by clawsoft.Thread.~Thread(). |
|
Returns the name of the current class.
Definition at line 18 of file Object.cpp. References clawsoft.Object.__cls_name. |
|
This method detaches the thread from the current running program, just like detach() does.
Definition at line 54 of file Thread.cpp. References clawsoft.Thread.thread. |
|
Very important
Implemented in Client. Definition at line 76 of file Thread.cpp. Referenced by clawsoft.Thread.runMethod(). |
|
This is the wrapping function which calls the run method so it can be executed as a thread, for GNU Pth this function must return an int.
Definition at line 65 of file Thread.cpp. References clawsoft.Thread.run(). Referenced by clawsoft.Thread.start(). |
|
|
Call this method when you want to start running your thread.
Definition at line 22 of file Thread.cpp. References clawsoft.Thread.runMethod(), and clawsoft.Thread.thread. Referenced by clawsoft.Thread._start(), and Server.start(). |
|
This variable is just for knowing if the thread can be autodetached or no, currently it does nothing, but is here for backward compatibility.
|
|
Thread identifier this one is used when GNU Pth has been activated.
Definition at line 32 of file Thread.h. Referenced by clawsoft.Thread._start(), clawsoft.Thread.detach(), clawsoft.Thread.killMe(), and clawsoft.Thread.start(). |
Powered by: