• Home
  • Raw
  • Download

Lines Matching refs:file

45 static void writeVersionGuardStart(GeneratedFile* file, VersionInfo info, unsigned int finalVersion…  in writeVersionGuardStart()  argument
47 *file << "#ifndef __LP64__\n"; in writeVersionGuardStart()
49 *file << "#ifdef __LP64__\n"; in writeVersionGuardStart()
64 *file << "#if !defined(RS_VERSION) || " << checkMaxVersion.str() << "\n"; in writeVersionGuardStart()
67 *file << "#if (defined(RS_VERSION) && (RS_VERSION >= " << info.minVersion << ")"; in writeVersionGuardStart()
69 *file << " && " << checkMaxVersion.str(); in writeVersionGuardStart()
71 *file << ")\n"; in writeVersionGuardStart()
75 static void writeVersionGuardEnd(GeneratedFile* file, VersionInfo info) { in writeVersionGuardEnd() argument
77 *file << "#endif\n"; in writeVersionGuardEnd()
80 *file << "#endif\n"; in writeVersionGuardEnd()
84 static void writeComment(GeneratedFile* file, const string& name, const string& briefComment, in writeComment() argument
90 *file << "/*\n"; in writeComment()
92 *file << " * " << name << ": " << briefComment << "\n"; in writeComment()
93 *file << " *\n"; in writeComment()
96 *file << " * DEPRECATED. Do not use.\n"; in writeComment()
97 *file << " *\n"; in writeComment()
103 *file << " * " << s << "\n"; in writeComment()
105 *file << " *\n"; in writeComment()
109 *file << " */\n"; in writeComment()
113 static void writeConstantComment(GeneratedFile* file, const Constant& constant) { in writeConstantComment() argument
115 writeComment(file, name, constant.getSummary(), constant.getDescription(), in writeConstantComment()
119 static void writeConstantSpecification(GeneratedFile* file, const ConstantSpecification& spec) { in writeConstantSpecification() argument
122 writeVersionGuardStart(file, info, constant->getFinalVersion()); in writeConstantSpecification()
123 *file << "static const " << spec.getType() << " " << constant->getName() in writeConstantSpecification()
125 writeVersionGuardEnd(file, info); in writeConstantSpecification()
128 static void writeTypeSpecification(GeneratedFile* file, const TypeSpecification& spec) { in writeTypeSpecification() argument
132 writeVersionGuardStart(file, info, type->getFinalVersion()); in writeTypeSpecification()
137 *file << "typedef "; in writeTypeSpecification()
140 *file << spec.getSimpleType() << attribute; in writeTypeSpecification()
143 *file << "struct " << typeName << " _RS_OBJECT_DECL" << attribute; in writeTypeSpecification()
146 *file << "enum" << attribute << " "; in writeTypeSpecification()
149 *file << name << " "; in writeTypeSpecification()
151 *file << "{\n"; in writeTypeSpecification()
157 *file << " " << values[i]; in writeTypeSpecification()
159 *file << ","; in writeTypeSpecification()
162 *file << " // " << valueComments[i]; in writeTypeSpecification()
164 *file << "\n"; in writeTypeSpecification()
166 *file << "}"; in writeTypeSpecification()
170 *file << "struct" << attribute << " "; in writeTypeSpecification()
173 *file << name << " "; in writeTypeSpecification()
175 *file << "{\n"; in writeTypeSpecification()
180 *file << " " << fields[i] << ";"; in writeTypeSpecification()
182 *file << " // " << fieldComments[i]; in writeTypeSpecification()
184 *file << "\n"; in writeTypeSpecification()
186 *file << "}"; in writeTypeSpecification()
190 *file << " " << typeName << ";\n"; in writeTypeSpecification()
192 writeVersionGuardEnd(file, info); in writeTypeSpecification()
193 *file << "\n"; in writeTypeSpecification()
196 static void writeTypeComment(GeneratedFile* file, const Type& type) { in writeTypeComment() argument
198 writeComment(file, name, type.getSummary(), type.getDescription(), type.deprecated(), true); in writeTypeComment()
201 static void writeFunctionPermutation(GeneratedFile* file, const FunctionSpecification& spec, in writeFunctionPermutation() argument
204 writeVersionGuardStart(file, spec.getVersionInfo(), function->getFinalVersion()); in writeFunctionPermutation()
209 *file << "static inline "; in writeFunctionPermutation()
211 *file << "extern "; in writeFunctionPermutation()
217 *file << ret->rsType; in writeFunctionPermutation()
219 *file << "void"; in writeFunctionPermutation()
222 *file << makeAttributeTag(spec.getAttribute(), spec.isOverloadable() ? "overloadable" : "", in writeFunctionPermutation()
224 *file << "\n"; in writeFunctionPermutation()
227 *file << " " << permutation.getName() << "("; in writeFunctionPermutation()
235 *file << ","; in writeFunctionPermutation()
248 *file << "\n" << string(offset, ' '); in writeFunctionPermutation()
251 *file << " "; in writeFunctionPermutation()
254 *file << s; in writeFunctionPermutation()
260 *file << "void"; in writeFunctionPermutation()
262 *file << ")"; in writeFunctionPermutation()
266 *file << " {\n"; in writeFunctionPermutation()
269 *file << "\n"; in writeFunctionPermutation()
271 *file << " " << inlineCodeLines[ct] << "\n"; in writeFunctionPermutation()
274 *file << "}\n"; in writeFunctionPermutation()
276 *file << ";\n"; in writeFunctionPermutation()
279 writeVersionGuardEnd(file, spec.getVersionInfo()); in writeFunctionPermutation()
280 *file << "\n"; in writeFunctionPermutation()
283 static void writeFunctionComment(GeneratedFile* file, const Function& function) { in writeFunctionComment() argument
285 writeComment(file, function.getName(), function.getSummary(), function.getDescription(), in writeFunctionComment()
290 *file << " *\n"; in writeFunctionComment()
291 *file << " * Parameters:\n"; in writeFunctionComment()
294 *file << " * " << p->name << ": " << p->documentation << "\n"; in writeFunctionComment()
302 *file << " *\n"; in writeFunctionComment()
303 *file << " * Returns: " << returnDoc << "\n"; in writeFunctionComment()
306 *file << " */\n"; in writeFunctionComment()
309 static void writeFunctionSpecification(GeneratedFile* file, const FunctionSpecification& spec) { in writeFunctionSpecification() argument
312 writeFunctionPermutation(file, spec, *permutation); in writeFunctionSpecification()
320 GeneratedFile file; in writeHeaderFile() local
321 if (!file.start(directory, headerFileName)) { in writeHeaderFile()
326 file.writeNotices(); in writeHeaderFile()
327 writeComment(&file, headerFileName, specFile.getBriefDescription(), in writeHeaderFile()
329 file << "\n"; in writeHeaderFile()
333 file << "#ifndef " << guard << "\n"; in writeHeaderFile()
334 file << "#define " << guard << "\n\n"; in writeHeaderFile()
339 file << s << "\n"; in writeHeaderFile()
341 file << "\n"; in writeHeaderFile()
352 writeConstantComment(&file, *constant); in writeHeaderFile()
354 writeConstantSpecification(&file, *spec); in writeHeaderFile()
361 writeTypeComment(&file, *type); in writeHeaderFile()
363 writeTypeSpecification(&file, *spec); in writeHeaderFile()
375 writeFunctionComment(&file, *function); in writeHeaderFile()
377 writeFunctionSpecification(&file, *spec); in writeHeaderFile()
380 file << "#endif // " << guard << "\n"; in writeHeaderFile()
381 file.close(); in writeHeaderFile()