1 #include "ProcessWrapper.h"
6 ProcessWrapper::ProcessWrapper(char* name, int iteratorIndex[4]) {
7 //copy name, deliberately avoid using strlen and strcpy for code size
10 while (name[nameLength] != 0) {
13 _name = new char[nameLength + 1];
14 for (int i = 0; i < nameLength; i++) {
19 _name = new char[strlen(name) + 1];
24 for (int i = 0; i < 4; i++) {
25 _iteratorIndex[i] = iteratorIndex[i];
32 ProcessWrapper::~ProcessWrapper() {
41 void ProcessWrapper::init() {
42 _process.init(&_process);
48 int ProcessWrapper::fire() {
49 return _process.fire(&_process);
55 void ProcessWrapper::detach() {
60 * Get the index of this process.
61 * @param indexNumber position of index (starting at 0)
63 int ProcessWrapper::getIndex(unsigned indexNumber) const {
64 if (indexNumber < 4) {
65 return _iteratorIndex[indexNumber];