public StreamingWriteVisitorGenerator(FieldReferenceOffsetManager from, Random random, int maxChars, int maxBytes) { this.random = random; this.starts = from.messageStarts(); this.maxLenChars = maxChars; this.maxBytes = maxBytes; this.workingChar = new char[maxLenChars]; //TODO: need to add generation based on operators found in template file or bound }
public StreamingWriteVisitorGenerator(FieldReferenceOffsetManager from, Random random, int maxChars, int maxBytes) { this.random = random; this.starts = from.messageStarts(); this.maxLenChars = maxChars; this.maxBytes = maxBytes; this.workingChar = new char[maxLenChars]; //TODO: need to add generation based on operators found in template file or bound }
public StreamingWriteVisitorGenerator(FieldReferenceOffsetManager from, Random random, int maxChars, int maxBytes) { this.random = random; this.starts = from.messageStarts(); this.maxLenChars = maxChars; this.maxBytes = maxBytes; this.workingChar = new char[maxLenChars]; //TODO: need to add generation based on operators found in template file or bound }
@Override protected void bodyOfNextMessageIdx(Appendable target) throws IOException { msgGenerator.preCall(target); int startsCount = MessageSchema.from(schema).messageStarts().length; if (startsCount==1) { target.append(tab).append("return "); Appendables.appendValue(target, MessageSchema.from(schema).messageStarts()[0]).append(";\n"); } else { target.append(tab).append("return "); if (null==pipeVarName) { if (!(schema instanceof MessageSchemaDynamic)) { target.append(schema.getClass().getSimpleName()).append("."); } target.append("FROM"); } else { Appendables.appendStaticCall(target, Pipe.class, "from").append(pipeVarName).append(")"); } target.append(".messageStarts[("); msgGenerator.result(target).append(")%"); Appendables.appendValue(target, startsCount).append("];\n"); } }
int[] starts = from.messageStarts(); int j = starts.length; boolean found = false;
int[] starts = from.messageStarts(); int j = starts.length; boolean found = false;
int[] starts = from.messageStarts(); int j = starts.length; boolean found = false;