doxygen_manual-1.8.1 (1035109), страница 40

Файл №1035109 doxygen_manual-1.8.1 (Методичка, задание и документация на ЛР №7) 40 страницаdoxygen_manual-1.8.1 (1035109) страница 402017-12-22СтудИзба
Просмтор этого файла доступен только зарегистрированным пользователям. Но у нас супер быстрая регистрация: достаточно только электронной почты!

Текст из файла (страница 40)

The result of parsing a tag file is the insertion of Entry objects in the entry tree. Thefield Entry::tagInfo is used to mark the entry as external, and holds information about the tag file.Documentation parserSpecial comment blocks are stored as strings in the entities that they document. There is a string for the briefdescription and a string for the detailed description. The documentation parser reads these strings and executesthe commands it finds in it (this is the second pass in parsing the documentation).

It writes the result directly to theoutput generators.The parser is written in C++ and can be found in src/docparser.cpp. The tokens that are eaten by the parser comefrom src/doctokenizer.l. Code fragments found in the comment blocks are passed on to the source parser.The main entry point for the documentation parser is validatingParseDoc() declared in src/docparser.h. For simple texts with special commands validatingParseText() is used.Source parserIf source browsing is enabled or if code fragments are encountered in the documentation, the source parser isinvoked.The code parser tries to cross-reference to source code it parses with documented entities.

It also does syntaxhighlighting of the sources. The output is directly written to the output generators.The main entry point for the code parser is parseCode() declared in src/code.h.Output generatorsAfter data is gathered and cross-referenced, doxygen generates output in various formats. For this it uses themethods provided by the abstract class OutputGenerator. In order to generate output for multiple formats atonce, the methods of OutputList are called instead. This class maintains a list of concrete output generators,where each method called is delegated to all generators in the list.To allow small deviations in what is written to the output for each concrete output generator, it is possible to temporarily disable certain generators. The OutputList class contains various disable() and enable() methodsfor this.

The methods OutputList::pushGeneratorState() and OutputList::popGeneratorState() are used to temporarily save the set of enabled/disabled output generators on a stack.The XML is generated directly from the gathered data structures. In the future XML will be used as an intermediatelanguage (IL). The output generators will then use this IL as a starting point to generate the specific output formats.The advantage of having an IL is that various independently developed tools written in various languages, couldextract information from the XML output. Possible tools could be:• an interactive source browser• a class diagram generator• computing code metrics.Generated by Doxygen168Doxygen’s internalsDebuggingSince doxygen uses a lot of flex code it is important to understand how flex works (for this one should readthe man page) and to understand what it is doing when flex is parsing some input.

Fortunately, when flex is usedwith the -d option it outputs what rules matched. This makes it quite easy to follow what is going on for a particularinput fragment.To make it easier to toggle debug information for a given flex file I wrote the following perl script, which automaticallyadds or removes -d from the correct line in the Makefile:#!/usr/bin/perl$file = shift @ARGV;print "Toggle debugging mode for $file\n";# add or remove the -d flex flag in the makefileunless (rename "Makefile.libdoxygen","Makefile.libdoxygen.old") {print STDERR "Error: cannot rename Makefile.libdoxygen!\n";exit 1;}if (open(F,"<Makefile.libdoxygen.old")) {unless (open(G,">Makefile.libdoxygen")) {print STDERR "Error: opening file Makefile.libdoxygen for writing\n";exit 1;}print "Processing Makefile.libdoxygen...\n";while (<F>) {if ( s/(LEX) (-i )?-P([a-zA-Z]+)YY -t $file/(LEX) -d \1-P\2YY -t $file/g ) {print "Enabling debug info for $file\n";}elsif ( s/(LEX) -d (-i )?-P([a-zA-Z]+)YY -t $file/(LEX) \1-P\2YY -t $file/g ) {print "Disabling debug info for $file\n";}print G "$_";}close F;unlink "Makefile.libdoxygen.old";}else {print STDERR "Warning file Makefile.libdoxygen.old does not exist!\n";}# touch the file$now = time;utime $now, $now, $fileGenerated by DoxygenChapter 25Perl Module Output formatSince version 1.2.18, Doxygen can generate a new output format we have called the "Perl Module output format".It has been designed as an intermediate format that can be used to generate new and customized output withouthaving to modify the Doxygen source.

