Lines Matching refs:out
120 int bitwidth, GeneratedFile &out) { in GenerateAccessorMethod() argument
122 out.indent() << "// return byte array representation of the " << bitwidth in GenerateAccessorMethod()
124 out.indent() << "public static byte[] getBitCode" << bitwidth << "()"; in GenerateAccessorMethod()
125 out.startBlock(); in GenerateAccessorMethod()
126 out.indent() << "return getBitCode" << bitwidth << "Internal();\n"; in GenerateAccessorMethod()
127 out.endBlock(true); in GenerateAccessorMethod()
134 int seg_num, GeneratedFile &out) { in GenerateSegmentMethod() argument
135 out.indent() << "private static byte[] getSegment" << bitwidth << "_" in GenerateSegmentMethod()
137 out.startBlock(); in GenerateSegmentMethod()
138 out.indent() << "byte[] data = {"; in GenerateSegmentMethod()
139 out.increaseIndent(); in GenerateSegmentMethod()
145 out << "\n"; in GenerateSegmentMethod()
146 out.indent(); in GenerateSegmentMethod()
149 out << " "; in GenerateSegmentMethod()
151 out << std::setw(4) << static_cast<int>(buff[written]) << ","; in GenerateSegmentMethod()
153 out << "\n"; in GenerateSegmentMethod()
155 out.decreaseIndent(); in GenerateSegmentMethod()
156 out.indent() << "};\n"; in GenerateSegmentMethod()
157 out.indent() << "return data;\n"; in GenerateSegmentMethod()
158 out.endBlock(); in GenerateSegmentMethod()
165 int bitwidth, GeneratedFile &out) { in GenerateJavaCodeAccessorMethodForBitwidth() argument
179 GenerateAccessorMethod(context, bitwidth, out); in GenerateJavaCodeAccessorMethodForBitwidth()
190 GenerateSegmentMethod(buff, read_length, bitwidth, seg_num, out); in GenerateJavaCodeAccessorMethodForBitwidth()
198 out.indent() << "private static int bitCode" << bitwidth << "Length = " in GenerateJavaCodeAccessorMethodForBitwidth()
200 out.indent() << "private static byte[] getBitCode" << bitwidth in GenerateJavaCodeAccessorMethodForBitwidth()
202 out.startBlock(); in GenerateJavaCodeAccessorMethodForBitwidth()
203 out.indent() << "byte[] bc = new byte[bitCode" << bitwidth << "Length];\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
204 out.indent() << "int offset = 0;\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
205 out.indent() << "byte[] seg;\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
207 out.indent() << "seg = getSegment" << bitwidth << "_" << i << "();\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
208 out.indent() << "System.arraycopy(seg, 0, bc, offset, seg.length);\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
209 out.indent() << "offset += seg.length;\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
211 out.indent() << "return bc;\n"; in GenerateJavaCodeAccessorMethodForBitwidth()
212 out.endBlock(); in GenerateJavaCodeAccessorMethodForBitwidth()
219 GeneratedFile &out) { in GenerateJavaCodeAccessorMethod() argument
220 if (!GenerateJavaCodeAccessorMethodForBitwidth(context, 32, out)) { in GenerateJavaCodeAccessorMethod()
224 if (!GenerateJavaCodeAccessorMethodForBitwidth(context, 64, out)) { in GenerateJavaCodeAccessorMethod()
234 const char *clazz_name, GeneratedFile &out) { in GenerateAccessorClass() argument
236 out << "/**\n"; in GenerateAccessorClass()
237 out << " * @hide\n"; in GenerateAccessorClass()
238 out << " */\n"; in GenerateAccessorClass()
239 out << "public class " << clazz_name; in GenerateAccessorClass()
240 out.startBlock(); in GenerateAccessorClass()
249 ret = GenerateJavaCodeAccessorMethod(context, out); in GenerateAccessorClass()
256 out.endBlock(); in GenerateAccessorClass()
276 GeneratedFile out; in GenerateJavaBitCodeAccessor() local
277 if (!out.startFile(output_path, filename, context.rsFileName, in GenerateJavaBitCodeAccessor()
282 out << "package " << context.packageName << ";\n\n"; in GenerateJavaBitCodeAccessor()
284 bool ret = GenerateAccessorClass(context, clazz_name.c_str(), out); in GenerateJavaBitCodeAccessor()
286 out.closeFile(); in GenerateJavaBitCodeAccessor()