Doxygen
Loading...
Searching...
No Matches
perlmodgen.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2022 by Dimitri van Heesch.
4 * Authors: Dimitri van Heesch, Miguel Lobo.
5 *
6 * Permission to use, copy, modify, and distribute this software and its
7 * documentation under the terms of the GNU General Public License is hereby
8 * granted. No representations are made about the suitability of this software
9 * for any purpose. It is provided "as is" without express or implied warranty.
10 * See the GNU General Public License for more details.
11 *
12 * Documents produced by Doxygen are derivative works derived from the
13 * input used in their production; they are not affected by this license.
14 *
15 */
16
17#include <stdlib.h>
18#include <stack>
19
20#include "perlmodgen.h"
21#include "docparser.h"
22#include "docnode.h"
23#include "message.h"
24#include "doxygen.h"
25#include "pagedef.h"
26#include "memberlist.h"
27#include "arguments.h"
28#include "config.h"
29#include "groupdef.h"
30#include "classdef.h"
31#include "classlist.h"
32#include "filename.h"
33#include "membername.h"
34#include "namespacedef.h"
35#include "membergroup.h"
36#include "section.h"
37#include "util.h"
38#include "htmlentity.h"
39#include "emoji.h"
40#include "dir.h"
41#include "portable.h"
42#include "moduledef.h"
43#include "construct.h"
44
45#define PERLOUTPUT_MAX_INDENTATION 40
46
48{
49 public:
50 std::ostream *m_t = nullptr;
51
52 PerlModOutputStream(std::ostream &t) : m_t(&t) { }
53
54 void add(char c);
55 void add(const QCString &s);
56 void add(int n);
57 void add(unsigned int n);
58};
59
61{
62 *m_t << c;
63}
64
66{
67 *m_t << s;
68}
69
71{
72 *m_t << n;
73}
74
75void PerlModOutputStream::add(unsigned int n)
76{
77 *m_t << n;
78}
79
81{
82public:
83
85
86 inline PerlModOutput(bool pretty)
87 : m_pretty(pretty), m_stream(nullptr), m_indentation(false), m_blockstart(true)
88 {
89 m_spaces[0] = 0;
90 }
91
92 virtual ~PerlModOutput() { reset(); }
94
95 void reset() { m_stream=nullptr; }
96
98
99 //inline PerlModOutput &openSave() { iopenSave(); return *this; }
100 //inline PerlModOutput &closeSave(QCString &s) { icloseSave(s); return *this; }
101
103 {
104 if (m_blockstart)
105 m_blockstart = false;
106 else
107 m_stream->add(',');
108 indent();
109 return *this;
110 }
111
112 inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
113 inline PerlModOutput &add(const QCString &s) { m_stream->add(s); return *this; }
114 inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
115 inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
116 inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
117
118 PerlModOutput &addQuoted(const QCString &s) { iaddQuoted(s); return *this; }
119
121 {
122 if (m_pretty) {
123 m_stream->add('\n');
124 m_stream->add(m_spaces);
125 }
126 return *this;
127 }
128
129 inline PerlModOutput &open(char c, const QCString &s = QCString()) { iopen(c, s); return *this; }
130 inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
131
132 inline PerlModOutput &addField(const QCString &s) { iaddField(s); return *this; }
133 inline PerlModOutput &addFieldQuotedChar(const QCString &field, char content)
134 {
135 iaddFieldQuotedChar(field, content); return *this;
136 }
137 inline PerlModOutput &addFieldQuotedString(const QCString &field, const QCString &content)
138 {
139 iaddFieldQuotedString(field, content); return *this;
140 }
141 inline PerlModOutput &addFieldBoolean(const QCString &field, bool content)
142 {
143 return addFieldQuotedString(field, content ? "yes" : "no");
144 }
145 inline PerlModOutput &openList(const QCString &s = QCString()) { open('[', s); return *this; }
146 inline PerlModOutput &closeList() { close(']'); return *this; }
147 inline PerlModOutput &openHash(const QCString &s = QCString() ) { open('{', s); return *this; }
148 inline PerlModOutput &closeHash() { close('}'); return *this; }
149
150protected:
151
152 //void iopenSave();
153 //void icloseSave(QCString &);
154
155 void incIndent();
156 void decIndent();
157
158 void iaddQuoted(const QCString &);
159 void iaddFieldQuotedChar(const QCString &, char);
160 void iaddFieldQuotedString(const QCString &, const QCString &);
161 void iaddField(const QCString &);
162
163 void iopen(char, const QCString &);
164 void iclose(char);
165
166private:
167
171
172 //std::stack<PerlModOutputStream*> m_saved;
174};
175
176//void PerlModOutput::iopenSave()
177//{
178// m_saved.push(m_stream);
179// m_stream = new PerlModOutputStream();
180//}
181
182//void PerlModOutput::icloseSave(QCString &s)
183//{
184// s = m_stream->m_s;
185// delete m_stream;
186// m_stream = m_saved.top();
187// m_saved.pop();
188//}
189
191{
193 {
194 char *s = &m_spaces[m_indentation * 2];
195 *s++ = ' '; *s++ = ' '; *s = 0;
196 }
198}
199
206
208{
209 if (str.isEmpty()) return;
210 const char *s = str.data();
211 char c = 0;
212 while ((c = *s++) != 0)
213 {
214 if ((c == '\'') || (c == '\\'))
215 {
216 m_stream->add('\\');
217 }
218 m_stream->add(c);
219 }
220}
221
223{
225 m_stream->add(s);
226 m_stream->add(m_pretty ? " => " : "=>");
227}
228
229void PerlModOutput::iaddFieldQuotedChar(const QCString &field, char content)
230{
231 iaddField(field);
232 m_stream->add('\'');
233 if ((content == '\'') || (content == '\\'))
234 m_stream->add('\\');
235 m_stream->add(content);
236 m_stream->add('\'');
237}
238
240{
241 if (content == nullptr)
242 return;
243 iaddField(field);
244 m_stream->add('\'');
245 iaddQuoted(content);
246 m_stream->add('\'');
247}
248
249void PerlModOutput::iopen(char c, const QCString &s)
250{
251 if (s != nullptr)
252 iaddField(s);
253 else
255 m_stream->add(c);
256 incIndent();
257 m_blockstart = true;
258}
259
261{
262 decIndent();
263 indent();
264 if (c != 0)
265 m_stream->add(c);
266 m_blockstart = false;
267}
268
269/*! @brief Concrete visitor implementation for PerlMod output. */
271{
272 public:
274
275 void finish();
276
277 //--------------------------------------
278 // visitor functions for leaf nodes
279 //--------------------------------------
280
281 void operator()(const DocWord &);
282 void operator()(const DocLinkedWord &);
283 void operator()(const DocWhiteSpace &);
284 void operator()(const DocSymbol &);
285 void operator()(const DocEmoji &);
286 void operator()(const DocURL &);
287 void operator()(const DocLineBreak &);
288 void operator()(const DocHorRuler &);
289 void operator()(const DocStyleChange &);
290 void operator()(const DocVerbatim &);
291 void operator()(const DocAnchor &);
292 void operator()(const DocInclude &);
293 void operator()(const DocIncOperator &);
294 void operator()(const DocFormula &);
295 void operator()(const DocIndexEntry &);
296 void operator()(const DocSimpleSectSep &);
297 void operator()(const DocCite &);
298 void operator()(const DocSeparator &);
299
300 //--------------------------------------
301 // visitor functions for compound nodes
302 //--------------------------------------
303
304 void operator()(const DocAutoList &);
305 void operator()(const DocAutoListItem &);
306 void operator()(const DocPara &) ;
307 void operator()(const DocRoot &);
308 void operator()(const DocSimpleSect &);
309 void operator()(const DocTitle &);
310 void operator()(const DocSimpleList &);
311 void operator()(const DocSimpleListItem &);
312 void operator()(const DocSection &);
313 void operator()(const DocHtmlList &);
314 void operator()(const DocHtmlListItem &);
315 void operator()(const DocHtmlDescList &);
316 void operator()(const DocHtmlDescTitle &);
317 void operator()(const DocHtmlDescData &);
318 void operator()(const DocHtmlTable &);
319 void operator()(const DocHtmlRow &);
320 void operator()(const DocHtmlCell &);
321 void operator()(const DocHtmlCaption &);
322 void operator()(const DocInternal &);
323 void operator()(const DocHRef &);
324 void operator()(const DocHtmlSummary &);
325 void operator()(const DocHtmlDetails &);
326 void operator()(const DocHtmlHeader &);
327 void operator()(const DocImage &);
328 void operator()(const DocDotFile &);
329 void operator()(const DocMscFile &);
330 void operator()(const DocDiaFile &);
331 void operator()(const DocPlantUmlFile &);
332 void operator()(const DocLink &);
333 void operator()(const DocRef &);
334 void operator()(const DocSecRefItem &);
335 void operator()(const DocSecRefList &);
336 void operator()(const DocParamSect &);
337 void operator()(const DocParamList &);
338 void operator()(const DocXRefItem &);
339 void operator()(const DocInternalRef &);
340 void operator()(const DocText &);
341 void operator()(const DocHtmlBlockQuote &);
342 void operator()(const DocVhdlFlow &);
343 void operator()(const DocParBlock &);
344
345 private:
346 template<class T>
347 void visitChildren(const T &t)
348 {
349 for (const auto &child : t.children())
350 {
351 std::visit(*this, child);
352 }
353 }
354
355 //--------------------------------------
356 // helper functions
357 //--------------------------------------
358
359 void addLink(const QCString &ref, const QCString &file,
360 const QCString &anchor);
361
362 void enterText();
363 void leaveText();
364
365 void openItem(const QCString &);
366 void closeItem();
367 void singleItem(const QCString &);
368 void openSubBlock(const QCString & = QCString());
369 void closeSubBlock();
370
371 //--------------------------------------
372 // state variables
373 //--------------------------------------
374
379};
380
382 : m_output(output), m_textmode(false), m_textblockstart(FALSE)
383{
384 m_output.openList("doc");
385}
386
388{
389 leaveText();
390 m_output.closeList()
391 .add(m_other);
392}
393
394void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCString &anchor)
395{
396 QCString link = file;
397 if (!anchor.isEmpty())
398 (link += "_1") += anchor;
399 m_output.addFieldQuotedString("link", link);
400}
401
403{
404 leaveText();
405 m_output.openHash().addFieldQuotedString("type", name);
406}
407
409{
410 leaveText();
411 m_output.closeHash();
412}
413
415{
416 if (m_textmode)
417 return;
418 openItem("text");
419 m_output.addField("content").add('\'');
420 m_textmode = true;
421}
422
424{
425 if (!m_textmode)
426 return;
427 m_textmode = false;
429 .add('\'')
430 .closeHash();
431}
432
434{
435 openItem(name);
436 closeItem();
437}
438
440{
441 leaveText();
442 m_output.openList(s);
443 m_textblockstart = true;
444}
445
447{
448 leaveText();
449 m_output.closeList();
450}
451
452//void PerlModDocVisitor::openOther()
453//{
454 // Using a secondary text stream will corrupt the perl file. Instead of
455 // printing doc => [ data => [] ], it will print doc => [] data => [].
456 /*
457 leaveText();
458 m_output.openSave();
459 */
460//}
461
462//void PerlModDocVisitor::closeOther()
463//{
464 // Using a secondary text stream will corrupt the perl file. Instead of
465 // printing doc => [ data => [] ], it will print doc => [] data => [].
466 /*
467 QCString other;
468 leaveText();
469 m_output.closeSave(other);
470 m_other += other;
471 */
472//}
473
475{
476 enterText();
477 m_output.addQuoted(w.word());
478}
479
481{
482 openItem("url");
483 addLink(w.ref(), w.file(), w.anchor());
484 m_output.addFieldQuotedString("content", w.word());
485 closeItem();
486}
487
489{
490 enterText();
491 m_output.add(' ');
492}
493
495{
497 const char *accent=nullptr;
498 if (res->symb)
499 {
500 switch (res->type)
501 {
503 enterText();
504 m_output.add(res->symb);
505 break;
507 enterText();
508 m_output.add(res->symb[0]);
509 break;
511 leaveText();
512 openItem("symbol");
513 m_output.addFieldQuotedString("symbol", res->symb);
514 closeItem();
515 break;
516 default:
517 switch(res->type)
518 {
520 accent = "umlaut";
521 break;
523 accent = "acute";
524 break;
526 accent = "grave";
527 break;
529 accent = "circ";
530 break;
532 accent = "slash";
533 break;
535 accent = "tilde";
536 break;
538 accent = "cedilla";
539 break;
541 accent = "ring";
542 break;
543 default:
544 break;
545 }
546 leaveText();
547 if (accent)
548 {
549 openItem("accent");
551 .addFieldQuotedString("accent", accent)
552 .addFieldQuotedChar("letter", res->symb[0]);
553 closeItem();
554 }
555 break;
556 }
557 }
558 else
559 {
560 err("perl: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(sy.symbol(),TRUE));
561 }
562}
563
565{
566 enterText();
567 const char *name = EmojiEntityMapper::instance().name(sy.index());
568 if (name)
569 {
570 m_output.add(name);
571 }
572 else
573 {
574 m_output.add(sy.name());
575 }
576}
577
579{
580 openItem("url");
581 m_output.addFieldQuotedString("content", u.url());
582 closeItem();
583}
584
586{
587 singleItem("linebreak");
588}
589
591{
592 singleItem("hruler");
593}
594
596{
597 const char *style = nullptr;
598 switch (s.style())
599 {
600 case DocStyleChange::Bold: style = "bold"; break;
601 case DocStyleChange::S: style = "s"; break;
602 case DocStyleChange::Strike: style = "strike"; break;
603 case DocStyleChange::Del: style = "del"; break;
604 case DocStyleChange::Underline: style = "underline"; break;
605 case DocStyleChange::Ins: style = "ins"; break;
606 case DocStyleChange::Italic: style = "italic"; break;
607 case DocStyleChange::Code: style = "code"; break;
608 case DocStyleChange::Subscript: style = "subscript"; break;
609 case DocStyleChange::Superscript: style = "superscript"; break;
610 case DocStyleChange::Center: style = "center"; break;
611 case DocStyleChange::Small: style = "small"; break;
612 case DocStyleChange::Cite: style = "cite"; break;
613 case DocStyleChange::Preformatted: style = "preformatted"; break;
614 case DocStyleChange::Div: style = "div"; break;
615 case DocStyleChange::Span: style = "span"; break;
616 case DocStyleChange::Kbd: style = "kbd"; break;
617 case DocStyleChange::Typewriter: style = "typewriter"; break;
618 }
619 openItem("style");
620 m_output.addFieldQuotedString("style", style)
621 .addFieldBoolean("enable", s.enable());
622 closeItem();
623}
624
626{
627 const char *type = nullptr;
628 switch (s.type())
629 {
631#if 0
632 m_output.add("<programlisting>");
633 parseCode(m_ci,s->context(),s->text(),FALSE,0);
634 m_output.add("</programlisting>");
635 return;
636#endif
639 case DocVerbatim::Verbatim: type = "preformatted"; break;
640 case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
641 case DocVerbatim::RtfOnly: type = "rtfonly"; break;
642 case DocVerbatim::ManOnly: type = "manonly"; break;
643 case DocVerbatim::LatexOnly: type = "latexonly"; break;
644 case DocVerbatim::XmlOnly: type = "xmlonly"; break;
645 case DocVerbatim::DocbookOnly: type = "docbookonly"; break;
646 case DocVerbatim::Dot: type = "dot"; break;
647 case DocVerbatim::Msc: type = "msc"; break;
648 case DocVerbatim::PlantUML: type = "plantuml"; break;
649 }
650 openItem(type);
651 if (s.hasCaption())
652 {
653 openSubBlock("caption");
654 visitChildren(s);
656 }
657 m_output.addFieldQuotedString("content", s.text());
658 closeItem();
659}
660
662{
663 QCString anchor = anc.file() + "_1" + anc.anchor();
664 openItem("anchor");
665 m_output.addFieldQuotedString("id", anchor);
666 closeItem();
667}
668
670{
671 const char *type = nullptr;
672 switch (inc.type())
673 {
675 return;
677 return;
678 case DocInclude::DontInclude: return;
679 case DocInclude::DontIncWithLines: return;
680 case DocInclude::HtmlInclude: type = "htmlonly"; break;
681 case DocInclude::LatexInclude: type = "latexonly"; break;
682 case DocInclude::RtfInclude: type = "rtfonly"; break;
683 case DocInclude::ManInclude: type = "manonly"; break;
684 case DocInclude::XmlInclude: type = "xmlonly"; break;
685 case DocInclude::DocbookInclude: type = "docbookonly"; break;
686 case DocInclude::VerbInclude: type = "preformatted"; break;
687 case DocInclude::Snippet: return;
688 case DocInclude::SnippetWithLines: return;
689 }
690 openItem(type);
691 m_output.addFieldQuotedString("content", inc.text());
692 closeItem();
693}
694
696{
697#if 0
698 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
699 // op.type(),op.isFirst(),op.isLast(),op.text().data());
700 if (op.isFirst())
701 {
702 m_output.add("<programlisting>");
703 }
704 if (op.type()!=DocIncOperator::Skip)
705 {
706 parseCode(m_ci,op.context(),op.text(),FALSE,0);
707 }
708 if (op.isLast())
709 {
710 m_output.add("</programlisting>");
711 }
712 else
713 {
714 m_output.add('\n');
715 }
716#endif
717}
718
720{
721 openItem("formula");
722 QCString id;
723 id += QCString().setNum(f.id());
724 m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f.text());
725 closeItem();
726}
727
729{
730#if 0
731 m_output.add("<indexentry>"
732 "<primaryie>");
733 m_output.addQuoted(ie->entry());
734 m_output.add("</primaryie>"
735 "<secondaryie></secondaryie>"
736 "</indexentry>");
737#endif
738}
739
743
745{
746 openItem("cite");
747 m_output.addFieldQuotedString("text", cite.text());
748 closeItem();
749}
750
751
752//--------------------------------------
753// visitor functions for compound nodes
754//--------------------------------------
755
757{
758 openItem("list");
759 m_output.addFieldQuotedString("style", l.isEnumList() ? "ordered" : (l.isCheckedList() ? "check" :"itemized"));
760 openSubBlock("content");
761 visitChildren(l);
763 closeItem();
764}
765
767{
768 openSubBlock();
769 switch (li.itemNumber())
770 {
771 case DocAutoList::Unchecked: // unchecked
772 m_output.addFieldQuotedString("style", "Unchecked");
773 break;
774 case DocAutoList::Checked_x: // checked with x
775 case DocAutoList::Checked_X: // checked with X
776 m_output.addFieldQuotedString("style", "Checked");
777 break;
778 default:
779 break;
780 }
781 visitChildren(li);
783}
784
786{
788 m_textblockstart = false;
789 else
790 singleItem("parbreak");
791 /*
792 openItem("para");
793 openSubBlock("content");
794 */
795 visitChildren(p);
796 /*
797 closeSubBlock();
798 closeItem();
799 */
800}
801
803{
804 visitChildren(r);
805}
806
808{
809 const char *type = nullptr;
810 switch (s.type())
811 {
812 case DocSimpleSect::See: type = "see"; break;
813 case DocSimpleSect::Return: type = "return"; break;
814 case DocSimpleSect::Author: type = "author"; break;
815 case DocSimpleSect::Authors: type = "authors"; break;
816 case DocSimpleSect::Version: type = "version"; break;
817 case DocSimpleSect::Since: type = "since"; break;
818 case DocSimpleSect::Date: type = "date"; break;
819 case DocSimpleSect::Note: type = "note"; break;
820 case DocSimpleSect::Warning: type = "warning"; break;
821 case DocSimpleSect::Pre: type = "pre"; break;
822 case DocSimpleSect::Post: type = "post"; break;
823 case DocSimpleSect::Copyright: type = "copyright"; break;
824 case DocSimpleSect::Invar: type = "invariant"; break;
825 case DocSimpleSect::Remark: type = "remark"; break;
826 case DocSimpleSect::Attention: type = "attention"; break;
827 case DocSimpleSect::Important: type = "important"; break;
828 case DocSimpleSect::User: type = "par"; break;
829 case DocSimpleSect::Rcs: type = "rcs"; break;
831 err("unknown simple section found\n");
832 break;
833 }
834 leaveText();
835 m_output.openHash();
836 //openOther();
837 openSubBlock(type);
838 if (s.title())
839 {
840 std::visit(*this,*s.title());
841 }
842 visitChildren(s);
844 //closeOther();
845 m_output.closeHash();
846}
847
849{
850 openItem("title");
851 openSubBlock("content");
852 visitChildren(t);
854 closeItem();
855}
856
858{
859 openItem("list");
860 m_output.addFieldQuotedString("style", "itemized");
861 openSubBlock("content");
862 visitChildren(l);
864 closeItem();
865}
866
868{
869 openSubBlock();
870 if (li.paragraph())
871 {
872 std::visit(*this,*li.paragraph());
873 }
875}
876
878{
879 QCString sect = QCString().sprintf("sect%d",s.level());
880 openItem(sect);
881 //m_output.addFieldQuotedString("title", s.title());
882 if (s.title())
883 {
884 std::visit(*this,*s.title());
885 }
886 openSubBlock("content");
887 visitChildren(s);
889 closeItem();
890}
891
893{
894 openItem("list");
895 m_output.addFieldQuotedString("style", (l.type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
896 for (const auto &opt : l.attribs())
897 {
898 if (opt.name=="type")
899 {
900 m_output.addFieldQuotedString("list_type", qPrint(opt.value));
901 }
902 if (opt.name=="start")
903 {
904 m_output.addFieldQuotedString("start", qPrint(opt.value));
905 }
906 }
907 openSubBlock("content");
908 visitChildren(l);
910 closeItem();
911}
912
914{
915 for (const auto &opt : l.attribs())
916 {
917 if (opt.name=="value")
918 {
919 m_output.addFieldQuotedString("item_value", qPrint(opt.value));
920 }
921 }
922 openSubBlock();
923 visitChildren(l);
925}
926
928{
929#if 0
930 m_output.add("<variablelist>\n");
931#endif
932 visitChildren(dl);
933#if 0
934 m_output.add("</variablelist>\n");
935#endif
936}
937
939{
940#if 0
941 m_output.add("<varlistentry><term>");
942#endif
943 visitChildren(dt);
944#if 0
945 m_output.add("</term></varlistentry>\n");
946#endif
947}
948
950{
951#if 0
952 m_output.add("<listitem>");
953#endif
954 visitChildren(dd);
955#if 0
956 m_output.add("</listitem>\n");
957#endif
958}
959
961{
962#if 0
963 m_output.add("<table rows=\""); m_output.add(t.numRows());
964 m_output.add("\" cols=\""); m_output.add(t.numCols()); m_output.add("\">");
965#endif
966 if (t.caption())
967 {
968 std::visit(*this,*t.caption());
969 }
970 visitChildren(t);
971#if 0
972 m_output.add("</table>\n");
973#endif
974}
975
977{
978#if 0
979 m_output.add("<row>\n");
980#endif
981 visitChildren(r);
982#if 0
983 m_output.add("</row>\n");
984#endif
985}
986
988{
989#if 0
990 if (c.isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
991#endif
992 visitChildren(c);
993#if 0
994 m_output.add("</entry>");
995#endif
996}
997
999{
1000#if 0
1001 m_output.add("<caption>");
1002#endif
1003 visitChildren(c);
1004#if 0
1005 m_output.add("</caption>\n");
1006#endif
1007}
1008
1010{
1011#if 0
1012 m_output.add("<internal>");
1013#endif
1014 visitChildren(i);
1015#if 0
1016 m_output.add("</internal>");
1017#endif
1018}
1019
1021{
1022#if 0
1023 m_output.add("<ulink url=\""); m_output.add(href.url()); m_output.add("\">");
1024#endif
1025 visitChildren(href);
1026#if 0
1027 m_output.add("</ulink>");
1028#endif
1029}
1030
1032{
1033 openItem("summary");
1034 openSubBlock("content");
1035 visitChildren(summary);
1036 closeSubBlock();
1037 closeItem();
1038}
1039
1041{
1042 openItem("details");
1043 auto summary = details.summary();
1044 if (summary)
1045 {
1046 std::visit(*this,*summary);
1047 }
1048 openSubBlock("content");
1050 closeSubBlock();
1051 closeItem();
1052}
1053
1055{
1056#if 0
1057 m_output.add("<sect"); m_output.add(header.level()); m_output.add(">");
1058#endif
1059 visitChildren(header);
1060#if 0
1061 m_output.add("</sect"); m_output.add(header.level()); m_output.add(">\n");
1062#endif
1063}
1064
1066{
1067#if 0
1068 m_output.add("<image type=\"");
1069 switch(img.type())
1070 {
1071 case DocImage::Html: m_output.add("html"); break;
1072 case DocImage::Latex: m_output.add("latex"); break;
1073 case DocImage::Rtf: m_output.add("rtf"); break;
1074 }
1075 m_output.add("\"");
1076
1077 QCString baseName=img.name();
1078 int i;
1079 if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
1080 {
1081 baseName=baseName.right(baseName.length()-i-1);
1082 }
1083 m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
1084 if (!img.width().isEmpty())
1085 {
1086 m_output.add(" width=\"");
1087 m_output.addQuoted(img.width());
1088 m_output.add("\"");
1089 }
1090 else if (!img.height().isEmpty())
1091 {
1092 m_output.add(" height=\"");
1093 m_output.addQuoted(img.height());
1094 m_output.add("\"");
1095 }
1096 m_output.add(">");
1097#endif
1098 visitChildren(img);
1099#if 0
1100 m_output.add("</image>");
1101#endif
1102}
1103
1105{
1106#if 0
1107 m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
1108#endif
1109 visitChildren(df);
1110#if 0
1111 m_output.add("</dotfile>");
1112#endif
1113}
1115{
1116#if 0
1117 m_output.add("<mscfile name=\""); m_output.add(df->file()); m_output.add("\">");
1118#endif
1119 visitChildren(df);
1120#if 0
1121 m_output.add("<mscfile>");
1122#endif
1123}
1124
1126{
1127#if 0
1128 m_output.add("<diafile name=\""); m_output.add(df->file()); m_output.add("\">");
1129#endif
1130 visitChildren(df);
1131#if 0
1132 m_output.add("</diafile>");
1133#endif
1134}
1135
1137{
1138#if 0
1139 m_output.add("<plantumlfile name=\""); m_output.add(df->file()); m_output.add("\">");
1140#endif
1141 visitChildren(df);
1142#if 0
1143 m_output.add("</plantumlfile>");
1144#endif
1145}
1146
1147
1149{
1150 openItem("link");
1151 addLink(lnk.ref(), lnk.file(), lnk.anchor());
1152 visitChildren(lnk);
1153 closeItem();
1154}
1155
1157{
1158 openItem("ref");
1159 if (!ref.hasLinkText())
1160 m_output.addFieldQuotedString("text", ref.targetTitle());
1161 openSubBlock("content");
1162 visitChildren(ref);
1163 closeSubBlock();
1164 closeItem();
1165}
1166
1168{
1169#if 0
1170 m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
1171#endif
1172 visitChildren(ref);
1173#if 0
1174 m_output.add("</tocitem>");
1175#endif
1176}
1177
1179{
1180#if 0
1181 m_output.add("<toclist>");
1182#endif
1183 visitChildren(l);
1184#if 0
1185 m_output.add("</toclist>");
1186#endif
1187}
1188
1190{
1191 leaveText();
1192 const char *type = nullptr;
1193 switch(s.type())
1194 {
1195 case DocParamSect::Param: type = "params"; break;
1196 case DocParamSect::RetVal: type = "retvals"; break;
1197 case DocParamSect::Exception: type = "exceptions"; break;
1198 case DocParamSect::TemplateParam: type = "templateparam"; break;
1200 err("unknown parameter section found\n");
1201 break;
1202 }
1203 m_output.openHash();
1204 //openOther();
1205 openSubBlock(type);
1206 visitChildren(s);
1207 closeSubBlock();
1208 //closeOther();
1209 m_output.closeHash();
1210}
1211
1215
1217{
1218 leaveText();
1219 m_output.openHash().openList("parameters");
1220 for (const auto &param : pl.parameters())
1221 {
1222 QCString name;
1223 const DocWord *word = std::get_if<DocWord>(&param);
1224 const DocLinkedWord *linkedWord = std::get_if<DocLinkedWord>(&param);
1225 if (word)
1226 {
1227 name = word->word();
1228 }
1229 else if (linkedWord)
1230 {
1231 name = linkedWord->word();
1232 }
1233
1234 QCString dir = "";
1235 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1236 if (sect && sect->hasInOutSpecifier())
1237 {
1239 {
1240 if (pl.direction()==DocParamSect::In)
1241 {
1242 dir = "in";
1243 }
1244 else if (pl.direction()==DocParamSect::Out)
1245 {
1246 dir = "out";
1247 }
1248 else if (pl.direction()==DocParamSect::InOut)
1249 {
1250 dir = "in,out";
1251 }
1252 }
1253 }
1254
1255 m_output.openHash()
1256 .addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
1257 .closeHash();
1258 }
1259 m_output.closeList()
1260 .openList("doc");
1261 for (const auto &par : pl.paragraphs())
1262 {
1263 std::visit(*this,par);
1264 }
1265 leaveText();
1266 m_output.closeList()
1267 .closeHash();
1268}
1269
1271{
1272#if 0
1273 m_output.add("<xrefsect id=\"");
1274 m_output.add(x->file()); m_output.add("_1"); m_output.add(x->anchor());
1275 m_output.add("\">");
1276 m_output.add("<xreftitle>");
1277 m_output.addQuoted(x->title());
1278 m_output.add("</xreftitle>");
1279 m_output.add("<xrefdescription>");
1280#endif
1281 if (x.title().isEmpty()) return;
1282 openItem("xrefitem");
1283 openSubBlock("content");
1284 visitChildren(x);
1285 if (x.title().isEmpty()) return;
1286 closeSubBlock();
1287 closeItem();
1288#if 0
1289 m_output.add("</xrefdescription>");
1290 m_output.add("</xrefsect>");
1291#endif
1292}
1293
1295{
1296 openItem("ref");
1297 addLink(QCString(),ref.file(),ref.anchor());
1298 openSubBlock("content");
1299 visitChildren(ref);
1300 closeSubBlock();
1301 closeItem();
1302}
1303
1305{
1306 visitChildren(t);
1307}
1308
1310{
1311 openItem("blockquote");
1312 openSubBlock("content");
1313 visitChildren(q);
1314 closeSubBlock();
1315 closeItem();
1316}
1317
1321
1323{
1324 visitChildren(pb);
1325}
1326
1327
1328static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const QCString &)
1329{
1330 if (!al.hasParameters()) return;
1331 output.openList("template_parameters");
1332 for (const Argument &a : al)
1333 {
1334 output.openHash();
1335 if (!a.type.isEmpty())
1336 output.addFieldQuotedString("type", a.type);
1337 if (!a.name.isEmpty())
1338 output.addFieldQuotedString("declaration_name", a.name)
1339 .addFieldQuotedString("definition_name", a.name);
1340 if (!a.defval.isEmpty())
1341 output.addFieldQuotedString("default", a.defval);
1342 output.closeHash();
1343 }
1344 output.closeList();
1345}
1346
1347static void addTemplateList(const ClassDef *cd,PerlModOutput &output)
1348{
1350}
1351
1352static void addTemplateList(const ConceptDef *cd,PerlModOutput &output)
1353{
1355}
1356
1358 const QCString &name,
1359 const QCString &fileName,
1360 int lineNr,
1361 const Definition *scope,
1362 const MemberDef *md,
1363 const QCString &text)
1364{
1365 QCString stext = text.stripWhiteSpace();
1366 if (stext.isEmpty())
1367 {
1368 output.addField(name).add("{}");
1369 }
1370 else
1371 {
1372 auto parser { createDocParser() };
1373 auto ast { validatingParseDoc(*parser.get(),
1374 fileName,lineNr,scope,md,stext,FALSE,FALSE,
1375 QCString(),FALSE,FALSE,Config_getBool(MARKDOWN_SUPPORT)) };
1376 output.openHash(name);
1377 auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
1378 if (astImpl)
1379 {
1380 PerlModDocVisitor visitor(output);
1381 std::visit(visitor,astImpl->root);
1382 visitor.finish();
1383 }
1384 output.closeHash();
1385 }
1386}
1387
1388static const char *getProtectionName(Protection prot)
1389{
1390 return to_string_lower(prot);
1391}
1392
1393static const char *getVirtualnessName(Specifier virt)
1394{
1395 return to_string_lower(virt);
1396}
1397
1400
1402{
1403 pathDoxyfile = qs;
1405}
1406
1408{
1409public:
1410
1412
1425
1426 inline PerlModGenerator(bool pretty) : m_output(pretty) { }
1427
1428 void generatePerlModForMember(const MemberDef *md, const Definition *);
1430 void generatePerlModSection(const Definition *d, MemberList *ml,
1431 const QCString &name, const QCString &header=QCString());
1432 void addListOfAllMembers(const ClassDef *cd);
1433 void addIncludeInfo(const IncludeInfo *ii);
1434 void generatePerlModForClass(const ClassDef *cd);
1435 void generatePerlModForConcept(const ConceptDef *cd);
1436 void generatePerlModForModule(const ModuleDef *mod);
1438 void generatePerlModForFile(const FileDef *fd);
1439 void generatePerlModForGroup(const GroupDef *gd);
1441
1442 bool createOutputFile(std::ofstream &f, const QCString &s);
1443 bool createOutputDir(Dir &perlModDir);
1444 bool generateDoxyLatexTex();
1445 bool generateDoxyFormatTex();
1447 bool generateDoxyLatexPL();
1449 bool generateDoxyRules();
1450 bool generateMakefile();
1451 bool generatePerlModOutput();
1452
1453 void generate();
1454};
1455
1457{
1458 // + declaration/definition arg lists
1459 // + reimplements
1460 // + reimplementedBy
1461 // + exceptions
1462 // + const/volatile specifiers
1463 // - examples
1464 // - source definition
1465 // - source references
1466 // - source referenced by
1467 // - body code
1468 // - template arguments
1469 // (templateArguments(), definitionTemplateParameterLists())
1470
1471 QCString memType;
1472 QCString name;
1473 bool isFunc=FALSE;
1474 switch (md->memberType())
1475 {
1476 case MemberType::Define: memType="define"; break;
1477 case MemberType::EnumValue: memType="enumvalue"; break;
1478 case MemberType::Property: memType="property"; break;
1479 case MemberType::Variable: memType="variable"; break;
1480 case MemberType::Typedef: memType="typedef"; break;
1481 case MemberType::Enumeration: memType="enum"; break;
1482 case MemberType::Function: memType="function"; isFunc=TRUE; break;
1483 case MemberType::Signal: memType="signal"; isFunc=TRUE; break;
1484 case MemberType::Friend: memType="friend"; isFunc=TRUE; break;
1485 case MemberType::DCOP: memType="dcop"; isFunc=TRUE; break;
1486 case MemberType::Slot: memType="slot"; isFunc=TRUE; break;
1487 case MemberType::Event: memType="event"; break;
1488 case MemberType::Interface: memType="interface"; break;
1489 case MemberType::Service: memType="service"; break;
1490 case MemberType::Sequence: memType="sequence"; break;
1491 case MemberType::Dictionary: memType="dictionary"; break;
1492 }
1493
1494 bool isFortran = md->getLanguage()==SrcLangExt::Fortran;
1495 name = md->name();
1496 if (md->isAnonymous()) name = "__unnamed" + name.right(name.length() - 1)+"__";
1497
1498 m_output.openHash()
1499 .addFieldQuotedString("kind", memType)
1500 .addFieldQuotedString("name", name)
1501 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1502 .addFieldQuotedString("protection", getProtectionName(md->protection()))
1503 .addFieldBoolean("static", md->isStatic());
1504
1506 addPerlModDocBlock(m_output,"detailed",md->getDefFileName(),md->getDefLine(),md->getOuterScope(),md,md->documentation());
1507 if (md->memberType()!=MemberType::Define &&
1509 m_output.addFieldQuotedString("type", md->typeString());
1510
1511 const ArgumentList &al = md->argumentList();
1512 if (isFunc) //function
1513 {
1514 m_output.addFieldBoolean("const", al.constSpecifier())
1515 .addFieldBoolean("volatile", al.volatileSpecifier());
1516
1517 m_output.openList("parameters");
1518 const ArgumentList &declAl = md->declArgumentList();
1519 if (!declAl.empty())
1520 {
1521 auto defIt = al.begin();
1522 for (const Argument &a : declAl)
1523 {
1524 const Argument *defArg = nullptr;
1525 if (defIt!=al.end())
1526 {
1527 defArg = &(*defIt);
1528 ++defIt;
1529 }
1530 m_output.openHash();
1531
1532 if (!a.name.isEmpty())
1533 m_output.addFieldQuotedString("declaration_name", a.name);
1534
1535 if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
1536 m_output.addFieldQuotedString("definition_name", defArg->name);
1537
1538 if (isFortran && defArg && !defArg->type.isEmpty())
1539 m_output.addFieldQuotedString("type", defArg->type);
1540 else if (!a.type.isEmpty())
1541 m_output.addFieldQuotedString("type", a.type);
1542
1543 if (!a.array.isEmpty())
1544 m_output.addFieldQuotedString("array", a.array);
1545
1546 if (!a.defval.isEmpty())
1547 m_output.addFieldQuotedString("default_value", a.defval);
1548
1549 if (!a.attrib.isEmpty())
1550 m_output.addFieldQuotedString("attributes", a.attrib);
1551
1552 m_output.closeHash();
1553 }
1554 }
1555 m_output.closeList();
1556 }
1557 else if (md->memberType()==MemberType::Define &&
1558 md->argsString()!=nullptr) // define
1559 {
1560 m_output.openList("parameters");
1561 for (const Argument &a : al)
1562 {
1563 m_output.openHash()
1564 .addFieldQuotedString("name", a.type)
1565 .closeHash();
1566 }
1567 m_output.closeList();
1568 }
1569 else if (md->argsString()!=nullptr)
1570 {
1571 m_output.addFieldQuotedString("arguments", md->argsString());
1572 }
1573
1574 if (!md->initializer().isEmpty())
1575 m_output.addFieldQuotedString("initializer", md->initializer());
1576
1577 if (!md->excpString().isEmpty())
1578 m_output.addFieldQuotedString("exceptions", md->excpString());
1579
1580 if (md->memberType()==MemberType::Enumeration) // enum
1581 {
1582 const MemberVector &enumFields = md->enumFieldList();
1583 m_output.addFieldQuotedString("type", md->enumBaseType());
1584 if (!enumFields.empty())
1585 {
1586 m_output.openList("values");
1587 for (const auto &emd : enumFields)
1588 {
1589 m_output.openHash()
1590 .addFieldQuotedString("name", emd->name());
1591
1592 if (!emd->initializer().isEmpty())
1593 m_output.addFieldQuotedString("initializer", emd->initializer());
1594
1595 addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1596
1597 addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->documentation());
1598
1599 m_output.closeHash();
1600 }
1601 m_output.closeList();
1602 }
1603 }
1604
1605 if (md->memberType() == MemberType::Variable && !md->bitfieldString().isEmpty())
1606 {
1607 QCString bitfield = md->bitfieldString();
1608 if (bitfield.at(0) == ':') bitfield = bitfield.mid(1);
1609 m_output.addFieldQuotedString("bitfield", bitfield);
1610 }
1611
1612 const MemberDef *rmd = md->reimplements();
1613 if (rmd)
1614 m_output.openHash("reimplements")
1615 .addFieldQuotedString("name", rmd->name())
1616 .closeHash();
1617
1618 const MemberVector &rbml = md->reimplementedBy();
1619 if (!rbml.empty())
1620 {
1621 m_output.openList("reimplemented_by");
1622 for (const auto &rbmd : rbml)
1623 m_output.openHash()
1624 .addFieldQuotedString("name", rbmd->name())
1625 .closeHash();
1626 m_output.closeList();
1627 }
1628
1629 m_output.closeHash();
1630}
1631
1633 MemberList *ml,const QCString &name,const QCString &header)
1634{
1635 if (ml==nullptr) return; // empty list
1636
1637 m_output.openHash(name);
1638
1639 if (!header.isEmpty())
1640 m_output.addFieldQuotedString("header", header);
1641
1642 m_output.openList("members");
1643 for (const auto &md : *ml)
1644 {
1646 }
1647 m_output.closeList()
1648 .closeHash();
1649}
1650
1652{
1653 m_output.openList("all_members");
1654 for (auto &mni : cd->memberNameInfoLinkedMap())
1655 {
1656 for (auto &mi : *mni)
1657 {
1658 const MemberDef *md=mi->memberDef();
1659 const ClassDef *mcd=md->getClassDef();
1660
1661 m_output.openHash()
1662 .addFieldQuotedString("name", md->name())
1663 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1664 .addFieldQuotedString("protection", getProtectionName(mi->prot()));
1665
1666 if (!mi->ambiguityResolutionScope().isEmpty())
1667 m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope());
1668
1669 m_output.addFieldQuotedString("scope", mcd->name())
1670 .closeHash();
1671 }
1672 }
1673 m_output.closeList();
1674}
1675
1677{
1678 if (!mgl.empty())
1679 {
1680 m_output.openList("user_defined");
1681 for (const auto &mg : mgl)
1682 {
1683 m_output.openHash();
1684 if (!mg->header().isEmpty())
1685 {
1686 m_output.addFieldQuotedString("header", mg->header());
1687 }
1688
1689 if (!mg->members().empty())
1690 {
1691 m_output.openList("members");
1692 for (const auto &md : mg->members())
1693 {
1695 }
1696 m_output.closeList();
1697 }
1698 m_output.closeHash();
1699 }
1700 m_output.closeList();
1701 }
1702}
1703
1705{
1706 if (ii)
1707 {
1708 QCString nm = ii->includeName;
1709 if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1710 if (!nm.isEmpty())
1711 {
1712 m_output.openHash("includes");
1713 m_output.addFieldBoolean("local", ii->kind==IncludeKind::IncludeLocal || ii->kind==IncludeKind::ImportLocal)
1714 .addFieldQuotedString("name", nm)
1715 .closeHash();
1716 }
1717 }
1718}
1719
1721{
1722 // + brief description
1723 // + detailed description
1724 // + template argument list(s)
1725 // - include file
1726 // + member groups
1727 // + inheritance diagram
1728 // + list of direct super classes
1729 // + list of direct sub classes
1730 // + list of inner classes
1731 // + collaboration diagram
1732 // + list of all members
1733 // + user defined member sections
1734 // + standard member sections
1735 // + detailed member documentation
1736 // - examples using the class
1737
1738 if (cd->isReference()) return; // skip external references.
1739 if (cd->isAnonymous()) return; // skip anonymous compounds.
1740 if (cd->isImplicitTemplateInstance()) return; // skip generated template instances.
1741
1742 m_output.openHash()
1743 .addFieldQuotedString("name", cd->name());
1744 /* DGA: fix # #7547 Perlmod does not generate "kind" information to discriminate struct/union */
1745 m_output.addFieldQuotedString("kind", cd->compoundTypeString());
1746
1747 if (!cd->baseClasses().empty())
1748 {
1749 m_output.openList("base");
1750 for (const auto &bcd : cd->baseClasses())
1751 {
1752 m_output.openHash()
1753 .addFieldQuotedString("name", bcd.classDef->displayName())
1754 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1755 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1756 .closeHash();
1757 }
1758 m_output.closeList();
1759 }
1760
1761 if (!cd->subClasses().empty())
1762 {
1763 m_output.openList("derived");
1764 for (const auto &bcd : cd->subClasses())
1765 {
1766 m_output.openHash()
1767 .addFieldQuotedString("name", bcd.classDef->displayName())
1768 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1769 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1770 .closeHash();
1771 }
1772 m_output.closeList();
1773 }
1774
1775 {
1776 m_output.openList("inner");
1777 for (const auto &icd : cd->getClasses())
1778 m_output.openHash()
1779 .addFieldQuotedString("name", icd->name())
1780 .closeHash();
1781 m_output.closeList();
1782 }
1783
1785
1789
1790 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubTypes()),"public_typedefs");
1791 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubMethods()),"public_methods");
1792 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubAttribs()),"public_members");
1793 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubSlots()),"public_slots");
1794 generatePerlModSection(cd,cd->getMemberList(MemberListType::Signals()),"signals");
1795 generatePerlModSection(cd,cd->getMemberList(MemberListType::DcopMethods()),"dcop_methods");
1796 generatePerlModSection(cd,cd->getMemberList(MemberListType::Properties()),"properties");
1797 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticMethods()),"public_static_methods");
1798 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticAttribs()),"public_static_members");
1799 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProTypes()),"protected_typedefs");
1800 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProMethods()),"protected_methods");
1801 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProAttribs()),"protected_members");
1802 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProSlots()),"protected_slots");
1803 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticMethods()),"protected_static_methods");
1804 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticAttribs()),"protected_static_members");
1805 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriTypes()),"private_typedefs");
1806 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriMethods()),"private_methods");
1807 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriAttribs()),"private_members");
1808 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriSlots()),"private_slots");
1809 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticMethods()),"private_static_methods");
1810 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticAttribs()),"private_static_members");
1811 generatePerlModSection(cd,cd->getMemberList(MemberListType::Friends()),"friend_methods");
1812 generatePerlModSection(cd,cd->getMemberList(MemberListType::Related()),"related_methods");
1813
1814 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->briefDescription());
1815 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->documentation());
1816
1817#if 0
1818 DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
1819 if (!inheritanceGraph.isTrivial())
1820 {
1821 t << " <inheritancegraph>" << endl;
1822 inheritanceGraph.writePerlMod(t);
1823 t << " </inheritancegraph>" << endl;
1824 }
1825 DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
1826 if (!collaborationGraph.isTrivial())
1827 {
1828 t << " <collaborationgraph>" << endl;
1829 collaborationGraph.writePerlMod(t);
1830 t << " </collaborationgraph>" << endl;
1831 }
1832 t << " <location file=\""
1833 << cd->getDefFileName() << "\" line=\""
1834 << cd->getDefLine() << "\"";
1835 if (cd->getStartBodyLine()!=-1)
1836 {
1837 t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1838 << cd->getEndBodyLine() << "\"";
1839 }
1840 t << "/>" << endl;
1841#endif
1842
1843 m_output.closeHash();
1844}
1845
1847{
1848 if (cd->isReference()) return; // skip external references
1849
1850 m_output.openHash()
1851 .addFieldQuotedString("name", cd->name());
1852
1855 m_output.addFieldQuotedString("initializer", cd->initializer());
1856 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->briefDescription());
1857 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->documentation());
1858
1859 m_output.closeHash();
1860}
1861
1863{
1864 // + contained class definitions
1865 // + contained concept definitions
1866 // + member groups
1867 // + normal members
1868 // + brief desc
1869 // + detailed desc
1870 // + location (file_id, line, column)
1871 // - exports
1872 // + used files
1873
1874 if (mod->isReference()) return; // skip external references
1875
1876 m_output.openHash()
1877 .addFieldQuotedString("name", mod->name());
1878
1880
1881 if (!mod->getClasses().empty())
1882 {
1883 m_output.openList("classes");
1884 for (const auto &cd : mod->getClasses())
1885 m_output.openHash()
1886 .addFieldQuotedString("name", cd->name())
1887 .closeHash();
1888 m_output.closeList();
1889 }
1890
1891 if (!mod->getConcepts().empty())
1892 {
1893 m_output.openList("concepts");
1894 for (const auto &cd : mod->getConcepts())
1895 m_output.openHash()
1896 .addFieldQuotedString("name", cd->name())
1897 .closeHash();
1898 m_output.closeList();
1899 }
1900
1901 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1902 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecEnumMembers()),"enums");
1903 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecFuncMembers()),"functions");
1904 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecVarMembers()),"variables");
1905
1906 addPerlModDocBlock(m_output,"brief",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->briefDescription());
1907 addPerlModDocBlock(m_output,"detailed",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->documentation());
1908
1909 if (!mod->getUsedFiles().empty())
1910 {
1911 m_output.openList("files");
1912 for (const auto &fd : mod->getUsedFiles())
1913 m_output.openHash()
1914 .addFieldQuotedString("name", fd->name())
1915 .closeHash();
1916 m_output.closeList();
1917 }
1918
1919 m_output.closeHash();
1920}
1921
1923{
1924 // + contained class definitions
1925 // + contained namespace definitions
1926 // + member groups
1927 // + normal members
1928 // + brief desc
1929 // + detailed desc
1930 // + location
1931 // - files containing (parts of) the namespace definition
1932
1933 if (nd->isReference()) return; // skip external references
1934
1935 m_output.openHash()
1936 .addFieldQuotedString("name", nd->name());
1937
1938 if (!nd->getClasses().empty())
1939 {
1940 m_output.openList("classes");
1941 for (const auto &cd : nd->getClasses())
1942 m_output.openHash()
1943 .addFieldQuotedString("name", cd->name())
1944 .closeHash();
1945 m_output.closeList();
1946 }
1947
1948 if (!nd->getNamespaces().empty())
1949 {
1950 m_output.openList("namespaces");
1951 for (const auto &ind : nd->getNamespaces())
1952 m_output.openHash()
1953 .addFieldQuotedString("name", ind->name())
1954 .closeHash();
1955 m_output.closeList();
1956 }
1957
1959
1960 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecDefineMembers()),"defines");
1961 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
1962 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1963 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecEnumMembers()),"enums");
1964 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecFuncMembers()),"functions");
1965 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecVarMembers()),"variables");
1966
1967 addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->briefDescription());
1968 addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->documentation());
1969
1970 m_output.closeHash();
1971}
1972
1974{
1975 // + includes files
1976 // + includedby files
1977 // - include graph
1978 // - included by graph
1979 // - contained class definitions
1980 // - contained namespace definitions
1981 // - member groups
1982 // + normal members
1983 // + brief desc
1984 // + detailed desc
1985 // - source code
1986 // - location
1987 // - number of lines
1988
1989 if (fd->isReference()) return;
1990
1991 m_output.openHash()
1992 .addFieldQuotedString("name", fd->name());
1993
1994 m_output.openList("includes");
1995 for (const auto &inc: fd->includeFileList())
1996 {
1997 m_output.openHash()
1998 .addFieldQuotedString("name", inc.includeName);
1999 if (inc.fileDef && !inc.fileDef->isReference())
2000 {
2001 m_output.addFieldQuotedString("ref", inc.fileDef->getOutputFileBase());
2002 }
2003 m_output.closeHash();
2004 }
2005 m_output.closeList();
2006
2007 m_output.openList("included_by");
2008 for (const auto &inc : fd->includedByFileList())
2009 {
2010 m_output.openHash()
2011 .addFieldQuotedString("name", inc.includeName);
2012 if (inc.fileDef && !inc.fileDef->isReference())
2013 {
2014 m_output.addFieldQuotedString("ref", inc.fileDef->getOutputFileBase());
2015 }
2016 m_output.closeHash();
2017 }
2018 m_output.closeList();
2019
2021
2022 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2023 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2024 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2025 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2026 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2027 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecVarMembers()),"variables");
2028
2029 addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->briefDescription());
2030 addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->documentation());
2031
2032 m_output.closeHash();
2033}
2034
2036{
2037 // + members
2038 // + member groups
2039 // + files
2040 // + classes
2041 // + namespaces
2042 // - packages
2043 // + pages
2044 // + child groups
2045 // - examples
2046 // + brief description
2047 // + detailed description
2048
2049 if (gd->isReference()) return; // skip external references
2050
2051 m_output.openHash()
2052 .addFieldQuotedString("name", gd->name())
2053 .addFieldQuotedString("title", gd->groupTitle());
2054
2055 if (!gd->getFiles().empty())
2056 {
2057 m_output.openList("files");
2058 for (const auto &fd : gd->getFiles())
2059 m_output.openHash()
2060 .addFieldQuotedString("name", fd->name())
2061 .closeHash();
2062 m_output.closeList();
2063 }
2064
2065 if (!gd->getClasses().empty())
2066 {
2067 m_output.openList("classes");
2068 for (const auto &cd : gd->getClasses())
2069 m_output.openHash()
2070 .addFieldQuotedString("name", cd->name())
2071 .closeHash();
2072 m_output.closeList();
2073 }
2074
2075 if (!gd->getConcepts().empty())
2076 {
2077 m_output.openList("concepts");
2078 for (const auto &cd : gd->getConcepts())
2079 m_output.openHash()
2080 .addFieldQuotedString("name", cd->name())
2081 .closeHash();
2082 m_output.closeList();
2083 }
2084
2085 if (!gd->getModules().empty())
2086 {
2087 m_output.openList("modules");
2088 for (const auto &mod : gd->getModules())
2089 m_output.openHash()
2090 .addFieldQuotedString("name", mod->name())
2091 .closeHash();
2092 m_output.closeList();
2093 }
2094
2095 if (!gd->getNamespaces().empty())
2096 {
2097 m_output.openList("namespaces");
2098 for (const auto &nd : gd->getNamespaces())
2099 m_output.openHash()
2100 .addFieldQuotedString("name", nd->name())
2101 .closeHash();
2102 m_output.closeList();
2103 }
2104
2105 if (!gd->getPages().empty())
2106 {
2107 m_output.openList("pages");
2108 for (const auto &pd : gd->getPages())
2109 m_output.openHash()
2110 .addFieldQuotedString("title", pd->title())
2111 .closeHash();
2112 m_output.closeList();
2113 }
2114
2115 if (!gd->getSubGroups().empty())
2116 {
2117 m_output.openList("groups");
2118 for (const auto &sgd : gd->getSubGroups())
2119 m_output.openHash()
2120 .addFieldQuotedString("title", sgd->groupTitle())
2121 .closeHash();
2122 m_output.closeList();
2123 }
2124
2126
2127 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2128 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2129 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2130 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2131 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2132 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecVarMembers()),"variables");
2133
2134 addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->briefDescription());
2135 addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->documentation());
2136
2137 m_output.closeHash();
2138}
2139
2141{
2142 // + name
2143 // + title
2144 // + documentation
2145
2146 if (pd->isReference()) return;
2147
2148 m_output.openHash()
2149 .addFieldQuotedString("name", pd->name());
2150
2151 const SectionInfo *si = SectionManager::instance().find(pd->name());
2152 if (si)
2153 m_output.addFieldQuotedString("title4", filterTitle(si->title()));
2154
2155 addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),nullptr,nullptr,pd->documentation());
2156 m_output.closeHash();
2157}
2158
2160{
2161 std::ofstream outputFileStream;
2162 if (!createOutputFile(outputFileStream, pathDoxyDocsPM))
2163 return false;
2164
2165 PerlModOutputStream outputStream(outputFileStream);
2166 m_output.setPerlModOutputStream(&outputStream);
2167 m_output.add("$doxydocs=").openHash();
2168
2169 m_output.openList("classes");
2170 for (const auto &cd : *Doxygen::classLinkedMap)
2171 generatePerlModForClass(cd.get());
2172 m_output.closeList();
2173
2174 m_output.openList("concepts");
2175 for (const auto &cd : *Doxygen::conceptLinkedMap)
2176 generatePerlModForConcept(cd.get());
2177 m_output.closeList();
2178
2179 m_output.openList("modules");
2180 for (const auto &mod : ModuleManager::instance().modules())
2181 generatePerlModForModule(mod.get());
2182 m_output.closeList();
2183
2184 m_output.openList("namespaces");
2185 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2187 m_output.closeList();
2188
2189 m_output.openList("files");
2190 for (const auto &fn : *Doxygen::inputNameLinkedMap)
2191 {
2192 for (const auto &fd : *fn)
2193 {
2194 generatePerlModForFile(fd.get());
2195 }
2196 }
2197 m_output.closeList();
2198
2199 m_output.openList("groups");
2200 for (const auto &gd : *Doxygen::groupLinkedMap)
2201 {
2202 generatePerlModForGroup(gd.get());
2203 }
2204 m_output.closeList();
2205
2206 m_output.openList("pages");
2207 for (const auto &pd : *Doxygen::pageLinkedMap)
2208 {
2209 generatePerlModForPage(pd.get());
2210 }
2212 {
2214 }
2215 m_output.closeList();
2216
2217 m_output.closeHash().add(";\n1;\n");
2218 m_output.reset();
2219 return true;
2220}
2221
2222bool PerlModGenerator::createOutputFile(std::ofstream &f, const QCString &s)
2223{
2225 if (!f.is_open())
2226 {
2227 err("Cannot open file {} for writing!\n", s);
2228 return false;
2229 }
2230 return true;
2231}
2232
2234{
2235 std::string outputDirectory = Config_getString(OUTPUT_DIRECTORY).str();
2236 perlModDir.setPath(outputDirectory+"/perlmod");
2237 if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
2238 {
2239 err("Could not create perlmod directory in {}\n",outputDirectory);
2240 return false;
2241 }
2242 return true;
2243}
2244
2246{
2247 std::ofstream doxyModelPMStream;
2248 if (!createOutputFile(doxyModelPMStream, pathDoxyStructurePM))
2249 return false;
2250
2251 doxyModelPMStream <<
2252 "sub memberlist($) {\n"
2253 " my $prefix = $_[0];\n"
2254 " return\n"
2255 "\t[ \"hash\", $prefix . \"s\",\n"
2256 "\t {\n"
2257 "\t members =>\n"
2258 "\t [ \"list\", $prefix . \"List\",\n"
2259 "\t\t[ \"hash\", $prefix,\n"
2260 "\t\t {\n"
2261 "\t\t kind => [ \"string\", $prefix . \"Kind\" ],\n"
2262 "\t\t name => [ \"string\", $prefix . \"Name\" ],\n"
2263 "\t\t static => [ \"string\", $prefix . \"Static\" ],\n"
2264 "\t\t virtualness => [ \"string\", $prefix . \"Virtualness\" ],\n"
2265 "\t\t protection => [ \"string\", $prefix . \"Protection\" ],\n"
2266 "\t\t type => [ \"string\", $prefix . \"Type\" ],\n"
2267 "\t\t parameters =>\n"
2268 "\t\t [ \"list\", $prefix . \"Params\",\n"
2269 "\t\t\t[ \"hash\", $prefix . \"Param\",\n"
2270 "\t\t\t {\n"
2271 "\t\t\t declaration_name => [ \"string\", $prefix . \"ParamName\" ],\n"
2272 "\t\t\t type => [ \"string\", $prefix . \"ParamType\" ],\n"
2273 "\t\t\t },\n"
2274 "\t\t\t],\n"
2275 "\t\t ],\n"
2276 "\t\t detailed =>\n"
2277 "\t\t [ \"hash\", $prefix . \"Detailed\",\n"
2278 "\t\t\t{\n"
2279 "\t\t\t doc => [ \"doc\", $prefix . \"DetailedDoc\" ],\n"
2280 "\t\t\t return => [ \"doc\", $prefix . \"Return\" ],\n"
2281 "\t\t\t see => [ \"doc\", $prefix . \"See\" ],\n"
2282 "\t\t\t params =>\n"
2283 "\t\t\t [ \"list\", $prefix . \"PDBlocks\",\n"
2284 "\t\t\t [ \"hash\", $prefix . \"PDBlock\",\n"
2285 "\t\t\t\t{\n"
2286 "\t\t\t\t parameters =>\n"
2287 "\t\t\t\t [ \"list\", $prefix . \"PDParams\",\n"
2288 "\t\t\t\t [ \"hash\", $prefix . \"PDParam\",\n"
2289 "\t\t\t\t\t{\n"
2290 "\t\t\t\t\t name => [ \"string\", $prefix . \"PDParamName\" ],\n"
2291 "\t\t\t\t\t},\n"
2292 "\t\t\t\t ],\n"
2293 "\t\t\t\t ],\n"
2294 "\t\t\t\t doc => [ \"doc\", $prefix . \"PDDoc\" ],\n"
2295 "\t\t\t\t},\n"
2296 "\t\t\t ],\n"
2297 "\t\t\t ],\n"
2298 "\t\t\t},\n"
2299 "\t\t ],\n"
2300 "\t\t },\n"
2301 "\t\t],\n"
2302 "\t ],\n"
2303 "\t },\n"
2304 "\t];\n"
2305 "}\n"
2306 "\n"
2307 "$doxystructure =\n"
2308 " [ \"hash\", \"Root\",\n"
2309 " {\n"
2310 "\tfiles =>\n"
2311 "\t [ \"list\", \"Files\",\n"
2312 "\t [ \"hash\", \"File\",\n"
2313 "\t {\n"
2314 "\t\tname => [ \"string\", \"FileName\" ],\n"
2315 "\t\ttypedefs => memberlist(\"FileTypedef\"),\n"
2316 "\t\tvariables => memberlist(\"FileVariable\"),\n"
2317 "\t\tfunctions => memberlist(\"FileFunction\"),\n"
2318 "\t\tdetailed =>\n"
2319 "\t\t [ \"hash\", \"FileDetailed\",\n"
2320 "\t\t {\n"
2321 "\t\t doc => [ \"doc\", \"FileDetailedDoc\" ],\n"
2322 "\t\t },\n"
2323 "\t\t ],\n"
2324 "\t },\n"
2325 "\t ],\n"
2326 "\t ],\n"
2327 "\tpages =>\n"
2328 "\t [ \"list\", \"Pages\",\n"
2329 "\t [ \"hash\", \"Page\",\n"
2330 "\t {\n"
2331 "\t\tname => [ \"string\", \"PageName\" ],\n"
2332 "\t\tdetailed =>\n"
2333 "\t\t [ \"hash\", \"PageDetailed\",\n"
2334 "\t\t {\n"
2335 "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n"
2336 "\t\t },\n"
2337 "\t\t ],\n"
2338 "\t },\n"
2339 "\t ],\n"
2340 "\t ],\n"
2341 "\tclasses =>\n"
2342 "\t [ \"list\", \"Classes\",\n"
2343 "\t [ \"hash\", \"Class\",\n"
2344 "\t {\n"
2345 "\t\tname => [ \"string\", \"ClassName\" ],\n"
2346 "\t\tpublic_typedefs => memberlist(\"ClassPublicTypedef\"),\n"
2347 "\t\tpublic_methods => memberlist(\"ClassPublicMethod\"),\n"
2348 "\t\tpublic_members => memberlist(\"ClassPublicMember\"),\n"
2349 "\t\tprotected_typedefs => memberlist(\"ClassProtectedTypedef\"),\n"
2350 "\t\tprotected_methods => memberlist(\"ClassProtectedMethod\"),\n"
2351 "\t\tprotected_members => memberlist(\"ClassProtectedMember\"),\n"
2352 "\t\tprivate_typedefs => memberlist(\"ClassPrivateTypedef\"),\n"
2353 "\t\tprivate_methods => memberlist(\"ClassPrivateMethod\"),\n"
2354 "\t\tprivate_members => memberlist(\"ClassPrivateMember\"),\n"
2355 "\t\tdetailed =>\n"
2356 "\t\t [ \"hash\", \"ClassDetailed\",\n"
2357 "\t\t {\n"
2358 "\t\t doc => [ \"doc\", \"ClassDetailedDoc\" ],\n"
2359 "\t\t },\n"
2360 "\t\t ],\n"
2361 "\t },\n"
2362 "\t ],\n"
2363 "\t ],\n"
2364 "\tgroups =>\n"
2365 "\t [ \"list\", \"Groups\",\n"
2366 "\t [ \"hash\", \"Group\",\n"
2367 "\t {\n"
2368 "\t\tname => [ \"string\", \"GroupName\" ],\n"
2369 "\t\ttitle => [ \"string\", \"GroupTitle\" ],\n"
2370 "\t\tfiles =>\n"
2371 "\t\t [ \"list\", \"Files\",\n"
2372 "\t\t [ \"hash\", \"File\",\n"
2373 "\t\t {\n"
2374 "\t\t name => [ \"string\", \"Filename\" ]\n"
2375 "\t\t }\n"
2376 "\t\t ],\n"
2377 "\t\t ],\n"
2378 "\t\tclasses =>\n"
2379 "\t\t [ \"list\", \"Classes\",\n"
2380 "\t\t [ \"hash\", \"Class\",\n"
2381 "\t\t {\n"
2382 "\t\t name => [ \"string\", \"Classname\" ]\n"
2383 "\t\t }\n"
2384 "\t\t ],\n"
2385 "\t\t ],\n"
2386 "\t\tnamespaces =>\n"
2387 "\t\t [ \"list\", \"Namespaces\",\n"
2388 "\t\t [ \"hash\", \"Namespace\",\n"
2389 "\t\t {\n"
2390 "\t\t name => [ \"string\", \"NamespaceName\" ]\n"
2391 "\t\t }\n"
2392 "\t\t ],\n"
2393 "\t\t ],\n"
2394 "\t\tpages =>\n"
2395 "\t\t [ \"list\", \"Pages\",\n"
2396 "\t\t [ \"hash\", \"Page\","
2397 "\t\t {\n"
2398 "\t\t title => [ \"string\", \"PageName\" ]\n"
2399 "\t\t }\n"
2400 "\t\t ],\n"
2401 "\t\t ],\n"
2402 "\t\tgroups =>\n"
2403 "\t\t [ \"list\", \"Groups\",\n"
2404 "\t\t [ \"hash\", \"Group\",\n"
2405 "\t\t {\n"
2406 "\t\t title => [ \"string\", \"GroupName\" ]\n"
2407 "\t\t }\n"
2408 "\t\t ],\n"
2409 "\t\t ],\n"
2410 "\t\tfunctions => memberlist(\"GroupFunction\"),\n"
2411 "\t\tdetailed =>\n"
2412 "\t\t [ \"hash\", \"GroupDetailed\",\n"
2413 "\t\t {\n"
2414 "\t\t doc => [ \"doc\", \"GroupDetailedDoc\" ],\n"
2415 "\t\t },\n"
2416 "\t\t ],\n"
2417 "\t }\n"
2418 "\t ],\n"
2419 "\t ],\n"
2420 " },\n"
2421 " ];\n"
2422 "\n"
2423 "1;\n";
2424
2425 return true;
2426}
2427
2429{
2430 std::ofstream doxyRulesStream;
2431 if (!createOutputFile(doxyRulesStream, pathDoxyRules))
2432 return false;
2433
2434 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2435 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2436
2437 doxyRulesStream <<
2438 prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
2439 prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
2440 prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" <<
2441 prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" <<
2442 prefix << "DOXYRULES = " << pathDoxyRules << "\n";
2443 if (perlmodLatex)
2444 doxyRulesStream <<
2445 prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" <<
2446 prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" <<
2447 prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" <<
2448 prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" <<
2449 prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" <<
2450 prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" <<
2451 prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" <<
2452 prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
2453
2454 doxyRulesStream <<
2455 "\n"
2456 ".PHONY: clean-perlmod\n"
2457 "clean-perlmod::\n"
2458 "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2459 "\t$(" << prefix << "DOXYDOCS_PM)";
2460 if (perlmodLatex)
2461 doxyRulesStream <<
2462 " \\\n"
2463 "\t$(" << prefix << "DOXYLATEX_PL) \\\n"
2464 "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2465 "\t$(" << prefix << "DOXYDOCS_TEX) \\\n"
2466 "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2467 "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2468 "\t$(" << prefix << "DOXYLATEX_TEX) \\\n"
2469 "\t$(" << prefix << "DOXYLATEX_PDF) \\\n"
2470 "\t$(" << prefix << "DOXYLATEX_DVI) \\\n"
2471 "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)";
2472 doxyRulesStream << "\n\n";
2473
2474 doxyRulesStream <<
2475 "$(" << prefix << "DOXYRULES) \\\n"
2476 "$(" << prefix << "DOXYMAKEFILE) \\\n"
2477 "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2478 "$(" << prefix << "DOXYDOCS_PM)";
2479 if (perlmodLatex) {
2480 doxyRulesStream <<
2481 " \\\n"
2482 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2483 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2484 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2485 "$(" << prefix << "DOXYLATEX_TEX)";
2486 }
2487 doxyRulesStream <<
2488 ": \\\n"
2489 "\t$(" << prefix << "DOXYFILE)\n"
2490 "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
2491
2492 if (perlmodLatex) {
2493 doxyRulesStream <<
2494 "\n"
2495 "$(" << prefix << "DOXYDOCS_TEX): \\\n"
2496 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2497 "$(" << prefix << "DOXYDOCS_PM)\n"
2498 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2499 "\n"
2500 "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n"
2501 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2502 "$(" << prefix << "DOXYSTRUCTURE_PM)\n"
2503 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2504 "\n"
2505 "$(" << prefix << "DOXYLATEX_PDF) \\\n"
2506 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2507 "$(" << prefix << "DOXYLATEX_TEX) \\\n"
2508 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2509 "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2510 "$(" << prefix << "DOXYDOCS_TEX)\n"
2511 "\n"
2512 "$(" << prefix << "DOXYLATEX_PDF): \\\n"
2513 "$(" << prefix << "DOXYLATEX_TEX)\n"
2514 "\tpdflatex -interaction=nonstopmode \"$<\"\n"
2515 "\n"
2516 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2517 "$(" << prefix << "DOXYLATEX_TEX)\n"
2518 "\tlatex -interaction=nonstopmode \"$<\"\n";
2519 }
2520
2521 return true;
2522}
2523
2525{
2526 std::ofstream makefileStream;
2527 if (!createOutputFile(makefileStream, pathMakefile))
2528 return false;
2529
2530 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2531 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2532
2533 makefileStream <<
2534 ".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n"
2535 "default: " << (perlmodLatex ? "pdf" : "clean") << "\n"
2536 "\n"
2537 "include " << pathDoxyRules << "\n"
2538 "\n"
2539 "clean: clean-perlmod\n";
2540
2541 if (perlmodLatex) {
2542 makefileStream <<
2543 "pdf: $(" << prefix << "DOXYLATEX_PDF)\n"
2544 "dvi: $(" << prefix << "DOXYLATEX_DVI)\n";
2545 }
2546
2547 return true;
2548}
2549
2551{
2552 std::ofstream doxyLatexStructurePLStream;
2553 if (!createOutputFile(doxyLatexStructurePLStream, pathDoxyLatexStructurePL))
2554 return false;
2555
2556 doxyLatexStructurePLStream <<
2557 "use DoxyStructure;\n"
2558 "\n"
2559 "sub process($) {\n"
2560 "\tmy $node = $_[0];\n"
2561 "\tmy ($type, $name) = @$node[0, 1];\n"
2562 "\tmy $command;\n"
2563 "\tif ($type eq \"string\") { $command = \"String\" }\n"
2564 "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
2565 "\telsif ($type eq \"hash\") {\n"
2566 "\t\t$command = \"Hash\";\n"
2567 "\t\tfor my $subnode (values %{$$node[2]}) {\n"
2568 "\t\t\tprocess($subnode);\n"
2569 "\t\t}\n"
2570 "\t}\n"
2571 "\telsif ($type eq \"list\") {\n"
2572 "\t\t$command = \"List\";\n"
2573 "\t\tprocess($$node[2]);\n"
2574 "\t}\n"
2575 "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
2576 "}\n"
2577 "\n"
2578 "process($doxystructure);\n";
2579
2580 return true;
2581}
2582
2584{
2585 std::ofstream doxyLatexPLStream;
2586 if (!createOutputFile(doxyLatexPLStream, pathDoxyLatexPL))
2587 return false;
2588
2589 doxyLatexPLStream <<
2590 "use DoxyStructure;\n"
2591 "use DoxyDocs;\n"
2592 "\n"
2593 "sub latex_quote($) {\n"
2594 "\tmy $text = $_[0];\n"
2595 "\t$text =~ s/\\\\/\\\\textbackslash /g;\n"
2596 "\t$text =~ s/\\|/\\\\textbar /g;\n"
2597 "\t$text =~ s/</\\\\textless /g;\n"
2598 "\t$text =~ s/>/\\\\textgreater /g;\n"
2599 "\t$text =~ s/~/\\\\textasciitilde /g;\n"
2600 "\t$text =~ s/\\^/\\\\textasciicircum /g;\n"
2601 "\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n"
2602 "\tprint $text;\n"
2603 "}\n"
2604 "\n"
2605 "sub generate_doc($) {\n"
2606 "\tmy $doc = $_[0];\n"
2607 "\tfor my $item (@$doc) {\n"
2608 "\t\tmy $type = $$item{type};\n"
2609 "\t\tif ($type eq \"text\") {\n"
2610 "\t\t\tlatex_quote($$item{content});\n"
2611 "\t\t} elsif ($type eq \"parbreak\") {\n"
2612 "\t\t\tprint \"\\n\\n\";\n"
2613 "\t\t} elsif ($type eq \"style\") {\n"
2614 "\t\t\tmy $style = $$item{style};\n"
2615 "\t\t\tif ($$item{enable} eq \"yes\") {\n"
2616 "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n"
2617 "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n"
2618 "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n"
2619 "\t\t\t} else {\n"
2620 "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n"
2621 "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n"
2622 "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n"
2623 "\t\t\t}\n"
2624 "\t\t\tprint '{}';\n"
2625 "\t\t} elsif ($type eq \"symbol\") {\n"
2626 "\t\t\tmy $symbol = $$item{symbol};\n"
2627 "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n"
2628 "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n"
2629 "\t\t\tprint '{}';\n"
2630 "\t\t} elsif ($type eq \"accent\") {\n"
2631 "\t\t\tmy ($accent) = $$item{accent};\n"
2632 "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n"
2633 "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n"
2634 "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n"
2635 "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n"
2636 "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n"
2637 "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n"
2638 "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n"
2639 "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n"
2640 "\t\t} elsif ($type eq \"list\") {\n"
2641 "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n"
2642 "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n"
2643 "\t\t \tfor my $subitem (@{$$item{content}}) {\n"
2644 "\t\t\t\tprint \"\\n\\\\item \";\n"
2645 "\t\t\t\tgenerate_doc($subitem);\n"
2646 "\t\t \t}\n"
2647 "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n"
2648 "\t\t} elsif ($type eq \"url\") {\n"
2649 "\t\t\tlatex_quote($$item{content});\n"
2650 "\t\t}\n"
2651 "\t}\n"
2652 "}\n"
2653 "\n"
2654 "sub generate($$) {\n"
2655 "\tmy ($item, $node) = @_;\n"
2656 "\tmy ($type, $name) = @$node[0, 1];\n"
2657 "\tif ($type eq \"string\") {\n"
2658 "\t\tprint \"\\\\\" . $name . \"{\";\n"
2659 "\t\tlatex_quote($item);\n"
2660 "\t\tprint \"}\";\n"
2661 "\t} elsif ($type eq \"doc\") {\n"
2662 "\t\tif (@$item) {\n"
2663 "\t\t\tprint \"\\\\\" . $name . \"{\";\n"
2664 "\t\t\tgenerate_doc($item);\n"
2665 "\t\t\tprint \"}%\\n\";\n"
2666 "\t\t} else {\n"
2667 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2668 "\t\t}\n"
2669 "\t} elsif ($type eq \"hash\") {\n"
2670 "\t\tmy ($key, $value);\n"
2671 "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n"
2672 "\t\t\tmy $subname = $$subnode[1];\n"
2673 "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n"
2674 "\t\t\tif ($$item{$key}) {\n"
2675 "\t\t\t\tgenerate($$item{$key}, $subnode);\n"
2676 "\t\t\t} else {\n"
2677 "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
2678 "\t\t\t}\n"
2679 "\t\t\tprint \"}%\\n\";\n"
2680 "\t\t}\n"
2681 "\t\tprint \"\\\\\" . $name . \"%\\n\";\n"
2682 "\t} elsif ($type eq \"list\") {\n"
2683 "\t\tmy $index = 0;\n"
2684 "\t\tif (@$item) {\n"
2685 "\t\t\tprint \"\\\\\" . $name . \"{%\\n\";\n"
2686 "\t\t\tfor my $subitem (@$item) {\n"
2687 "\t\t\t\tif ($index) {\n"
2688 "\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n"
2689 "\t\t\t\t}\n"
2690 "\t\t\t\tgenerate($subitem, $$node[2]);\n"
2691 "\t\t\t\t$index++;\n"
2692 "\t\t\t}\n"
2693 "\t\t\tprint \"}%\\n\";\n"
2694 "\t\t} else {\n"
2695 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2696 "\t\t}\n"
2697 "\t}\n"
2698 "}\n"
2699 "\n"
2700 "generate($doxydocs, $doxystructure);\n";
2701
2702 return true;
2703}
2704
2706{
2707 std::ofstream doxyFormatTexStream;
2708 if (!createOutputFile(doxyFormatTexStream, pathDoxyFormatTex))
2709 return false;
2710
2711 doxyFormatTexStream <<
2712 "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
2713 "\\Defcs{Empty}{}\n"
2714 "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n"
2715 "\n"
2716 "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n"
2717 "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n"
2718 "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n"
2719 "\\def\\HashNode#1{\\Defcs{#1}{}}\n"
2720 "\n"
2721 "\\input{" << pathDoxyStructureTex << "}\n"
2722 "\n"
2723 "\\newbox\\BoxA\n"
2724 "\\dimendef\\DimenA=151\\relax\n"
2725 "\\dimendef\\DimenB=152\\relax\n"
2726 "\\countdef\\ZoneDepth=151\\relax\n"
2727 "\n"
2728 "\\def\\Cs#1{\\csname#1\\endcsname}\n"
2729 "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n"
2730 "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n"
2731 "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n"
2732 "\n"
2733 "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n"
2734 "\\raggedright#1\\vskip 0.5mm\\relax} }}\n"
2735 "\n"
2736 "\\def\\Zone#1#2#3{%\n"
2737 "\\Defcs{Test#1}{#2}%\n"
2738 "\\Defcs{Emit#1}{#3}%\n"
2739 "\\Defcs{#1}{%\n"
2740 "\\advance\\ZoneDepth1\\relax\n"
2741 "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n"
2742 "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n"
2743 "\\Cs{Test#1}\n"
2744 "\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n"
2745 "\\advance\\ZoneDepth-1\\relax\n"
2746 "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2747 "\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n"
2748 "\\advance\\ZoneDepth1\\relax\n"
2749 "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n"
2750 "\\Cs{Emit#1}\n"
2751 "\\advance\\ZoneDepth-1\\relax\\fi\n"
2752 "\\advance\\ZoneDepth1\\relax\\fi\n"
2753 "\\advance\\ZoneDepth-1\\relax}}\n"
2754 "\n"
2755 "\\def\\Member#1#2{%\n"
2756 "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n"
2757 "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n"
2758 "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n"
2759 "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2760 "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n"
2761 "\n"
2762 "\\def\\TypedefMemberList#1#2{%\n"
2763 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2764 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2765 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2766 "%\n"
2767 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2768 "\\Member{#1}{\\Frame{typedef \\Cs{field#1Type} \\Cs{field#1Name}}%\n"
2769 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2770 "\n"
2771 "\\def\\VariableMemberList#1#2{%\n"
2772 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2773 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2774 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2775 "%\n"
2776 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2777 "\\Member{#1}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}}%\n"
2778 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2779 "\n"
2780 "\\def\\FunctionMemberList#1#2{%\n"
2781 "\\Defcs{#1PDParamName}##1{\\textit{##1}}%\n"
2782 "\\Defcs{#1PDParam}{\\Cs{field#1PDParamName}}%\n"
2783 "\\Defcs{#1PDParamsSep}{, }%\n"
2784 "\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n"
2785 "%\n"
2786 "\\Defcs{#1PDBlocks}##1{%\n"
2787 "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n"
2788 "\\DimenA0pt\\relax\n"
2789 "\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n"
2790 "\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n"
2791 "##1%\n"
2792 "\\advance\\DimenA3mm\\relax\n"
2793 "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n"
2794 "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n"
2795 "\\Cs{field#1PDParams}}\\hfill\n"
2796 "\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n"
2797 "##1}\n"
2798 "\n"
2799 "\\Defcs{#1ParamName}##1{\\textit{##1}}\n"
2800 "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n"
2801 "\\Defcs{#1ParamsSep}{, }\n"
2802 "\n"
2803 "\\Defcs{#1Name}##1{\\textbf{##1}}\n"
2804 "\\Defcs{#1See}##1{\\See{##1}}\n"
2805 "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n"
2806 "\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n"
2807 "%\n"
2808 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2809 "\\Member{#1}{%\n"
2810 "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n"
2811 "\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n"
2812 "\n"
2813 "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n"
2814 "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n"
2815 "\n"
2816 "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n"
2817 "\n"
2818 "\\def\\ClassSubzones{%\n"
2819 "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n"
2820 "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n"
2821 "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n"
2822 "\n"
2823 "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n"
2824 "\n"
2825 "\\TypedefMemberList{FileTypedef}{Typedefs}\n"
2826 "\\VariableMemberList{FileVariable}{Variables}\n"
2827 "\\FunctionMemberList{FileFunction}{Functions}\n"
2828 "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n"
2829 "\n"
2830 "\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n"
2831 "\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n"
2832 "\\TypedefMemberList{ClassPrivateTypedef}{Private Typedefs}\n"
2833 "\\VariableMemberList{ClassPublicMember}{Public Members}\n"
2834 "\\VariableMemberList{ClassProtectedMember}{Protected Members}\n"
2835 "\\VariableMemberList{ClassPrivateMember}{Private Members}\n"
2836 "\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n"
2837 "\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n"
2838 "\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n"
2839 "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n"
2840 "\n"
2841 "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n"
2842 "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n"
2843 "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n"
2844 "\n"
2845 "\\newlength{\\oldparskip}\n"
2846 "\\newlength{\\oldparindent}\n"
2847 "\\newlength{\\oldfboxrule}\n"
2848 "\n"
2849 "\\ZoneDepth0\\relax\n"
2850 "\\Letcs{Mode0}1\\relax\n"
2851 "\n"
2852 "\\def\\EmitDoxyDocs{%\n"
2853 "\\setlength{\\oldparskip}{\\parskip}\n"
2854 "\\setlength{\\oldparindent}{\\parindent}\n"
2855 "\\setlength{\\oldfboxrule}{\\fboxrule}\n"
2856 "\\setlength{\\parskip}{0cm}\n"
2857 "\\setlength{\\parindent}{0cm}\n"
2858 "\\setlength{\\fboxrule}{1pt}\n"
2859 "\\AllPages\\AllFiles\\AllClasses\n"
2860 "\\setlength{\\parskip}{\\oldparskip}\n"
2861 "\\setlength{\\parindent}{\\oldparindent}\n"
2862 "\\setlength{\\fboxrule}{\\oldfboxrule}}\n";
2863
2864 return true;
2865}
2866
2868{
2869 std::ofstream doxyLatexTexStream;
2870 if (!createOutputFile(doxyLatexTexStream, pathDoxyLatexTex))
2871 return false;
2872
2873 doxyLatexTexStream <<
2874 "\\documentclass[a4paper,12pt]{article}\n"
2875 "\\usepackage[latin1]{inputenc}\n"
2876 "\\usepackage[none]{hyphenat}\n"
2877 "\\usepackage[T1]{fontenc}\n"
2878 "\\usepackage{hyperref}\n"
2879 "\\usepackage{times}\n"
2880 "\n"
2881 "\\input{doxyformat}\n"
2882 "\n"
2883 "\\begin{document}\n"
2884 "\\input{" << pathDoxyDocsTex << "}\n"
2885 "\\sloppy\n"
2886 "\\EmitDoxyDocs\n"
2887 "\\end{document}\n";
2888
2889 return true;
2890}
2891
2893{
2894 // + classes
2895 // + namespaces
2896 // + files
2897 // - packages
2898 // + groups
2899 // + related pages
2900 // - examples
2901
2902 Dir perlModDir;
2903 if (!createOutputDir(perlModDir))
2904 return;
2905
2906 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2907
2908 QCString perlModAbsPath = perlModDir.absPath();
2909 pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
2910 pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
2911 pathMakefile = perlModAbsPath + "/Makefile";
2912 pathDoxyRules = perlModAbsPath + "/doxyrules.make";
2913
2914 if (perlmodLatex) {
2915 pathDoxyStructureTex = perlModAbsPath + "/doxystructure.tex";
2916 pathDoxyFormatTex = perlModAbsPath + "/doxyformat.tex";
2917 pathDoxyLatexTex = perlModAbsPath + "/doxylatex.tex";
2918 pathDoxyLatexDVI = perlModAbsPath + "/doxylatex.dvi";
2919 pathDoxyLatexPDF = perlModAbsPath + "/doxylatex.pdf";
2920 pathDoxyDocsTex = perlModAbsPath + "/doxydocs.tex";
2921 pathDoxyLatexPL = perlModAbsPath + "/doxylatex.pl";
2922 pathDoxyLatexStructurePL = perlModAbsPath + "/doxylatex-structure.pl";
2923 }
2924
2925 if (!(generatePerlModOutput()
2927 && generateMakefile()
2928 && generateDoxyRules()))
2929 return;
2930
2931 if (perlmodLatex) {
2936 return;
2937 }
2938}
2939
2941{
2942 PerlModGenerator pmg(Config_getBool(PERLMOD_PRETTY));
2943 pmg.generate();
2944}
2945
2946// Local Variables:
2947// c-basic-offset: 2
2948// End:
2949
2950/* This elisp function for XEmacs makes Control-Z transform
2951 the text in the region into a valid C string.
2952
2953 (global-set-key '(control z) (lambda () (interactive)
2954 (save-excursion
2955 (if (< (mark) (point)) (exchange-point-and-mark))
2956 (let ((start (point)) (replacers
2957 '(("\\\\" "\\\\\\\\")
2958 ("\"" "\\\\\"")
2959 ("\t" "\\\\t")
2960 ("^.*$" "\"\\&\\\\n\""))))
2961 (while replacers
2962 (while (re-search-forward (caar replacers) (mark) t)
2963 (replace-match (cadar replacers) t))
2964 (goto-char start)
2965 (setq replacers (cdr replacers)))))))
2966*/
constexpr auto prefix
Definition anchor.cpp:44
This class represents an function or template argument list.
Definition arguments.h:65
iterator end()
Definition arguments.h:94
bool hasParameters() const
Definition arguments.h:76
bool constSpecifier() const
Definition arguments.h:111
bool empty() const
Definition arguments.h:99
iterator begin()
Definition arguments.h:93
bool volatileSpecifier() const
Definition arguments.h:112
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual bool isImplicitTemplateInstance() const =0
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual const IncludeInfo * includeInfo() const =0
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual QCString initializer() const =0
virtual ArgumentList getTemplateParameterList() const =0
virtual const IncludeInfo * includeInfo() const =0
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString docFile() const =0
virtual int getEndBodyLine() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool isAnonymous() const =0
virtual QCString documentation() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
Class representing a directory in the file system.
Definition dir.h:75
static std::string currentDirPath()
Definition dir.cpp:340
std::string absPath() const
Definition dir.cpp:363
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:295
void setPath(const std::string &path)
Definition dir.cpp:229
bool exists() const
Definition dir.cpp:257
Node representing an anchor.
Definition docnode.h:228
QCString anchor() const
Definition docnode.h:231
QCString file() const
Definition docnode.h:232
Node representing an auto List.
Definition docnode.h:567
bool isCheckedList() const
Definition docnode.h:578
bool isEnumList() const
Definition docnode.h:576
Node representing an item of a auto list.
Definition docnode.h:591
int itemNumber() const
Definition docnode.h:594
Node representing a citation of some bibliographic reference.
Definition docnode.h:244
QCString text() const
Definition docnode.h:251
Node representing a dia file.
Definition docnode.h:726
QCString file() const
Definition docnode.h:680
Node representing a dot file.
Definition docnode.h:708
Node representing an emoji.
Definition docnode.h:337
int index() const
Definition docnode.h:341
QCString name() const
Definition docnode.h:340
Node representing an item of a cross-referenced list.
Definition docnode.h:525
QCString text() const
Definition docnode.h:529
int id() const
Definition docnode.h:531
Node representing a Hypertext reference.
Definition docnode.h:818
QCString url() const
Definition docnode.h:825
Node representing a horizontal ruler.
Definition docnode.h:215
Node representing an HTML blockquote.
Definition docnode.h:1286
Node representing a HTML table caption.
Definition docnode.h:1223
Node representing a HTML table cell.
Definition docnode.h:1188
bool isHeading() const
Definition docnode.h:1195
Node representing a HTML description data.
Definition docnode.h:1176
Node representing a Html description list.
Definition docnode.h:896
Node representing a Html description item.
Definition docnode.h:883
Node Html details.
Definition docnode.h:852
Node Html heading.
Definition docnode.h:868
int level() const
Definition docnode.h:872
Node representing a Html list.
Definition docnode.h:995
const HtmlAttribList & attribs() const
Definition docnode.h:1001
Type type() const
Definition docnode.h:1000
Node representing a HTML list item.
Definition docnode.h:1160
const HtmlAttribList & attribs() const
Definition docnode.h:1165
Node representing a HTML table row.
Definition docnode.h:1241
Node Html summary.
Definition docnode.h:839
Node representing a HTML table.
Definition docnode.h:1264
size_t numRows() const
Definition docnode.h:1268
const DocNodeVariant * caption() const
Definition docnode.cpp:2044
Node representing an image.
Definition docnode.h:637
QCString name() const
Definition docnode.h:643
QCString height() const
Definition docnode.h:646
Type type() const
Definition docnode.h:642
QCString width() const
Definition docnode.h:645
Node representing a include/dontinclude operator block.
Definition docnode.h:473
Node representing an included text block from file.
Definition docnode.h:431
@ LatexInclude
Definition docnode.h:433
@ SnippetWithLines
Definition docnode.h:434
@ DontIncWithLines
Definition docnode.h:435
@ IncWithLines
Definition docnode.h:434
@ HtmlInclude
Definition docnode.h:433
@ VerbInclude
Definition docnode.h:433
@ DontInclude
Definition docnode.h:433
@ DocbookInclude
Definition docnode.h:435
Type type() const
Definition docnode.h:447
QCString text() const
Definition docnode.h:448
Node representing an entry in the index.
Definition docnode.h:548
Node representing an internal section of documentation.
Definition docnode.h:964
Node representing an internal reference to some item.
Definition docnode.h:802
QCString file() const
Definition docnode.h:806
QCString anchor() const
Definition docnode.h:808
Node representing a line break.
Definition docnode.h:201
Node representing a word that can be linked to something.
Definition docnode.h:164
QCString file() const
Definition docnode.h:170
QCString ref() const
Definition docnode.h:172
QCString word() const
Definition docnode.h:169
QCString anchor() const
Definition docnode.h:173
Node representing a msc file.
Definition docnode.h:717
Class representing the abstract syntax tree of a documentation block.
Definition docnode.h:1461
DocNodeVariant * parent()
Definition docnode.h:89
Node representing an block of paragraphs.
Definition docnode.h:974
Node representing a paragraph in the documentation tree.
Definition docnode.h:1075
Node representing a parameter list.
Definition docnode.h:1120
const DocNodeList & parameters() const
Definition docnode.h:1124
DocParamSect::Direction direction() const
Definition docnode.h:1128
const DocNodeList & paragraphs() const
Definition docnode.h:1126
Node representing a parameter section.
Definition docnode.h:1048
bool hasInOutSpecifier() const
Definition docnode.h:1064
Type type() const
Definition docnode.h:1063
Node representing a uml file.
Definition docnode.h:735
Node representing a reference to some item.
Definition docnode.h:773
QCString targetTitle() const
Definition docnode.h:781
bool hasLinkText() const
Definition docnode.h:783
Root node of documentation tree.
Definition docnode.h:1308
Node representing a reference to a section.
Definition docnode.h:930
QCString file() const
Definition docnode.h:934
QCString anchor() const
Definition docnode.h:935
Node representing a list of section references.
Definition docnode.h:954
Node representing a normal section.
Definition docnode.h:909
int level() const
Definition docnode.h:913
const DocNodeVariant * title() const
Definition docnode.h:914
Node representing a separator.
Definition docnode.h:361
Node representing a simple list.
Definition docnode.h:985
Node representing a simple list item.
Definition docnode.h:1148
const DocNodeVariant * paragraph() const
Definition docnode.h:1152
Node representing a simple section.
Definition docnode.h:1012
Type type() const
Definition docnode.h:1021
const DocNodeVariant * title() const
Definition docnode.h:1028
Node representing a separator between two simple sections of the same type.
Definition docnode.h:1039
Node representing a style change.
Definition docnode.h:264
Style style() const
Definition docnode.h:303
bool enable() const
Definition docnode.h:305
Node representing a special symbol.
Definition docnode.h:324
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:328
Root node of a text fragment.
Definition docnode.h:1299
Node representing a simple section title.
Definition docnode.h:604
Node representing a URL (or email address)
Definition docnode.h:187
QCString url() const
Definition docnode.h:191
Node representing a verbatim, unparsed text fragment.
Definition docnode.h:372
bool hasCaption() const
Definition docnode.h:386
QCString context() const
Definition docnode.h:380
Type type() const
Definition docnode.h:378
QCString text() const
Definition docnode.h:379
@ JavaDocLiteral
Definition docnode.h:374
Node representing a VHDL flow chart.
Definition docnode.h:744
Node representing some amount of white space.
Definition docnode.h:350
Node representing a word.
Definition docnode.h:152
QCString word() const
Definition docnode.h:155
Node representing an item of a cross-referenced list.
Definition docnode.h:616
QCString anchor() const
Definition docnode.h:620
QCString file() const
Definition docnode.h:619
QCString title() const
Definition docnode.h:621
Representation of a class inheritance or dependency graph.
bool isTrivial() const
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978
A model of a file symbol.
Definition filedef.h:99
virtual const MemberGroupList & getMemberGroups() const =0
virtual const IncludeInfoList & includeFileList() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual const QCString & docName() const =0
virtual const IncludeInfoList & includedByFileList() const =0
A model of a group of symbols.
Definition groupdef.h:52
virtual const GroupList & getSubGroups() const =0
virtual QCString groupTitle() const =0
virtual const FileList & getFiles() const =0
virtual const MemberGroupList & getMemberGroups() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const PageLinkedRefMap & getPages() const =0
virtual const NamespaceLinkedRefMap & getNamespaces() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual const ModuleLinkedRefMap & getModules() const =0
const PerlSymb * perl(SymType symb) const
Access routine to the perl struct with the perl code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
const T * find(const std::string &key) const
Definition linkedmap.h:47
bool empty() const
Definition linkedmap.h:374
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual QCString enumBaseType() const =0
virtual QCString excpString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const ArgumentList & argumentList() const =0
virtual const MemberVector & reimplementedBy() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual QCString bitfieldString() const =0
virtual Protection protection() const =0
virtual MemberType memberType() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual const ArgumentList & declArgumentList() const =0
virtual const QCString & initializer() const =0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:109
A vector of MemberDef object.
Definition memberlist.h:35
bool empty() const noexcept
Definition memberlist.h:60
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual const MemberGroupList & getMemberGroups() const =0
virtual FileList getUsedFiles() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
static ModuleManager & instance()
An abstract interface of a namespace symbol.
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual const MemberGroupList & getMemberGroups() const =0
A model of a page symbol.
Definition pagedef.h:26
Concrete visitor implementation for PerlMod output.
PerlModDocVisitor(PerlModOutput &)
void openItem(const QCString &)
void visitChildren(const T &t)
void addLink(const QCString &ref, const QCString &file, const QCString &anchor)
PerlModOutput & m_output
void singleItem(const QCString &)
void openSubBlock(const QCString &=QCString())
void operator()(const DocWord &)
void generatePerlModForPage(PageDef *pi)
PerlModOutput m_output
void generatePerlModForMember(const MemberDef *md, const Definition *)
bool generateDoxyFormatTex()
QCString pathDoxyLatexPL
QCString pathDoxyStructureTex
bool generateDoxyLatexTex()
bool createOutputDir(Dir &perlModDir)
QCString pathDoxyDocsPM
void generatePerlModSection(const Definition *d, MemberList *ml, const QCString &name, const QCString &header=QCString())
QCString pathDoxyStructurePM
void generatePerlModForClass(const ClassDef *cd)
QCString pathDoxyLatexDVI
bool generatePerlModOutput()
void generatePerlModForModule(const ModuleDef *mod)
QCString pathDoxyDocsTex
void generatePerlModForNamespace(const NamespaceDef *nd)
PerlModGenerator(bool pretty)
void addIncludeInfo(const IncludeInfo *ii)
void addListOfAllMembers(const ClassDef *cd)
QCString pathDoxyLatexStructurePL
bool generateDoxyStructurePM()
void generatePerlModForGroup(const GroupDef *gd)
void generatePerlModForFile(const FileDef *fd)
QCString pathDoxyFormatTex
QCString pathDoxyLatexPDF
bool createOutputFile(std::ofstream &f, const QCString &s)
void generatePerlModForConcept(const ConceptDef *cd)
bool generateDoxyLatexStructurePL()
QCString pathDoxyLatexTex
void generatePerlUserDefinedSection(const Definition *d, const MemberGroupList &mgl)
PerlModOutput & closeList()
PerlModOutput & add(char c)
void iaddFieldQuotedString(const QCString &, const QCString &)
char m_spaces[PERLOUTPUT_MAX_INDENTATION *2+2]
virtual ~PerlModOutput()
PerlModOutput(bool pretty)
PerlModOutput & add(QCString &s)
PerlModOutput & open(char c, const QCString &s=QCString())
PerlModOutput & addFieldQuotedChar(const QCString &field, char content)
PerlModOutputStream * m_stream
PerlModOutput & continueBlock()
PerlModOutput & addField(const QCString &s)
void iopen(char, const QCString &)
PerlModOutput & openHash(const QCString &s=QCString())
PerlModOutput & addFieldQuotedString(const QCString &field, const QCString &content)
PerlModOutput & add(int n)
PerlModOutput & openList(const QCString &s=QCString())
void setPerlModOutputStream(PerlModOutputStream *os)
PerlModOutput & close(char c=0)
PerlModOutput & closeHash()
PerlModOutput & addQuoted(const QCString &s)
void iclose(char)
PerlModOutput & add(const QCString &s)
void iaddFieldQuotedChar(const QCString &, char)
PerlModOutput & addFieldBoolean(const QCString &field, bool content)
void iaddQuoted(const QCString &)
void iaddField(const QCString &)
PerlModOutput & indent()
PerlModOutput & add(unsigned int n)
std::ostream * m_t
PerlModOutputStream(std::ostream &t)
This is an alternative implementation of QCString.
Definition qcstring.h:101
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
QCString & setNum(short n)
Definition qcstring.h:444
QCString right(size_t len) const
Definition qcstring.h:219
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
class that provide information about a section.
Definition section.h:57
QCString title() const
Definition section.h:69
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:175
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
@ ImportLocal
Definition filedef.h:54
@ IncludeLocal
Definition filedef.h:50
#define err(fmt,...)
Definition message.h:127
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
static void addTemplateArgumentList(const ArgumentList &al, PerlModOutput &output, const QCString &)
void generatePerlMod()
static const char * getVirtualnessName(Specifier virt)
static void addTemplateList(const ClassDef *cd, PerlModOutput &output)
static const char * getProtectionName(Protection prot)
static void addPerlModDocBlock(PerlModOutput &output, const QCString &name, const QCString &fileName, int lineNr, const Definition *scope, const MemberDef *md, const QCString &text)
static QCString pathDoxyExec
void setPerlModDoxyfile(const QCString &qs)
static QCString pathDoxyfile
#define PERLOUTPUT_MAX_INDENTATION
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
Definition qcstring.h:672
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
This class contains the information about the argument of a function or template.
Definition arguments.h:27
QCString type
Definition arguments.h:42
QCString name
Definition arguments.h:44
Class representing the data associated with a #include statement.
Definition filedef.h:75
QCString includeName
Definition filedef.h:80
IncludeKind kind
Definition filedef.h:81
const FileDef * fileDef
Definition filedef.h:79
@ Enumeration
Definition types.h:557
@ EnumValue
Definition types.h:558
@ Dictionary
Definition types.h:568
@ Interface
Definition types.h:565
@ Sequence
Definition types.h:567
@ Variable
Definition types.h:555
@ Property
Definition types.h:563
@ Typedef
Definition types.h:556
@ Function
Definition types.h:554
@ Service
Definition types.h:566
Protection
Definition types.h:32
Specifier
Definition types.h:80
static const char * to_string_lower(Protection prot)
Definition types.h:50
std::string_view word
Definition util.cpp:980
QCString filterTitle(const QCString &title)
Definition util.cpp:6093
A bunch of utility functions.