• 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 << "#define " << constant->getName() << " " << spec.getValue() << "\n\n"; in writeConstantSpecification()
124 writeVersionGuardEnd(file, info); in writeConstantSpecification()
127 static void writeTypeSpecification(GeneratedFile* file, const TypeSpecification& spec) { in writeTypeSpecification() argument
131 writeVersionGuardStart(file, info, type->getFinalVersion()); in writeTypeSpecification()
136 *file << "typedef "; in writeTypeSpecification()
139 *file << spec.getSimpleType() << attribute; in writeTypeSpecification()
142 *file << "struct " << typeName << " _RS_OBJECT_DECL" << attribute; in writeTypeSpecification()
145 *file << "enum" << attribute << " "; in writeTypeSpecification()
148 *file << name << " "; in writeTypeSpecification()
150 *file << "{\n"; in writeTypeSpecification()
156 *file << " " << values[i]; in writeTypeSpecification()
158 *file << ","; in writeTypeSpecification()
161 *file << " // " << valueComments[i]; in writeTypeSpecification()
163 *file << "\n"; in writeTypeSpecification()
165 *file << "}"; in writeTypeSpecification()
169 *file << "struct" << attribute << " "; in writeTypeSpecification()
172 *file << name << " "; in writeTypeSpecification()
174 *file << "{\n"; in writeTypeSpecification()
179 *file << " " << fields[i] << ";"; in writeTypeSpecification()
181 *file << " // " << fieldComments[i]; in writeTypeSpecification()
183 *file << "\n"; in writeTypeSpecification()
185 *file << "}"; in writeTypeSpecification()
189 *file << " " << typeName << ";\n"; in writeTypeSpecification()
191 writeVersionGuardEnd(file, info); in writeTypeSpecification()
192 *file << "\n"; in writeTypeSpecification()
195 static void writeTypeComment(GeneratedFile* file, const Type& type) { in writeTypeComment() argument
197 writeComment(file, name, type.getSummary(), type.getDescription(), type.deprecated(), true); in writeTypeComment()
200 static void writeFunctionPermutation(GeneratedFile* file, const FunctionSpecification& spec, in writeFunctionPermutation() argument
203 writeVersionGuardStart(file, spec.getVersionInfo(), function->getFinalVersion()); in writeFunctionPermutation()
208 *file << "static inline "; in writeFunctionPermutation()
210 *file << "extern "; in writeFunctionPermutation()
216 *file << ret->rsType; in writeFunctionPermutation()
218 *file << "void"; in writeFunctionPermutation()
221 *file << makeAttributeTag(spec.getAttribute(), spec.isOverloadable() ? "overloadable" : "", in writeFunctionPermutation()
223 *file << "\n"; in writeFunctionPermutation()
226 *file << " " << permutation.getName() << "("; in writeFunctionPermutation()
234 *file << ","; in writeFunctionPermutation()
247 *file << "\n" << string(offset, ' '); in writeFunctionPermutation()
250 *file << " "; in writeFunctionPermutation()
253 *file << s; in writeFunctionPermutation()
259 *file << "void"; in writeFunctionPermutation()
261 *file << ")"; in writeFunctionPermutation()
265 *file << " {\n"; in writeFunctionPermutation()
268 *file << "\n"; in writeFunctionPermutation()
270 *file << " " << inlineCodeLines[ct] << "\n"; in writeFunctionPermutation()
273 *file << "}\n"; in writeFunctionPermutation()
275 *file << ";\n"; in writeFunctionPermutation()
278 writeVersionGuardEnd(file, spec.getVersionInfo()); in writeFunctionPermutation()
279 *file << "\n"; in writeFunctionPermutation()
282 static void writeFunctionComment(GeneratedFile* file, const Function& function) { in writeFunctionComment() argument
284 writeComment(file, function.getName(), function.getSummary(), function.getDescription(), in writeFunctionComment()
289 *file << " *\n"; in writeFunctionComment()
290 *file << " * Parameters:\n"; in writeFunctionComment()
293 *file << " * " << p->name << ": " << p->documentation << "\n"; in writeFunctionComment()
301 *file << " *\n"; in writeFunctionComment()
302 *file << " * Returns: " << returnDoc << "\n"; in writeFunctionComment()
305 *file << " */\n"; in writeFunctionComment()
308 static void writeFunctionSpecification(GeneratedFile* file, const FunctionSpecification& spec) { in writeFunctionSpecification() argument
311 writeFunctionPermutation(file, spec, *permutation); in writeFunctionSpecification()
319 GeneratedFile file; in writeHeaderFile() local
320 if (!file.start(directory, headerFileName)) { in writeHeaderFile()
325 file.writeNotices(); in writeHeaderFile()
326 writeComment(&file, headerFileName, specFile.getBriefDescription(), in writeHeaderFile()
328 file << "\n"; in writeHeaderFile()
332 file << "#ifndef " << guard << "\n"; in writeHeaderFile()
333 file << "#define " << guard << "\n\n"; in writeHeaderFile()
338 file << s << "\n"; in writeHeaderFile()
340 file << "\n"; in writeHeaderFile()
351 writeConstantComment(&file, *constant); in writeHeaderFile()
353 writeConstantSpecification(&file, *spec); in writeHeaderFile()
360 writeTypeComment(&file, *type); in writeHeaderFile()
362 writeTypeSpecification(&file, *spec); in writeHeaderFile()
374 writeFunctionComment(&file, *function); in writeHeaderFile()
376 writeFunctionSpecification(&file, *spec); in writeHeaderFile()
379 file << "#endif // " << guard << "\n"; in writeHeaderFile()
380 file.close(); in writeHeaderFile()