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 for (int i = 0; i < 4; i++) {
20 _iteratorIndex[i] = iteratorIndex[i];
30 ProcessWrapper::~ProcessWrapper() {
39 void ProcessWrapper::init() {
40 _process.init(&_process);
46 int ProcessWrapper::fire() {
47 return _process.fire(&_process);
53 void ProcessWrapper::detach() {
58 * Get the index of this process.
59 * @param indexNumber position of index (starting at 0)
61 int ProcessWrapper::getIndex(unsigned indexNumber) const {
62 if (indexNumber < 4) {
63 return _iteratorIndex[indexNumber];