Home | History | Annotate | Download | only in api

Lines Matching full:file

5  * you may not use this file except in compliance with the License.
36 static void writeHeader(GeneratedFile* file, bool forVerification, const string& title) {
38 *file << "<!DOCTYPE html>\n";
39 *file << "<!-- " << AUTO_GENERATED_WARNING << "-->\n";
40 *file << "<html><head>\n"
52 *file << "<h1>" << title << "</h1>\n";
54 *file << "page.title=RenderScript " << title << "\n\n";
55 *file << "@jd:body\n\n";
57 *file << "<div class='renderscript'>\n";
60 static void writeFooter(GeneratedFile* file, bool forVerification) {
61 *file << "</div>\n";
63 *file << "</body></html>\n";
200 static bool generateHtmlParagraphs(GeneratedFile* file, const vector<string>& description) {
206 *file << "</p>\n";
211 *file << "<p> ";
218 *file << s << "\n";
221 *file << "</p>\n";
226 static void writeSummaryTableStart(GeneratedFile* file, const string& label, bool labelIsHeading) {
228 *file << "<h2 style='margin-bottom: 0px;'>" << label << "</h2>\n";
230 *file << "<table class='jd-sumtable'><tbody>\n";
232 *file << " <tr><th colspan='2'>" << label << "</th></tr>\n";
236 static void writeSummaryTableEnd(GeneratedFile* file) {
237 *file << "</tbody></table>\n";
272 static void writeSummaryTable(GeneratedFile* file, const ostringstream* entries, const char* name,
280 writeSummaryTableStart(file, prefix + name, labelAsHeader);
281 *file << s;
282 writeSummaryTableEnd(file);
286 static void writeSummaryTables(GeneratedFile* file, const map<string, Constant*>& constants,
294 writeSummaryTable(file, &constantStream, "Constants", deprecatedSelector, labelAsHeader);
300 writeSummaryTable(file, &typeStream, "Types", deprecatedSelector, labelAsHeader);
306 writeSummaryTable(file, &functionStream, "Functions", deprecatedSelector, labelAsHeader);
309 static void writeHtmlVersionTag(GeneratedFile* file, VersionInfo info) {
339 *file << " " << s << "\n";
343 static void writeDetailedTypeSpecification(GeneratedFile* file, const TypeSpecification* spec) {
347 *file << "<p>A typedef of: " << spec->getSimpleType()
351 writeHtmlVersionTag(file, spec->getVersionInfo());
352 *file << "</p>\n";
356 *file << "<p>An enum with the following values:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;\n";
357 writeHtmlVersionTag(file, spec->getVersionInfo());
358 *file << "</p>\n";
360 *file << " <table class='jd-tagtable'><tbody>\n";
364 *file << " <tr><th>" << values[i] << "</th><td>";
366 *file << valueComments[i];
368 *file << "</td></tr>\n";
370 *file << " </tbody></table><br/>\n";
374 *file << "<p>A structure with the following fields:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;";
375 writeHtmlVersionTag(file, spec->getVersionInfo());
376 *file << "</p>\n";
378 *file << " <table class='jd-tagtable'><tbody>\n";
382 *file << " <tr><th>" << fields[i] << "</th><td>";
384 *file << fieldComments[i];
386 *file << "</td></tr>\n";
388 *file << " </tbody></table><br/>\n";
394 static void writeDetailedConstantSpecification(GeneratedFile* file, ConstantSpecification* c) {
395 *file << " <tr><td>";
396 *file << "Value: " << c->getValue() << "\n";
397 writeHtmlVersionTag(file, c->getVersionInfo());
398 *file << " </td></tr>\n";
399 *file << "<br/>\n";
402 static bool writeOverviewForFile(GeneratedFile* file, const SpecFile& specFile) {
404 *file << "<h2>" << specFile.getBriefDescription() << "</h2>\n";
405 if (!generateHtmlParagraphs(file, specFile.getFullDescription())) {
410 // file << "<h2>Summary</h2>\n";
411 writeSummaryTables(file, specFile.getDocumentedConstants(), specFile.getDocumentedTypes(),
418 GeneratedFile file;
419 if (!file.start(directory, forVerification ? OVERVIEW_HTML_FILE_NAME : OVERVIEW_JD_FILE_NAME)) {
424 writeHeader(&file, forVerification, "Runtime API Reference");
427 if (!writeOverviewForFile(&file, *specFile)) {
432 writeFooter(&file, forVerification);
433 file.close();
438 GeneratedFile file;
439 if (!file.start(directory, forVerification ? INDEX_HTML_FILE_NAME : INDEX_JD_FILE_NAME)) {
442 writeHeader(&file, forVerification, "Index");
444 writeSummaryTables(&file, systemSpecification.getConstants(), systemSpecification.getTypes(),
447 writeSummaryTables(&file, systemSpecification.getConstants(), systemSpecification.getTypes(),
450 writeFooter(&file, forVerification);
451 file.close();
455 static void writeDeprecatedWarning(GeneratedFile* file, Definition* definition) {
457 *file << " <p><b>Deprecated.</b> ";
461 *file << s;
463 *file << "Do not use.";
465 *file << "</p>\n";
469 static bool writeDetailedConstant(GeneratedFile* file, Constant* constant) {
475 *file << "<a name='android_rs:" << name << "'></a>\n";
476 *file << "<div class='jd-details'>\n";
477 *file << " <h4 class='jd-details-title'>\n";
478 *file << " <span class='sympad'>" << name << "</span>\n";
479 *file << " <span class='normal'>: " << constant->getSummary() << "</span>\n";
480 *file << " </h4>\n";
482 *file << " <div class='jd-details-descr'>\n";
483 *file << " <table class='jd-tagtable'><tbody>\n";
488 *file << " <h5 class='jd-tagtitle'>Variant:</h5>\n";
490 writeDetailedConstantSpecification(file, spec);
492 *file << " </tbody></table>\n";
493 *file << " </div>\n";
495 *file << " <div class='jd-tagdata jd-tagdescr'>\n";
497 writeDeprecatedWarning(file, constant);
498 if (!generateHtmlParagraphs(file, constant->getDescription())) {
501 *file << " </div>\n";
503 *file << "</div>\n";
504 *file << "\n";
508 static bool writeDetailedType(GeneratedFile* file, Type* type) {
514 *file << "<a name='android_rs:" << name << "'></a>\n";
515 *file << "<div class='jd-details'>\n";
516 *file << " <h4 class='jd-details-title'>\n";
517 *file << " <span class='sympad'>" << name << "</span>\n";
518 *file << " <span class='normal'>: " << type->getSummary() << "</span>\n";
519 *file << " </h4>\n";
521 *file << " <div class='jd-details-descr'>\n";
523 writeDetailedTypeSpecification(file, spec);
526 writeDeprecatedWarning(file, type);
527 if (!generateHtmlParagraphs(file, type->getDescription())) {
531 *file << " </div>\n";
532 *file << "</div>\n";
533 *file << "\n";
537 static bool writeDetailedFunction(GeneratedFile* file, Function* function) {
543 *file << "<a name='android_rs:" << name << "'></a>\n";
544 *file << "<div class='jd-details'>\n";
545 *file << " <h4 class='jd-details-title'>\n";
546 *file << " <span class='sympad'>" << name << "</span>\n";
547 *file << " <span class='normal'>: " << function->getSummary() << "</span>\n";
548 *file << " </h4>\n";
550 *file << " <div class='jd-details-descr'>\n";
555 *file << " <table class='jd-tagtable'><tbody>\n";
557 *file << " <tr>\n";
558 *file << " <td>" << i.second.htmlDeclaration << "</td>\n";
559 *file << " <td>";
560 writeHtmlVersionTag(file, i.second.info);
561 *file << " </td>\n";
562 *file << " </tr>\n";
564 *file << " </tbody></table>\n";
565 *file << " </div>\n";
568 *file << " <div class='jd-tagdata'>";
569 *file << " <h5 class='jd-tagtitle'>Parameters</h5>\n";
570 *file << " <table class='jd-tagtable'><tbody>\n";
572 *file << " <tr><th>" << p->name << "</th><td>" << p->documentation << "</td></tr>\n";
574 *file << " </tbody></table>\n";
575 *file << " </div>\n";
580 *file << " <div class='jd-tagdata'>";
581 *file << " <h5 class='jd-tagtitle'>Returns</h5>\n";
582 *file << " <table class='jd-tagtable'><tbody>\n";
583 *file << " <tr><td>" << ret << "</td></tr>\n";
584 *file << " </tbody></table>\n";
585 *file << " </div>\n";
588 *file << " <div class='jd-tagdata jd-tagdescr'>\n";
589 writeDeprecatedWarning(file, function);
590 if (!generateHtmlParagraphs(file, function->getDescription())) {
593 *file << " </div>\n";
595 *file << "</div>\n";
596 *file << "\n";
607 GeneratedFile file;
610 if (!file.start(directory, fileName)) {
616 writeHeader(&file, forVerification, title);
618 file << "<h2>Overview</h2>\n";
619 if (!generateHtmlParagraphs(&file, specFile.getFullDescription())) {
624 file << "<h2>Summary</h2>\n";
629 writeSummaryTables(&file, constants, types, functions, NON_DEPRECATED_ONLY, false);
630 writeSummaryTables(&file, constants, types, functions, DEPRECATED_ONLY, false);
634 file << "<h2>Constants</h2>\n";
636 if (!writeDetailedConstant(&file, i.second)) {
642 file << "<h2>Types</h2>\n";
644 if (!writeDetailedType(&file, i.second)) {
650 file << "<h2>Functions</h2>\n";
652 if (!writeDetailedFunction(&file, i.second)) {
658 writeFooter(&file, forVerification);
659 file.close();
662 // If in error, write a final message to make it easier to figure out which file failed.
668 static void generateSnippet(GeneratedFile* file, const string& fileName, const string& title) {
670 *file << offset << "<li><a href=\"<?cs var:toroot ?>guide/topics/renderscript/reference/"
672 *file << offset << " <span class=\"en\">" << title << "</span>\n";
673 *file << offset << "</a></li>\n";
676 /* Generate a partial file of links that should be cut & pasted into the proper section of the
677 * guide_toc.cs file.
680 GeneratedFile file;
681 if (!file.start(directory, "guide_toc.cs")) {
684 file << "<!-- Copy and paste the following lines into the RenderScript section of\n";
685 file << " platform/frameworks/base/docs/html/guide/guide_toc.cs\n\n";
688 file << offset << "<li class=\"nav-section\">\n";
689 file << offset << " <div class=\"nav-section-header\">\n";
690 file << offset << " <a href=\"<?cs var:toroot ?>guide/topics/renderscript/reference/" <<
692 file << offset << " <span class=\"en\">Runtime API Reference</span>\n";
693 file << offset << " </a></div>\n";
694 file << offset << " <ul>\n";
699 generateSnippet(&file, fileName, specFile->getBriefDescription());
702 generateSnippet(&file, INDEX_HTML_FILE_NAME, "Index");
704 file << offset << " </ul>\n";
705 file << offset << "</li>\n";