Therefore, its purpose is similar to the XML output format that can be alsogenerated by Doxygen. The XML output format is more standard, but the Perl Module output format is possiblysimpler and easier to use.The Perl Module output format is still experimental at the moment and could be changed in incompatible waysin future versions, although this should not be very probable. It is also lacking some features of other Doxygenbackends. However, it can be already used to generate useful output, as shown by the Perl Module-based LaTeXgenerator.Please report any bugs or problems you find in the Perl Module backend or the Perl Module-based LaTeX generatorto the doxygen-develop mailing list. Suggestions are welcome as well.25.1UsageWhen the GENERATE_PERLMOD tag is enabled in the Doxyfile, running Doxygen generates a number of files inthe perlmod/ subdirectory of your output directory.

These files are the following:• DoxyDocs.pm. This is the Perl module that actually contains the documentation, in the Perl Module formatdescribed below.• DoxyModel.pm. This Perl module describes the structure of DoxyDocs.pm, independently of the actualdocumentation. See below for details.• doxyrules.make. This file contains the make rules to build and clean the files that are generated from theDoxyfile. Also contains the paths to those files and other relevant information. This file is intended to beincluded by your own Makefile.• Makefile. This is a simple Makefile including doxyrules.make.To make use of the documentation stored in DoxyDocs.pm you can use one of the default Perl Module-basedgenerators provided by Doxygen (at the moment this includes the Perl Module-based LaTeX generator, see below)or write your own customized generator.

This should not be too hard if you have some knowledge of Perl and it’sthe main purpose of including the Perl Module backend in Doxygen. See below for details on how to do this.25.2Using the LaTeX generator.The Perl Module-based LaTeX generator is pretty experimental and incomplete at the moment, but you could findit useful nevertheless. It can generate documentation for functions, typedefs and variables within files and classes170Perl Module Output formatand can be customized quite a lot by redefining TeX macros.

However, there is still no documentation on how to dothis.Setting the PERLMOD_LATEX tag to YES in the Doxyfile enables the creation of some additional files in theperlmod/ subdirectory of your output directory. These files contain the Perl scripts and LaTeX code necessary togenerate PDF and DVI output from the Perl Module output, using PDFLaTeX and LaTeX respectively. Rules toautomate the use of these files are also added to doxyrules.make and the Makefile.The additional generated files are the following:• doxylatex.pl. This Perl script uses DoxyDocs.pm and DoxyModel.pm to generate doxydocs.tex, a TeXfile containing the documentation in a format that can be accessed by LaTeX code.

This file is not directlyLaTeXable.• doxyformat.tex. This file contains the LaTeX code that transforms the documentation from doxydocs.tex intoLaTeX text suitable to be LaTeX’ed and presented to the user.• doxylatex-template.pl. This Perl script uses DoxyModel.pm to generate doxytemplate.tex, a TeX file defining default values for some macros. doxytemplate.tex is included by doxyformat.tex to avoid the need ofexplicitly defining some macros.• doxylatex.tex. This is a very simple LaTeX document that loads some packages and includes doxyformat.texand doxydocs.tex.

This document is LaTeX’ed to produce the PDF and DVI documentation by the rules addedto doxyrules.make.25.2.1Creation of PDF and DVI outputTo try this you need to have installed LaTeX, PDFLaTeX and the packages used by doxylatex.tex.1. Update your Doxyfile to the latest version using:doxygen -u Doxyfile2.

Set both GENERATE_PERLMOD and PERLMOD_LATEX tags to YES in your Doxyfile.3. Run Doxygen on your Doxyfile:doxygen Doxyfile4. A perlmod/ subdirectory should have appeared in your output directory. Enter the perlmod/ subdirectory andrun:make pdfThis should generate a doxylatex.pdf with the documentation in PDF format.5. Run:make dviThis should generate a doxylatex.dvi with the documentation in DVI format.Generated by Doxygen25.3 Documentation format.25.3171Documentation format.The Perl Module documentation generated by Doxygen is stored in DoxyDocs.pm. This is a very simple Perl module that contains only two statements: an assignment to the variable $doxydocs and the customary 1; statementwhich usually ends Perl modules.

The documentation is stored in the variable $doxydocs, which can then beaccessed by a Perl script using DoxyDocs.pm.$doxydocs contains a tree-like structure composed of three types of nodes: strings, hashes and lists.• Strings. These are normal Perl strings. They can be of any length can contain any character. Their semanticsdepends on their location within the tree. This type of node has no children.• Hashes.

These are references to anonymous Perl hashes. A hash can have multiple fields, each with adifferent key. The value of a hash field can be a string, a hash or a list, and its semantics depends on the keyof the hash field and the location of the hash within the tree. The values of the hash fields are the children ofthe node.• Lists. These are references to anonymous Perl lists. A list has an undefined number of elements, whichare the children of the node. Each element has the same type (string, hash or list) and the same semantics,depending on the location of the list within the tree.As you can see, the documentation contained in $doxydocs does not present any special impediment to be processed by a simple Perl script.25.4Data structureYou might be interested in processing the documentation contained in DoxyDocs.pm without needing to take intoaccount the semantics of each node of the documentation tree.

