Skip to content
Snippets Groups Projects
Select Git revision
  • 58eab668011ebe8d9813a176fd100d54ffd258fd
  • master default protected
2 results

CMakeSystem.cmake

Blame
  • Test.connect 802 B
    send tree SenderRoot.Alfa ;
    receive tree ReceiverRoot.Alfa ;
    
    receive SenderRoot.Input1WhenFlagIsTrue ;
    receive SenderRoot.Input1WhenFlagIsFalse ;
    receive SenderRoot.Input2 ;
    receive SenderRoot.Input3 ;
    
    send tree SenderRoot.AlfaPrimitive using Alfa2String ;
    receive tree ReceiverRoot.AlfaPrimitive using String2Alfa ;
    
    Alfa2String maps Alfa alfa to String {:
      StringBuilder sb = new StringBuilder();
      sb.append(alfa.getID()).append(":").append(alfa.getStringValue()).append(";");
      return sb.toString();
    :}
    
    String2Alfa maps String s to Alfa {:
      int colonIndex = s.indexOf(":");
      int id = Integer.parseInt(s.substring(0, colonIndex));
      String value = s.substring(colonIndex + 1, s.length() - 1);
      Alfa result = new Alfa();
      result.setID(id);
      result.setStringValue(value);
      return result;
    :}