dol: initial dol commit
[jump.git] / dol / src / dol / visitor / cell / lib / ppu / ProcessWrapper.h
1 #ifndef _PROCESSWRAPPER_H_
2 #define _PROCESSWRAPPER_H_
3
4 #include <dol.h>
5
6 /**
7  * Process Wrapper Class
8  */
9 class ProcessWrapper
10 {
11     public:
12         ProcessWrapper(char* name, int iteratorIndex[4]);
13         virtual ~ProcessWrapper();
14
15         virtual void init();
16         virtual int fire();
17         virtual bool isDetached() { return _isDetached; }
18         virtual void detach();
19         virtual int getIndex(unsigned indexNumber) const;
20         
21                 // Positions for read and write operations which are blocked by Protothread
22         unsigned int readPos; 
23         unsigned int writePos; 
24
25     protected:
26         char* _name;;
27         DOLProcess _process;
28         bool _isDetached;
29         int _iteratorIndex[4];
30 };
31
32 #endif