#include <process.h>
Definition at line 22 of file process.h.
Public Member Functions | |
| Process () | |
| Constructs a new process. | |
| virtual | ~Process () |
| Destructs the process. | |
| bool | start () |
| Starts the process. | |
| virtual bool | init () |
| The init function for the child process. | |
| virtual int | run ()=0 |
| The entry function for the child process. | |
| virtual void | exit (int retVal=0) |
| Exits the child process immediately. | |
| void | cancel () |
| Cancels (stops) the child process. | |
| bool | join (int *retVal=NULL) |
| Waits for the exit of the child process. | |
| bool | isStopped () const |
| Returns if the process is stopped. | |
| bool | isRunning () const |
| Returns if the process is running. | |
| bool | isCurrent () const |
| Returns if this process is the current (calling) process. | |
Static Public Member Functions | |
| static void | addListener (RunnableListener *listener) |
| Add a new process state listener. | |
| eq::base::Process::~Process | ( | ) | [virtual] |
| bool eq::base::Process::start | ( | ) |
Starts the process.
All process listeners will be notified from within the process, after the process was initialized successfully.
true if the process was launched, false otherwise. Definition at line 61 of file process.cpp.
| virtual bool eq::base::Process::init | ( | ) | [inline, virtual] |
The init function for the child process.
| virtual int eq::base::Process::run | ( | ) | [pure virtual] |
The entry function for the child process.
| void eq::base::Process::exit | ( | int | retVal = 0 |
) | [virtual] |
Exits the child process immediately.
This function does not return. It is only to be called from the child process. The process listeners will be notified.
| retVal | the return value of the process. |
Definition at line 92 of file process.cpp.
References isCurrent().

| void eq::base::Process::cancel | ( | ) |
Cancels (stops) the child process.
This function is not to be called from the child process.
Definition at line 103 of file process.cpp.
References isCurrent().

| bool eq::base::Process::join | ( | int * | retVal = NULL |
) |
Waits for the exit of the child process.
The actual size of the return value may be as low as 8 bits.
| retVal | output value for the return value of the child, can be NULL. |
true if the process was joined, false otherwise. Definition at line 114 of file process.cpp.
References isCurrent().

| bool eq::base::Process::isStopped | ( | ) | const [inline] |
| bool eq::base::Process::isRunning | ( | ) | const [inline] |
| bool eq::base::Process::isCurrent | ( | ) | const |
Returns if this process is the current (calling) process.
true if the current process has is the same process as this process, false if not. Definition at line 152 of file process.cpp.
Referenced by cancel(), exit(), and join().

| void eq::base::Process::addListener | ( | RunnableListener * | listener | ) | [static] |
Add a new process state listener.
| listener | the listener. |
Definition at line 157 of file process.cpp.
0.6 by
1.5.5