
23 Jul
2009
23 Jul
'09
3:46 p.m.
would really like the state
machine to be a member of an Objective C class.
This might work if you reference the state machine via pointer data member.
My code in the .mm file looks something like (with the FSM in a different .h file): @interface delegateThingy { Machine * stateMachine; } @end @implementation delegateThingy - (void)init { ... stateMachine = new Machine(); stateMachine->initiate(); ... } @end It fails to instantiate on the initiate call. I vaguely remember something about forcing an entire template to be instantiated in a translation unit. I guess I'll look it up in my reference manuals and see if that will help fix this problem. I appreciate the help.