| 688 | // ------------------------------------------------------------------------------------------------- |
| 689 | |
| 690 | void print_manual ( |
| 691 | ) |
| 692 | { |
| 693 | ostringstream sout; |
| 694 | |
| 695 | const unsigned long indent = 2; |
| 696 | |
| 697 | cout << "\n"; |
| 698 | sout << "Htmlify v" << VERSION; |
| 699 | cout << wrap_string(sout.str(),indent,indent); sout.str(""); |
| 700 | |
| 701 | |
| 702 | sout << "This is a fairly simple program that takes source files and pretty prints them " |
| 703 | << "in HTML. There are two pretty printing styles, black and white or color. The " |
| 704 | << "black and white style is meant to look nice when printed out on paper. It looks " |
| 705 | << "a little funny on the screen but on paper it is pretty nice. The color version " |
| 706 | << "on the other hand has nonprintable HTML elements such as links and anchors."; |
| 707 | cout << "\n\n" << wrap_string(sout.str(),indent,indent); sout.str(""); |
| 708 | |
| 709 | |
| 710 | sout << "The colored style puts HTML anchors on class and function names. This means " |
| 711 | << "you can link directly to the part of the code that contains these names. For example, " |
| 712 | << "if you had a source file bar.cpp with a function called foo in it you could link " |
| 713 | << "directly to the function with a link address of \"bar.cpp.html#foo\". It is also " |
| 714 | << "possible to instruct Htmlify to place HTML anchors at arbitrary spots by using a " |
| 715 | << "special comment of the form /*!A anchor_name */. You can put other things in the " |
| 716 | << "comment but the important bit is to have it begin with /*!A then some white space " |
| 717 | << "then the anchor name you want then more white space and then you can add whatever " |
| 718 | << "you like. You would then refer to this anchor with a link address of " |
| 719 | << "\"file.html#anchor_name\"."; |
| 720 | cout << "\n\n" << wrap_string(sout.str(),indent,indent); sout.str(""); |
| 721 | |
| 722 | sout << "Quoted includes are linked only when the selected header is also among the input files. " |
| 723 | << "Header lookup searches the including file's directory, then each -I directory in order. " |
| 724 | << "Unresolved or unrendered headers remain plain text. Explicit command-line files are " |
| 725 | << "written at the output root and are not duplicated when also found through -i. " |
| 726 | << "Links use those final output locations. Concatenated output has no separate header links."; |
| 727 | cout << "\n\n" << wrap_string(sout.str(),indent,indent); sout.str(""); |
| 728 | |
| 729 | sout << "Htmlify also has the ability to create a simple index of all the files it is given. " |
| 730 | << "The --index option creates a file named index.html with a frame on the left side " |
| 731 | << "that contains links to all the files."; |
| 732 | cout << "\n\n" << wrap_string(sout.str(),indent,indent); sout.str(""); |
| 733 | |
| 734 | |
| 735 | sout << "Finally, Htmlify can produce annotated XML output instead of HTML. The output will " |
| 736 | << "contain all functions which are immediately followed by comments of the form /*! comment body !*/. " |
| 737 | << "Similarly, all classes or structs that immediately contain one of these comments following their " |
| 738 | << "opening { will also be output as annotated XML. Note also that if you wish to document a " |
| 739 | << "piece of code using one of these comments but don't want it to appear in the output XML then " |
| 740 | << "use either a comment like /* */ or /*!P !*/ to mark the code as \"private\"."; |
| 741 | cout << "\n\n" << wrap_string(sout.str(),indent,indent) << "\n\n"; sout.str(""); |
| 742 | } |
| 743 | |
| 744 | // ------------------------------------------------------------------------------------------------- |
| 745 |
no test coverage detected