Характеристики

Список файлов лабораторной работы

Методичка, задание и документация на ЛР №7
docs
Git User Manual.mht
Git в картинках.mht
Генератор документации Doxygen - быстрый старт.mht
Иллюстрированное руководство по Git на Windows.mht
Использование Doxygen для документирования кода.mht
Свежие статьи
Популярно сейчас
Почему делать на заказ в разы дороже, чем купить готовую учебную работу на СтудИзбе? Наши учебные работы продаются каждый год, тогда как большинство заказов выполняются с нуля. Найдите подходящий учебный материал на СтудИзбе!
Ответы на популярные вопросы
Да! Наши авторы собирают и выкладывают те работы, которые сдаются в Вашем учебном заведении ежегодно и уже проверены преподавателями.
Да! У нас любой человек может выложить любую учебную работу и зарабатывать на её продажах! Но каждый учебный материал публикуется только после тщательной проверки администрацией.
Вернём деньги! А если быть более точными, то автору даётся немного времени на исправление, а если не исправит или выйдет время, то вернём деньги в полном объёме!
Да! На равне с готовыми студенческими работами у нас продаются услуги. Цены на услуги видны сразу, то есть Вам нужно только указать параметры и сразу можно оплачивать.
Отзывы студентов
Ставлю 10/10
Все нравится, очень удобный сайт, помогает в учебе. Кроме этого, можно заработать самому, выставляя готовые учебные материалы на продажу здесь. Рейтинги и отзывы на преподавателей очень помогают сориентироваться в начале нового семестра. Спасибо за такую функцию. Ставлю максимальную оценку.
Лучшая платформа для успешной сдачи сессии
Познакомился со СтудИзбой благодаря своему другу, очень нравится интерфейс, количество доступных файлов, цена, в общем, все прекрасно. Даже сам продаю какие-то свои работы.
Студизба ван лав ❤
Очень офигенный сайт для студентов. Много полезных учебных материалов. Пользуюсь студизбой с октября 2021 года. Серьёзных нареканий нет. Хотелось бы, что бы ввели подписочную модель и сделали материалы дешевле 300 рублей в рамках подписки бесплатными.
Отличный сайт
Лично меня всё устраивает - и покупка, и продажа; и цены, и возможность предпросмотра куска файла, и обилие бесплатных файлов (в подборках по авторам, читай, ВУЗам и факультетам). Есть определённые баги, но всё решаемо, да и администраторы реагируют в течение суток.
Маленький отзыв о большом помощнике!
Студизба спасает в те моменты, когда сроки горят, а работ накопилось достаточно. Довольно удобный сайт с простой навигацией и огромным количеством материалов.
Студ. Изба как крупнейший сборник работ для студентов
Тут дофига бывает всего полезного. Печально, что бывают предметы по которым даже одного бесплатного решения нет, но это скорее вопрос к студентам. В остальном всё здорово.
Спасательный островок
Если уже не успеваешь разобраться или застрял на каком-то задание поможет тебе быстро и недорого решить твою проблему.
Всё и так отлично
Всё очень удобно. Особенно круто, что есть система бонусов и можно выводить остатки денег. Очень много качественных бесплатных файлов.
Отзыв о системе "Студизба"
Отличная платформа для распространения работ, востребованных студентами. Хорошо налаженная и качественная работа сайта, огромная база заданий и аудитория.
Отличный помощник
Отличный сайт с кучей полезных файлов, позволяющий найти много методичек / учебников / отзывов о вузах и преподователях.
Отлично помогает студентам в любой момент для решения трудных и незамедлительных задач
Хотелось бы больше конкретной информации о преподавателях. А так в принципе хороший сайт, всегда им пользуюсь и ни разу не было желания прекратить. Хороший сайт для помощи студентам, удобный и приятный интерфейс. Из недостатков можно выделить только отсутствия небольшого количества файлов.
Спасибо за шикарный сайт
Великолепный сайт на котором студент за не большие деньги может найти помощь с дз, проектами курсовыми, лабораторными, а также узнать отзывы на преподавателей и бесплатно скачать пособия.
Популярные преподаватели
Добавляйте материалы
и зарабатывайте!
Продажи идут автоматически
6418
Авторов
на СтудИзбе
307
Средний доход
с одного платного файла
Обучение Подробнее