public virtual void VisitTestStatement(TestStatement test) { PrintFunc("InterfaceResult::Enum", ClassName + "::test" + GetState() + "On" + test.name, "(InterfaceParam* param)", "\treturn InterfaceResult::Unhandled;", "\t(void)param;"); if( !test.NoExec) PrintFunc("void", ClassName + "::exec" + GetState() + "On" + test.name, "(InterfaceParam* param)", "\t(void)param;"); }
public virtual void VisitTestStatement(TestStatement test) { string state = GetState(); if (state == null) throw new MalformedFSMException("Interface Command found outside of state block", test.line); string transName = state + "On" + test.name; stream.WriteLine("\tFSM::InterfaceCommand<" + ClassName + "> " + transName + ";"); stream.WriteLine("\tFSM::InterfaceResult::Enum test" + transName + "(FSM::InterfaceParam* param);"); if(!test.NoExec) stream.WriteLine("\tvoid exec" + transName + "(FSM::InterfaceParam* param);"); stream.WriteLine(); }
public virtual void VisitTestStatement(TestStatement test) { string state = GetState(); if (state == null) throw new MalformedFSMException("Interface Test found outside of state block", test.line); if(test.NoExec) stream.WriteLine("\t\tFSM_INIT_INTERFACECOMMAND_NOEXEC(" + ClassName + ", " + GetState() + ", " + test.name + ");"); else stream.WriteLine("\t\tFSM_INIT_INTERFACECOMMAND(" + ClassName + ", " + GetState() + ", " + test.name + ");"); stream.WriteLine(); }