protected void negativeOneCase(Appendable target) throws IOException { target.append(tab).append(tab).append("case -1:"); appendStaticCall(target.append(tab), pipeClass, "takeMsgIdx").append(pipeVarName).append(");\n"); appendStaticCall(target.append(tab), pipeClass, "takeValue").append(pipeVarName).append(");\n"); target.append(tab).append(tab).append("requestShutdown();\n"); //TODO; consume message can call request shutdown. target.append(tab).append("break;\n"); }
protected void negativeOneCase(Appendable target) throws IOException { target.append(tab).append(tab).append("case -1:"); appendStaticCall(target.append(tab), pipeClass, "takeMsgIdx").append(pipeVarName).append(");\n"); appendStaticCall(target.append(tab), pipeClass, "takeValue").append(pipeVarName).append(");\n"); target.append(tab).append(tab).append("requestShutdown();\n"); //TODO; consume message can call request shutdown. target.append(tab).append("break;\n"); }
protected void negativeOneCase(Appendable target) throws IOException { target.append(tab).append(tab).append("case -1:"); appendStaticCall(target.append(tab), pipeClass, "takeMsgIdx").append(pipeVarName).append(");\n"); appendStaticCall(target.append(tab), pipeClass, "takeValue").append(pipeVarName).append(");\n"); target.append(tab).append(tab).append("requestShutdown();\n"); //TODO; consume message can call request shutdown. target.append(tab).append("break;\n"); }
protected void decodeCopyIntGenerator(Appendable target, int index, Boolean isOptional) { try { appendStaticCall(target, decoder, "decodeCopyInt").append(intDictionaryName).append(", ").append(readerName).append(", ").append(mapName).append(", ").append(Integer.toString(index)).append(", ").append(bitMaskName).append(", " + isOptional.toString() + ");\n"); } catch (IOException e) { throw new RuntimeException(e); } }
protected void decocdeDefaultLongGenerator(Appendable target, int index, Boolean isOptional) { try { appendStaticCall(target, decoder, "decodeDefaultLong").append(readerName).append(", ").append(mapName).append(", ").append(defaultLongDictionaryName).append(", ").append(bitMaskName).append(", ").append(Integer.toString(index)).append(", " + isOptional.toString() + ");\n"); } catch (IOException e) { throw new RuntimeException(e); } }
protected void decodeDefaultIntGenerator(Appendable target, int index, Boolean isOptional) { try { appendStaticCall(target, decoder, "decodeDefaultInt").append(readerName).append(", ").append(mapName).append(", ").append(defaultIntDictionaryName).append(", ").append(bitMaskName).append(", ").append(Integer.toString(index)).append(", ").append(isOptional.toString() + ");\n"); } catch (IOException e) { throw new RuntimeException(e); } }
protected void publishMessage(Appendable t) throws IOException { if (buildFullStageWritingToPipe()) { //Pipe.releaseReads{input); appendStaticCall(t.append(tab), pipeClass, "publishWrites").append(pipeVarName).append(");\n"); } }
@Override protected void processFragmentClose(int cursor) throws IOException { if (!hasSimpleMessagesOnly) { businessMethodCall(); //LowLevelStateManager.closeFragment(navState); appendStaticCall(bodyTarget.append(tab), LowLevelStateManager.class, "closeFragment").append(stageMgrVarName).append(");\n"); } }
@Override protected void processFragmentClose(int cursor) throws IOException { if (!hasSimpleMessagesOnly) { businessMethodCall(); //LowLevelStateManager.closeFragment(navState); appendStaticCall(bodyTarget.append(tab), LowLevelStateManager.class, "closeFragment").append(stageMgrVarName).append(");\n"); } }
protected void publishMessage(Appendable t) throws IOException { if (buildFullStageWritingToPipe()) { //Pipe.releaseReads{input); appendStaticCall(t.append(tab), pipeClass, "publishWrites").append(pipeVarName).append(");\n"); } }
protected void publishMessage(Appendable t) throws IOException { if (buildFullStageWritingToPipe()) { //Pipe.releaseReads{input); appendStaticCall(t.append(tab), pipeClass, "publishWrites").append(pipeVarName).append(");\n"); } }
@Override protected void processFragmentClose(int cursor) throws IOException { if (!hasSimpleMessagesOnly) { businessMethodCall(); //LowLevelStateManager.closeFragment(navState); appendStaticCall(bodyTarget.append(tab), LowLevelStateManager.class, "closeFragment").append(stageMgrVarName).append(");\n"); } }
@Override protected void processCaller(int cursor) throws IOException { FieldReferenceOffsetManager from = MessageSchema.from(schema); bodyTarget.append(tab).append(tab).append("case "); appendMessageIdentifier(cursor, schema); bodyTarget.append(":\n"); bodyTarget.append(tab).append(tab).append(tab); appendInternalMethodName(cursor).append("();\n"); //Pipe.confirmLowLevelRead(input, 8); int fragmentSizeLiteral = from.fragDataSize[cursor]; appendStaticCall(bodyTarget.append(tab).append(tab).append(tab), pipeClass, "confirmLowLevelRead").append(pipeVarName).append(", ").append(Integer.toString(fragmentSizeLiteral)).append(" /* fragment size */);\n"); bodyTarget.append(tab).append(tab).append("break;\n"); }
protected void beginMessage(Appendable t, int cursor) throws IOException { if (buildFullStageWritingToPipe()) { appendStaticCall(t.append(tab).append(tab),pipeClass,"addMsgIdx").append(pipeVarName).append(','); Appendables.appendValue(t, cursor).append(");\n"); } }
protected void beginMessage(Appendable t, int cursor) throws IOException { if (buildFullStageWritingToPipe()) { appendStaticCall(t.append(tab).append(tab),pipeClass,"addMsgIdx").append(pipeVarName).append(','); Appendables.appendValue(t, cursor).append(");\n"); } }
private void appendWriteToPipe(String name, String method) throws IOException { if (buildFullStageWritingToPipe()) { appendVar(appendStaticCall(writeToPipeBodyWorkspace.append(tab), pipeClass, method), name).append(',').append(pipeVarName).append(");\n"); } }
private void appendWriteToPipe(String name, String method) throws IOException { if (buildFullStageWritingToPipe()) { appendVar(appendStaticCall(writeToPipeBodyWorkspace.append(tab), pipeClass, method), name).append(',').append(pipeVarName).append(");\n"); } }
private void appendWriteToPipe(String name, String method) throws IOException { if (buildFullStageWritingToPipe()) { appendVar(appendStaticCall(writeToPipeBodyWorkspace.append(tab), pipeClass, method), name).append(',').append(pipeVarName).append(");\n"); } }
private void appendWirteOptionalToPipe(String name, long nullLiteral, String methodName) throws IOException { if (buildFullStageWritingToPipe()) { appendVar( appendValue( appendVar( appendStaticCall(writeToPipeBodyWorkspace, pipeClass, methodName).append("null=="),name).append("?"), nullLiteral).append("L:"), name). append(','). append(pipeVarName). append(");\n"); } }
private void appendWirteOptionalToPipe(String name, long nullLiteral, String methodName) throws IOException { if (buildFullStageWritingToPipe()) { appendVar( appendValue( appendVar( appendStaticCall(writeToPipeBodyWorkspace, pipeClass, methodName).append("null=="),name).append("?"), nullLiteral).append("L:"), name). append(','). append(pipeVarName). append(");\n"); } }