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