Exemple #1
0
 public override IOProcessor create(Interpreter interpreter)
 {
     CustomIOProc ioProc = new CustomIOProc();
     ioProc.swigCMemOwn = false;
     return ioProc;
 }
Exemple #2
0
        public static void testIOProcessor()
        {
            Console.WriteLine("testIOProcessor");
            CustomIOProc ioproc = new CustomIOProc();
            // just register prototype at global factory
            Factory.getInstance().registerIOProcessor(ioproc);

            String xml =
            "<scxml>" +
            "  <state id=\"s1\">" +
            "    <onentry>" +
            "      <send type=\"custom\">" +
            "        <content>This is some content!</content>" +
            "      </send>" +
            "    </onentry>" +
            "    <transition event=\"received1\" target=\"s2\" />" +
            "  </state>" +
            "  <state id=\"s2\">" +
            "    <onentry>" +
            "      <send type=\"custom\">" +
            "        <param name=\"foo\" expr=\"bar\" />" +
            "      </send>" +
            "    </onentry>" +
            "    <transition event=\"received2\" target=\"s3\" />" +
            "  </state>" +
            "  <state id=\"s3\">" +
            "    <onentry>" +
            "      <send type=\"custom\">" +
            "        <content>" +
            "        <this><is><xml/></is></this>" +
            "        </content>" +
            "      </send>" +
            "    </onentry>" +
            "    <transition event=\"received3\" target=\"done\" />" +
            "  </state>" +
            "  <final id=\"done\" />" +
            "</scxml>";

            // parse and interpret
            Interpreter interpreter = Interpreter.fromXML(xml, "");
            interpreter.interpret();

        }