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