Doxygen
Loading...
Searching...
No Matches
perlmodgen.cpp
Go to the documentation of this file.
1/******************************************************************************
2 *
3 * Copyright (C) 1997-2022 by Dimitri van Heesch.
4 * Authors: Dimitri van Heesch, Miguel Lobo.
5 *
6 * Permission to use, copy, modify, and distribute this software and its
7 * documentation under the terms of the GNU General Public License is hereby
8 * granted. No representations are made about the suitability of this software
9 * for any purpose. It is provided "as is" without express or implied warranty.
10 * See the GNU General Public License for more details.
11 *
12 * Documents produced by Doxygen are derivative works derived from the
13 * input used in their production; they are not affected by this license.
14 *
15 */
16
17#include <stdlib.h>
18#include <stack>
19
20#include "perlmodgen.h"
21#include "docparser.h"
22#include "docnode.h"
23#include "message.h"
24#include "doxygen.h"
25#include "pagedef.h"
26#include "memberlist.h"
27#include "arguments.h"
28#include "config.h"
29#include "groupdef.h"
30#include "classdef.h"
31#include "classlist.h"
32#include "filename.h"
33#include "membername.h"
34#include "namespacedef.h"
35#include "membergroup.h"
36#include "section.h"
37#include "util.h"
38#include "htmlentity.h"
39#include "emoji.h"
40#include "dir.h"
41#include "portable.h"
42#include "moduledef.h"
43#include "construct.h"
44
45#define PERLOUTPUT_MAX_INDENTATION 40
46
48{
49 public:
50 std::ostream *m_t = nullptr;
51
52 PerlModOutputStream(std::ostream &t) : m_t(&t) { }
53
54 void add(char c);
55 void add(const QCString &s);
56 void add(int n);
57 void add(unsigned int n);
58};
59
61{
62 *m_t << c;
63}
64
66{
67 *m_t << s;
68}
69
71{
72 *m_t << n;
73}
74
75void PerlModOutputStream::add(unsigned int n)
76{
77 *m_t << n;
78}
79
81{
82public:
83
85
86 inline PerlModOutput(bool pretty)
87 : m_pretty(pretty), m_stream(nullptr), m_indentation(false), m_blockstart(true)
88 {
89 m_spaces[0] = 0;
90 }
91
92 virtual ~PerlModOutput() { reset(); }
94
95 void reset() { m_stream=nullptr; }
96
98
99 //inline PerlModOutput &openSave() { iopenSave(); return *this; }
100 //inline PerlModOutput &closeSave(QCString &s) { icloseSave(s); return *this; }
101
103 {
104 if (m_blockstart)
105 m_blockstart = false;
106 else
107 m_stream->add(',');
108 indent();
109 return *this;
110 }
111
112 inline PerlModOutput &add(char c) { m_stream->add(c); return *this; }
113 inline PerlModOutput &add(const QCString &s) { m_stream->add(s); return *this; }
114 inline PerlModOutput &add(QCString &s) { m_stream->add(s); return *this; }
115 inline PerlModOutput &add(int n) { m_stream->add(n); return *this; }
116 inline PerlModOutput &add(unsigned int n) { m_stream->add(n); return *this; }
117
118 PerlModOutput &addQuoted(const QCString &s) { iaddQuoted(s); return *this; }
119
121 {
122 if (m_pretty) {
123 m_stream->add('\n');
124 m_stream->add(m_spaces);
125 }
126 return *this;
127 }
128
129 inline PerlModOutput &open(char c, const QCString &s = QCString()) { iopen(c, s); return *this; }
130 inline PerlModOutput &close(char c = 0) { iclose(c); return *this; }
131
132 inline PerlModOutput &addField(const QCString &s) { iaddField(s); return *this; }
133 inline PerlModOutput &addFieldQuotedChar(const QCString &field, char content)
134 {
135 iaddFieldQuotedChar(field, content); return *this;
136 }
137 inline PerlModOutput &addFieldQuotedString(const QCString &field, const QCString &content)
138 {
139 iaddFieldQuotedString(field, content); return *this;
140 }
141 inline PerlModOutput &addFieldBoolean(const QCString &field, bool content)
142 {
143 return addFieldQuotedString(field, content ? "yes" : "no");
144 }
145 inline PerlModOutput &openList(const QCString &s = QCString()) { open('[', s); return *this; }
146 inline PerlModOutput &closeList() { close(']'); return *this; }
147 inline PerlModOutput &openHash(const QCString &s = QCString() ) { open('{', s); return *this; }
148 inline PerlModOutput &closeHash() { close('}'); return *this; }
149
150protected:
151
152 //void iopenSave();
153 //void icloseSave(QCString &);
154
155 void incIndent();
156 void decIndent();
157
158 void iaddQuoted(const QCString &);
159 void iaddFieldQuotedChar(const QCString &, char);
160 void iaddFieldQuotedString(const QCString &, const QCString &);
161 void iaddField(const QCString &);
162
163 void iopen(char, const QCString &);
164 void iclose(char);
165
166private:
167
171
172 //std::stack<PerlModOutputStream*> m_saved;
174};
175
176//void PerlModOutput::iopenSave()
177//{
178// m_saved.push(m_stream);
179// m_stream = new PerlModOutputStream();
180//}
181
182//void PerlModOutput::icloseSave(QCString &s)
183//{
184// s = m_stream->m_s;
185// delete m_stream;
186// m_stream = m_saved.top();
187// m_saved.pop();
188//}
189
191{
193 {
194 char *s = &m_spaces[m_indentation * 2];
195 *s++ = ' '; *s++ = ' '; *s = 0;
196 }
198}
199
206
208{
209 if (str.isEmpty()) return;
210 const char *s = str.data();
211 char c = 0;
212 while ((c = *s++) != 0)
213 {
214 if ((c == '\'') || (c == '\\'))
215 {
216 m_stream->add('\\');
217 }
218 m_stream->add(c);
219 }
220}
221
223{
225 m_stream->add(s);
226 m_stream->add(m_pretty ? " => " : "=>");
227}
228
229void PerlModOutput::iaddFieldQuotedChar(const QCString &field, char content)
230{
231 iaddField(field);
232 m_stream->add('\'');
233 if ((content == '\'') || (content == '\\'))
234 m_stream->add('\\');
235 m_stream->add(content);
236 m_stream->add('\'');
237}
238
240{
241 if (content == nullptr)
242 return;
243 iaddField(field);
244 m_stream->add('\'');
245 iaddQuoted(content);
246 m_stream->add('\'');
247}
248
249void PerlModOutput::iopen(char c, const QCString &s)
250{
251 if (s != nullptr)
252 iaddField(s);
253 else
255 m_stream->add(c);
256 incIndent();
257 m_blockstart = true;
258}
259
261{
262 decIndent();
263 indent();
264 if (c != 0)
265 m_stream->add(c);
266 m_blockstart = false;
267}
268
269/*! @brief Concrete visitor implementation for PerlMod output. */
271{
272 public:
274
275 void finish();
276
277 //--------------------------------------
278 // visitor functions for leaf nodes
279 //--------------------------------------
280
281 void operator()(const DocWord &);
282 void operator()(const DocLinkedWord &);
283 void operator()(const DocWhiteSpace &);
284 void operator()(const DocSymbol &);
285 void operator()(const DocEmoji &);
286 void operator()(const DocURL &);
287 void operator()(const DocLineBreak &);
288 void operator()(const DocHorRuler &);
289 void operator()(const DocStyleChange &);
290 void operator()(const DocVerbatim &);
291 void operator()(const DocAnchor &);
292 void operator()(const DocInclude &);
293 void operator()(const DocIncOperator &);
294 void operator()(const DocFormula &);
295 void operator()(const DocIndexEntry &);
296 void operator()(const DocSimpleSectSep &);
297 void operator()(const DocCite &);
298 void operator()(const DocSeparator &);
299
300 //--------------------------------------
301 // visitor functions for compound nodes
302 //--------------------------------------
303
304 void operator()(const DocAutoList &);
305 void operator()(const DocAutoListItem &);
306 void operator()(const DocPara &) ;
307 void operator()(const DocRoot &);
308 void operator()(const DocSimpleSect &);
309 void operator()(const DocTitle &);
310 void operator()(const DocSimpleList &);
311 void operator()(const DocSimpleListItem &);
312 void operator()(const DocSection &);
313 void operator()(const DocHtmlList &);
314 void operator()(const DocHtmlListItem &);
315 void operator()(const DocHtmlDescList &);
316 void operator()(const DocHtmlDescTitle &);
317 void operator()(const DocHtmlDescData &);
318 void operator()(const DocHtmlTable &);
319 void operator()(const DocHtmlRow &);
320 void operator()(const DocHtmlCell &);
321 void operator()(const DocHtmlCaption &);
322 void operator()(const DocInternal &);
323 void operator()(const DocHRef &);
324 void operator()(const DocHtmlSummary &);
325 void operator()(const DocHtmlDetails &);
326 void operator()(const DocHtmlHeader &);
327 void operator()(const DocImage &);
328 void operator()(const DocDotFile &);
329 void operator()(const DocMscFile &);
330 void operator()(const DocDiaFile &);
331 void operator()(const DocPlantUmlFile &);
332 void operator()(const DocLink &);
333 void operator()(const DocRef &);
334 void operator()(const DocSecRefItem &);
335 void operator()(const DocSecRefList &);
336 void operator()(const DocParamSect &);
337 void operator()(const DocParamList &);
338 void operator()(const DocXRefItem &);
339 void operator()(const DocInternalRef &);
340 void operator()(const DocText &);
341 void operator()(const DocHtmlBlockQuote &);
342 void operator()(const DocVhdlFlow &);
343 void operator()(const DocParBlock &);
344
345 private:
346 template<class T>
347 void visitChildren(const T &t)
348 {
349 for (const auto &child : t.children())
350 {
351 std::visit(*this, child);
352 }
353 }
354
355 //--------------------------------------
356 // helper functions
357 //--------------------------------------
358
359 void addLink(const QCString &ref, const QCString &file,
360 const QCString &anchor);
361
362 void enterText();
363 void leaveText();
364
365 void openItem(const QCString &);
366 void closeItem();
367 void singleItem(const QCString &);
368 void openSubBlock(const QCString & = QCString());
369 void closeSubBlock();
370
371 //--------------------------------------
372 // state variables
373 //--------------------------------------
374
379};
380
382 : m_output(output), m_textmode(false), m_textblockstart(FALSE)
383{
384 m_output.openList("doc");
385}
386
388{
389 leaveText();
390 m_output.closeList()
391 .add(m_other);
392}
393
394void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCString &anchor)
395{
396 QCString link = file;
397 if (!anchor.isEmpty())
398 (link += "_1") += anchor;
399 m_output.addFieldQuotedString("link", link);
400}
401
403{
404 leaveText();
405 m_output.openHash().addFieldQuotedString("type", name);
406}
407
409{
410 leaveText();
411 m_output.closeHash();
412}
413
415{
416 if (m_textmode)
417 return;
418 openItem("text");
419 m_output.addField("content").add('\'');
420 m_textmode = true;
421}
422
424{
425 if (!m_textmode)
426 return;
427 m_textmode = false;
429 .add('\'')
430 .closeHash();
431}
432
434{
435 openItem(name);
436 closeItem();
437}
438
440{
441 leaveText();
442 m_output.openList(s);
443 m_textblockstart = true;
444}
445
447{
448 leaveText();
449 m_output.closeList();
450}
451
452//void PerlModDocVisitor::openOther()
453//{
454 // Using a secondary text stream will corrupt the perl file. Instead of
455 // printing doc => [ data => [] ], it will print doc => [] data => [].
456 /*
457 leaveText();
458 m_output.openSave();
459 */
460//}
461
462//void PerlModDocVisitor::closeOther()
463//{
464 // Using a secondary text stream will corrupt the perl file. Instead of
465 // printing doc => [ data => [] ], it will print doc => [] data => [].
466 /*
467 QCString other;
468 leaveText();
469 m_output.closeSave(other);
470 m_other += other;
471 */
472//}
473
475{
476 enterText();
477 m_output.addQuoted(w.word());
478}
479
481{
482 openItem("url");
483 addLink(w.ref(), w.file(), w.anchor());
484 m_output.addFieldQuotedString("content", w.word());
485 closeItem();
486}
487
489{
490 enterText();
491 m_output.add(' ');
492}
493
495{
497 const char *accent=nullptr;
498 if (res->symb)
499 {
500 switch (res->type)
501 {
503 enterText();
504 m_output.add(res->symb);
505 break;
507 enterText();
508 m_output.add(res->symb[0]);
509 break;
511 leaveText();
512 openItem("symbol");
513 m_output.addFieldQuotedString("symbol", res->symb);
514 closeItem();
515 break;
516 default:
517 switch(res->type)
518 {
520 accent = "umlaut";
521 break;
523 accent = "acute";
524 break;
526 accent = "grave";
527 break;
529 accent = "circ";
530 break;
532 accent = "slash";
533 break;
535 accent = "tilde";
536 break;
538 accent = "cedilla";
539 break;
541 accent = "ring";
542 break;
543 default:
544 break;
545 }
546 leaveText();
547 if (accent)
548 {
549 openItem("accent");
551 .addFieldQuotedString("accent", accent)
552 .addFieldQuotedChar("letter", res->symb[0]);
553 closeItem();
554 }
555 break;
556 }
557 }
558 else
559 {
560 err("perl: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(sy.symbol(),TRUE));
561 }
562}
563
565{
566 enterText();
567 const char *name = EmojiEntityMapper::instance().name(sy.index());
568 if (name)
569 {
570 m_output.add(name);
571 }
572 else
573 {
574 m_output.add(sy.name());
575 }
576}
577
579{
580 openItem("url");
581 m_output.addFieldQuotedString("content", u.url());
582 closeItem();
583}
584
586{
587 singleItem("linebreak");
588}
589
591{
592 singleItem("hruler");
593}
594
596{
597 const char *style = nullptr;
598 switch (s.style())
599 {
600 case DocStyleChange::Bold: style = "bold"; break;
601 case DocStyleChange::S: style = "s"; break;
602 case DocStyleChange::Strike: style = "strike"; break;
603 case DocStyleChange::Del: style = "del"; break;
604 case DocStyleChange::Underline: style = "underline"; break;
605 case DocStyleChange::Ins: style = "ins"; break;
606 case DocStyleChange::Italic: style = "italic"; break;
607 case DocStyleChange::Code: style = "code"; break;
608 case DocStyleChange::Subscript: style = "subscript"; break;
609 case DocStyleChange::Superscript: style = "superscript"; break;
610 case DocStyleChange::Center: style = "center"; break;
611 case DocStyleChange::Small: style = "small"; break;
612 case DocStyleChange::Cite: style = "cite"; break;
613 case DocStyleChange::Preformatted: style = "preformatted"; break;
614 case DocStyleChange::Div: style = "div"; break;
615 case DocStyleChange::Span: style = "span"; break;
616 case DocStyleChange::Kbd: style = "kbd"; break;
617 }
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 return to_string_lower(prot);
1390}
1391
1392static const char *getVirtualnessName(Specifier virt)
1393{
1394 return to_string_lower(virt);
1395}
1396
1399
1401{
1402 pathDoxyfile = qs;
1404}
1405
1407{
1408public:
1409
1411
1424
1425 inline PerlModGenerator(bool pretty) : m_output(pretty) { }
1426
1427 void generatePerlModForMember(const MemberDef *md, const Definition *);
1429 void generatePerlModSection(const Definition *d, MemberList *ml,
1430 const QCString &name, const QCString &header=QCString());
1431 void addListOfAllMembers(const ClassDef *cd);
1432 void addIncludeInfo(const IncludeInfo *ii);
1433 void generatePerlModForClass(const ClassDef *cd);
1434 void generatePerlModForConcept(const ConceptDef *cd);
1435 void generatePerlModForModule(const ModuleDef *mod);
1437 void generatePerlModForFile(const FileDef *fd);
1438 void generatePerlModForGroup(const GroupDef *gd);
1440
1441 bool createOutputFile(std::ofstream &f, const QCString &s);
1442 bool createOutputDir(Dir &perlModDir);
1443 bool generateDoxyLatexTex();
1444 bool generateDoxyFormatTex();
1446 bool generateDoxyLatexPL();
1448 bool generateDoxyRules();
1449 bool generateMakefile();
1450 bool generatePerlModOutput();
1451
1452 void generate();
1453};
1454
1456{
1457 // + declaration/definition arg lists
1458 // + reimplements
1459 // + reimplementedBy
1460 // + exceptions
1461 // + const/volatile specifiers
1462 // - examples
1463 // - source definition
1464 // - source references
1465 // - source referenced by
1466 // - body code
1467 // - template arguments
1468 // (templateArguments(), definitionTemplateParameterLists())
1469
1470 QCString memType;
1471 QCString name;
1472 bool isFunc=FALSE;
1473 switch (md->memberType())
1474 {
1475 case MemberType::Define: memType="define"; break;
1476 case MemberType::EnumValue: memType="enumvalue"; break;
1477 case MemberType::Property: memType="property"; break;
1478 case MemberType::Variable: memType="variable"; break;
1479 case MemberType::Typedef: memType="typedef"; break;
1480 case MemberType::Enumeration: memType="enum"; break;
1481 case MemberType::Function: memType="function"; isFunc=TRUE; break;
1482 case MemberType::Signal: memType="signal"; isFunc=TRUE; break;
1483 case MemberType::Friend: memType="friend"; isFunc=TRUE; break;
1484 case MemberType::DCOP: memType="dcop"; isFunc=TRUE; break;
1485 case MemberType::Slot: memType="slot"; isFunc=TRUE; break;
1486 case MemberType::Event: memType="event"; break;
1487 case MemberType::Interface: memType="interface"; break;
1488 case MemberType::Service: memType="service"; break;
1489 case MemberType::Sequence: memType="sequence"; break;
1490 case MemberType::Dictionary: memType="dictionary"; break;
1491 }
1492
1493 bool isFortran = md->getLanguage()==SrcLangExt::Fortran;
1494 name = md->name();
1495 if (md->isAnonymous()) name = "__unnamed" + name.right(name.length() - 1)+"__";
1496
1497 m_output.openHash()
1498 .addFieldQuotedString("kind", memType)
1499 .addFieldQuotedString("name", name)
1500 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1501 .addFieldQuotedString("protection", getProtectionName(md->protection()))
1502 .addFieldBoolean("static", md->isStatic());
1503
1505 addPerlModDocBlock(m_output,"detailed",md->getDefFileName(),md->getDefLine(),md->getOuterScope(),md,md->documentation());
1506 if (md->memberType()!=MemberType::Define &&
1508 m_output.addFieldQuotedString("type", md->typeString());
1509
1510 const ArgumentList &al = md->argumentList();
1511 if (isFunc) //function
1512 {
1513 m_output.addFieldBoolean("const", al.constSpecifier())
1514 .addFieldBoolean("volatile", al.volatileSpecifier());
1515
1516 m_output.openList("parameters");
1517 const ArgumentList &declAl = md->declArgumentList();
1518 if (!declAl.empty())
1519 {
1520 auto defIt = al.begin();
1521 for (const Argument &a : declAl)
1522 {
1523 const Argument *defArg = nullptr;
1524 if (defIt!=al.end())
1525 {
1526 defArg = &(*defIt);
1527 ++defIt;
1528 }
1529 m_output.openHash();
1530
1531 if (!a.name.isEmpty())
1532 m_output.addFieldQuotedString("declaration_name", a.name);
1533
1534 if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
1535 m_output.addFieldQuotedString("definition_name", defArg->name);
1536
1537 if (isFortran && defArg && !defArg->type.isEmpty())
1538 m_output.addFieldQuotedString("type", defArg->type);
1539 else if (!a.type.isEmpty())
1540 m_output.addFieldQuotedString("type", a.type);
1541
1542 if (!a.array.isEmpty())
1543 m_output.addFieldQuotedString("array", a.array);
1544
1545 if (!a.defval.isEmpty())
1546 m_output.addFieldQuotedString("default_value", a.defval);
1547
1548 if (!a.attrib.isEmpty())
1549 m_output.addFieldQuotedString("attributes", a.attrib);
1550
1551 m_output.closeHash();
1552 }
1553 }
1554 m_output.closeList();
1555 }
1556 else if (md->memberType()==MemberType::Define &&
1557 md->argsString()!=nullptr) // define
1558 {
1559 m_output.openList("parameters");
1560 for (const Argument &a : al)
1561 {
1562 m_output.openHash()
1563 .addFieldQuotedString("name", a.type)
1564 .closeHash();
1565 }
1566 m_output.closeList();
1567 }
1568 else if (md->argsString()!=nullptr)
1569 {
1570 m_output.addFieldQuotedString("arguments", md->argsString());
1571 }
1572
1573 if (!md->initializer().isEmpty())
1574 m_output.addFieldQuotedString("initializer", md->initializer());
1575
1576 if (!md->excpString().isEmpty())
1577 m_output.addFieldQuotedString("exceptions", md->excpString());
1578
1579 if (md->memberType()==MemberType::Enumeration) // enum
1580 {
1581 const MemberVector &enumFields = md->enumFieldList();
1582 m_output.addFieldQuotedString("type", md->enumBaseType());
1583 if (!enumFields.empty())
1584 {
1585 m_output.openList("values");
1586 for (const auto &emd : enumFields)
1587 {
1588 m_output.openHash()
1589 .addFieldQuotedString("name", emd->name());
1590
1591 if (!emd->initializer().isEmpty())
1592 m_output.addFieldQuotedString("initializer", emd->initializer());
1593
1594 addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1595
1596 addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->documentation());
1597
1598 m_output.closeHash();
1599 }
1600 m_output.closeList();
1601 }
1602 }
1603
1604 if (md->memberType() == MemberType::Variable && !md->bitfieldString().isEmpty())
1605 {
1606 QCString bitfield = md->bitfieldString();
1607 if (bitfield.at(0) == ':') bitfield = bitfield.mid(1);
1608 m_output.addFieldQuotedString("bitfield", bitfield);
1609 }
1610
1611 const MemberDef *rmd = md->reimplements();
1612 if (rmd)
1613 m_output.openHash("reimplements")
1614 .addFieldQuotedString("name", rmd->name())
1615 .closeHash();
1616
1617 const MemberVector &rbml = md->reimplementedBy();
1618 if (!rbml.empty())
1619 {
1620 m_output.openList("reimplemented_by");
1621 for (const auto &rbmd : rbml)
1622 m_output.openHash()
1623 .addFieldQuotedString("name", rbmd->name())
1624 .closeHash();
1625 m_output.closeList();
1626 }
1627
1628 m_output.closeHash();
1629}
1630
1632 MemberList *ml,const QCString &name,const QCString &header)
1633{
1634 if (ml==nullptr) return; // empty list
1635
1636 m_output.openHash(name);
1637
1638 if (!header.isEmpty())
1639 m_output.addFieldQuotedString("header", header);
1640
1641 m_output.openList("members");
1642 for (const auto &md : *ml)
1643 {
1645 }
1646 m_output.closeList()
1647 .closeHash();
1648}
1649
1651{
1652 m_output.openList("all_members");
1653 for (auto &mni : cd->memberNameInfoLinkedMap())
1654 {
1655 for (auto &mi : *mni)
1656 {
1657 const MemberDef *md=mi->memberDef();
1658 const ClassDef *mcd=md->getClassDef();
1659
1660 m_output.openHash()
1661 .addFieldQuotedString("name", md->name())
1662 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1663 .addFieldQuotedString("protection", getProtectionName(mi->prot()));
1664
1665 if (!mi->ambiguityResolutionScope().isEmpty())
1666 m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope());
1667
1668 m_output.addFieldQuotedString("scope", mcd->name())
1669 .closeHash();
1670 }
1671 }
1672 m_output.closeList();
1673}
1674
1676{
1677 if (!mgl.empty())
1678 {
1679 m_output.openList("user_defined");
1680 for (const auto &mg : mgl)
1681 {
1682 m_output.openHash();
1683 if (!mg->header().isEmpty())
1684 {
1685 m_output.addFieldQuotedString("header", mg->header());
1686 }
1687
1688 if (!mg->members().empty())
1689 {
1690 m_output.openList("members");
1691 for (const auto &md : mg->members())
1692 {
1694 }
1695 m_output.closeList();
1696 }
1697 m_output.closeHash();
1698 }
1699 m_output.closeList();
1700 }
1701}
1702
1704{
1705 if (ii)
1706 {
1707 QCString nm = ii->includeName;
1708 if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1709 if (!nm.isEmpty())
1710 {
1711 m_output.openHash("includes");
1712 m_output.addFieldBoolean("local", ii->kind==IncludeKind::IncludeLocal || ii->kind==IncludeKind::ImportLocal)
1713 .addFieldQuotedString("name", nm)
1714 .closeHash();
1715 }
1716 }
1717}
1718
1720{
1721 // + brief description
1722 // + detailed description
1723 // + template argument list(s)
1724 // - include file
1725 // + member groups
1726 // + inheritance diagram
1727 // + list of direct super classes
1728 // + list of direct sub classes
1729 // + list of inner classes
1730 // + collaboration diagram
1731 // + list of all members
1732 // + user defined member sections
1733 // + standard member sections
1734 // + detailed member documentation
1735 // - examples using the class
1736
1737 if (cd->isReference()) return; // skip external references.
1738 if (cd->isAnonymous()) return; // skip anonymous compounds.
1739 if (cd->isImplicitTemplateInstance()) return; // skip generated template instances.
1740
1741 m_output.openHash()
1742 .addFieldQuotedString("name", cd->name());
1743 /* DGA: fix # #7547 Perlmod does not generate "kind" information to discriminate struct/union */
1744 m_output.addFieldQuotedString("kind", cd->compoundTypeString());
1745
1746 if (!cd->baseClasses().empty())
1747 {
1748 m_output.openList("base");
1749 for (const auto &bcd : cd->baseClasses())
1750 {
1751 m_output.openHash()
1752 .addFieldQuotedString("name", bcd.classDef->displayName())
1753 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1754 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1755 .closeHash();
1756 }
1757 m_output.closeList();
1758 }
1759
1760 if (!cd->subClasses().empty())
1761 {
1762 m_output.openList("derived");
1763 for (const auto &bcd : cd->subClasses())
1764 {
1765 m_output.openHash()
1766 .addFieldQuotedString("name", bcd.classDef->displayName())
1767 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1768 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1769 .closeHash();
1770 }
1771 m_output.closeList();
1772 }
1773
1774 {
1775 m_output.openList("inner");
1776 for (const auto &icd : cd->getClasses())
1777 m_output.openHash()
1778 .addFieldQuotedString("name", icd->name())
1779 .closeHash();
1780 m_output.closeList();
1781 }
1782
1784
1788
1789 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubTypes()),"public_typedefs");
1790 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubMethods()),"public_methods");
1791 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubAttribs()),"public_members");
1792 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubSlots()),"public_slots");
1793 generatePerlModSection(cd,cd->getMemberList(MemberListType::Signals()),"signals");
1794 generatePerlModSection(cd,cd->getMemberList(MemberListType::DcopMethods()),"dcop_methods");
1795 generatePerlModSection(cd,cd->getMemberList(MemberListType::Properties()),"properties");
1796 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticMethods()),"public_static_methods");
1797 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticAttribs()),"public_static_members");
1798 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProTypes()),"protected_typedefs");
1799 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProMethods()),"protected_methods");
1800 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProAttribs()),"protected_members");
1801 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProSlots()),"protected_slots");
1802 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticMethods()),"protected_static_methods");
1803 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticAttribs()),"protected_static_members");
1804 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriTypes()),"private_typedefs");
1805 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriMethods()),"private_methods");
1806 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriAttribs()),"private_members");
1807 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriSlots()),"private_slots");
1808 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticMethods()),"private_static_methods");
1809 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticAttribs()),"private_static_members");
1810 generatePerlModSection(cd,cd->getMemberList(MemberListType::Friends()),"friend_methods");
1811 generatePerlModSection(cd,cd->getMemberList(MemberListType::Related()),"related_methods");
1812
1813 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->briefDescription());
1814 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->documentation());
1815
1816#if 0
1817 DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
1818 if (!inheritanceGraph.isTrivial())
1819 {
1820 t << " <inheritancegraph>" << endl;
1821 inheritanceGraph.writePerlMod(t);
1822 t << " </inheritancegraph>" << endl;
1823 }
1824 DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
1825 if (!collaborationGraph.isTrivial())
1826 {
1827 t << " <collaborationgraph>" << endl;
1828 collaborationGraph.writePerlMod(t);
1829 t << " </collaborationgraph>" << endl;
1830 }
1831 t << " <location file=\""
1832 << cd->getDefFileName() << "\" line=\""
1833 << cd->getDefLine() << "\"";
1834 if (cd->getStartBodyLine()!=-1)
1835 {
1836 t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1837 << cd->getEndBodyLine() << "\"";
1838 }
1839 t << "/>" << endl;
1840#endif
1841
1842 m_output.closeHash();
1843}
1844
1846{
1847 if (cd->isReference()) return; // skip external references
1848
1849 m_output.openHash()
1850 .addFieldQuotedString("name", cd->name());
1851
1854 m_output.addFieldQuotedString("initializer", cd->initializer());
1855 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->briefDescription());
1856 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->documentation());
1857
1858 m_output.closeHash();
1859}
1860
1862{
1863 // + contained class definitions
1864 // + contained concept definitions
1865 // + member groups
1866 // + normal members
1867 // + brief desc
1868 // + detailed desc
1869 // + location (file_id, line, column)
1870 // - exports
1871 // + used files
1872
1873 if (mod->isReference()) return; // skip external references
1874
1875 m_output.openHash()
1876 .addFieldQuotedString("name", mod->name());
1877
1879
1880 if (!mod->getClasses().empty())
1881 {
1882 m_output.openList("classes");
1883 for (const auto &cd : mod->getClasses())
1884 m_output.openHash()
1885 .addFieldQuotedString("name", cd->name())
1886 .closeHash();
1887 m_output.closeList();
1888 }
1889
1890 if (!mod->getConcepts().empty())
1891 {
1892 m_output.openList("concepts");
1893 for (const auto &cd : mod->getConcepts())
1894 m_output.openHash()
1895 .addFieldQuotedString("name", cd->name())
1896 .closeHash();
1897 m_output.closeList();
1898 }
1899
1900 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1901 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecEnumMembers()),"enums");
1902 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecFuncMembers()),"functions");
1903 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecVarMembers()),"variables");
1904
1905 addPerlModDocBlock(m_output,"brief",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->briefDescription());
1906 addPerlModDocBlock(m_output,"detailed",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->documentation());
1907
1908 if (!mod->getUsedFiles().empty())
1909 {
1910 m_output.openList("files");
1911 for (const auto &fd : mod->getUsedFiles())
1912 m_output.openHash()
1913 .addFieldQuotedString("name", fd->name())
1914 .closeHash();
1915 m_output.closeList();
1916 }
1917
1918 m_output.closeHash();
1919}
1920
1922{
1923 // + contained class definitions
1924 // + contained namespace definitions
1925 // + member groups
1926 // + normal members
1927 // + brief desc
1928 // + detailed desc
1929 // + location
1930 // - files containing (parts of) the namespace definition
1931
1932 if (nd->isReference()) return; // skip external references
1933
1934 m_output.openHash()
1935 .addFieldQuotedString("name", nd->name());
1936
1937 if (!nd->getClasses().empty())
1938 {
1939 m_output.openList("classes");
1940 for (const auto &cd : nd->getClasses())
1941 m_output.openHash()
1942 .addFieldQuotedString("name", cd->name())
1943 .closeHash();
1944 m_output.closeList();
1945 }
1946
1947 if (!nd->getNamespaces().empty())
1948 {
1949 m_output.openList("namespaces");
1950 for (const auto &ind : nd->getNamespaces())
1951 m_output.openHash()
1952 .addFieldQuotedString("name", ind->name())
1953 .closeHash();
1954 m_output.closeList();
1955 }
1956
1958
1959 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecDefineMembers()),"defines");
1960 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
1961 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1962 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecEnumMembers()),"enums");
1963 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecFuncMembers()),"functions");
1964 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecVarMembers()),"variables");
1965
1966 addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->briefDescription());
1967 addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->documentation());
1968
1969 m_output.closeHash();
1970}
1971
1973{
1974 // + includes files
1975 // + includedby files
1976 // - include graph
1977 // - included by graph
1978 // - contained class definitions
1979 // - contained namespace definitions
1980 // - member groups
1981 // + normal members
1982 // + brief desc
1983 // + detailed desc
1984 // - source code
1985 // - location
1986 // - number of lines
1987
1988 if (fd->isReference()) return;
1989
1990 m_output.openHash()
1991 .addFieldQuotedString("name", fd->name());
1992
1993 m_output.openList("includes");
1994 for (const auto &inc: fd->includeFileList())
1995 {
1996 m_output.openHash()
1997 .addFieldQuotedString("name", inc.includeName);
1998 if (inc.fileDef && !inc.fileDef->isReference())
1999 {
2000 m_output.addFieldQuotedString("ref", inc.fileDef->getOutputFileBase());
2001 }
2002 m_output.closeHash();
2003 }
2004 m_output.closeList();
2005
2006 m_output.openList("included_by");
2007 for (const auto &inc : fd->includedByFileList())
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
2020
2021 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2022 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2023 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2024 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2025 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2026 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecVarMembers()),"variables");
2027
2028 addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->briefDescription());
2029 addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->documentation());
2030
2031 m_output.closeHash();
2032}
2033
2035{
2036 // + members
2037 // + member groups
2038 // + files
2039 // + classes
2040 // + namespaces
2041 // - packages
2042 // + pages
2043 // + child groups
2044 // - examples
2045 // + brief description
2046 // + detailed description
2047
2048 if (gd->isReference()) return; // skip external references
2049
2050 m_output.openHash()
2051 .addFieldQuotedString("name", gd->name())
2052 .addFieldQuotedString("title", gd->groupTitle());
2053
2054 if (!gd->getFiles().empty())
2055 {
2056 m_output.openList("files");
2057 for (const auto &fd : gd->getFiles())
2058 m_output.openHash()
2059 .addFieldQuotedString("name", fd->name())
2060 .closeHash();
2061 m_output.closeList();
2062 }
2063
2064 if (!gd->getClasses().empty())
2065 {
2066 m_output.openList("classes");
2067 for (const auto &cd : gd->getClasses())
2068 m_output.openHash()
2069 .addFieldQuotedString("name", cd->name())
2070 .closeHash();
2071 m_output.closeList();
2072 }
2073
2074 if (!gd->getConcepts().empty())
2075 {
2076 m_output.openList("concepts");
2077 for (const auto &cd : gd->getConcepts())
2078 m_output.openHash()
2079 .addFieldQuotedString("name", cd->name())
2080 .closeHash();
2081 m_output.closeList();
2082 }
2083
2084 if (!gd->getModules().empty())
2085 {
2086 m_output.openList("modules");
2087 for (const auto &mod : gd->getModules())
2088 m_output.openHash()
2089 .addFieldQuotedString("name", mod->name())
2090 .closeHash();
2091 m_output.closeList();
2092 }
2093
2094 if (!gd->getNamespaces().empty())
2095 {
2096 m_output.openList("namespaces");
2097 for (const auto &nd : gd->getNamespaces())
2098 m_output.openHash()
2099 .addFieldQuotedString("name", nd->name())
2100 .closeHash();
2101 m_output.closeList();
2102 }
2103
2104 if (!gd->getPages().empty())
2105 {
2106 m_output.openList("pages");
2107 for (const auto &pd : gd->getPages())
2108 m_output.openHash()
2109 .addFieldQuotedString("title", pd->title())
2110 .closeHash();
2111 m_output.closeList();
2112 }
2113
2114 if (!gd->getSubGroups().empty())
2115 {
2116 m_output.openList("groups");
2117 for (const auto &sgd : gd->getSubGroups())
2118 m_output.openHash()
2119 .addFieldQuotedString("title", sgd->groupTitle())
2120 .closeHash();
2121 m_output.closeList();
2122 }
2123
2125
2126 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2127 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2128 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2129 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2130 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2131 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecVarMembers()),"variables");
2132
2133 addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->briefDescription());
2134 addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->documentation());
2135
2136 m_output.closeHash();
2137}
2138
2140{
2141 // + name
2142 // + title
2143 // + documentation
2144
2145 if (pd->isReference()) return;
2146
2147 m_output.openHash()
2148 .addFieldQuotedString("name", pd->name());
2149
2150 const SectionInfo *si = SectionManager::instance().find(pd->name());
2151 if (si)
2152 m_output.addFieldQuotedString("title4", filterTitle(si->title()));
2153
2154 addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),nullptr,nullptr,pd->documentation());
2155 m_output.closeHash();
2156}
2157
2159{
2160 std::ofstream outputFileStream;
2161 if (!createOutputFile(outputFileStream, pathDoxyDocsPM))
2162 return false;
2163
2164 PerlModOutputStream outputStream(outputFileStream);
2165 m_output.setPerlModOutputStream(&outputStream);
2166 m_output.add("$doxydocs=").openHash();
2167
2168 m_output.openList("classes");
2169 for (const auto &cd : *Doxygen::classLinkedMap)
2170 generatePerlModForClass(cd.get());
2171 m_output.closeList();
2172
2173 m_output.openList("concepts");
2174 for (const auto &cd : *Doxygen::conceptLinkedMap)
2175 generatePerlModForConcept(cd.get());
2176 m_output.closeList();
2177
2178 m_output.openList("modules");
2179 for (const auto &mod : ModuleManager::instance().modules())
2180 generatePerlModForModule(mod.get());
2181 m_output.closeList();
2182
2183 m_output.openList("namespaces");
2184 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2186 m_output.closeList();
2187
2188 m_output.openList("files");
2189 for (const auto &fn : *Doxygen::inputNameLinkedMap)
2190 {
2191 for (const auto &fd : *fn)
2192 {
2193 generatePerlModForFile(fd.get());
2194 }
2195 }
2196 m_output.closeList();
2197
2198 m_output.openList("groups");
2199 for (const auto &gd : *Doxygen::groupLinkedMap)
2200 {
2201 generatePerlModForGroup(gd.get());
2202 }
2203 m_output.closeList();
2204
2205 m_output.openList("pages");
2206 for (const auto &pd : *Doxygen::pageLinkedMap)
2207 {
2208 generatePerlModForPage(pd.get());
2209 }
2211 {
2213 }
2214 m_output.closeList();
2215
2216 m_output.closeHash().add(";\n1;\n");
2217 m_output.reset();
2218 return true;
2219}
2220
2221bool PerlModGenerator::createOutputFile(std::ofstream &f, const QCString &s)
2222{
2224 if (!f.is_open())
2225 {
2226 err("Cannot open file {} for writing!\n", s);
2227 return false;
2228 }
2229 return true;
2230}
2231
2233{
2234 std::string outputDirectory = Config_getString(OUTPUT_DIRECTORY).str();
2235 perlModDir.setPath(outputDirectory+"/perlmod");
2236 if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
2237 {
2238 err("Could not create perlmod directory in {}\n",outputDirectory);
2239 return false;
2240 }
2241 return true;
2242}
2243
2245{
2246 std::ofstream doxyModelPMStream;
2247 if (!createOutputFile(doxyModelPMStream, pathDoxyStructurePM))
2248 return false;
2249
2250 doxyModelPMStream <<
2251 "sub memberlist($) {\n"
2252 " my $prefix = $_[0];\n"
2253 " return\n"
2254 "\t[ \"hash\", $prefix . \"s\",\n"
2255 "\t {\n"
2256 "\t members =>\n"
2257 "\t [ \"list\", $prefix . \"List\",\n"
2258 "\t\t[ \"hash\", $prefix,\n"
2259 "\t\t {\n"
2260 "\t\t kind => [ \"string\", $prefix . \"Kind\" ],\n"
2261 "\t\t name => [ \"string\", $prefix . \"Name\" ],\n"
2262 "\t\t static => [ \"string\", $prefix . \"Static\" ],\n"
2263 "\t\t virtualness => [ \"string\", $prefix . \"Virtualness\" ],\n"
2264 "\t\t protection => [ \"string\", $prefix . \"Protection\" ],\n"
2265 "\t\t type => [ \"string\", $prefix . \"Type\" ],\n"
2266 "\t\t parameters =>\n"
2267 "\t\t [ \"list\", $prefix . \"Params\",\n"
2268 "\t\t\t[ \"hash\", $prefix . \"Param\",\n"
2269 "\t\t\t {\n"
2270 "\t\t\t declaration_name => [ \"string\", $prefix . \"ParamName\" ],\n"
2271 "\t\t\t type => [ \"string\", $prefix . \"ParamType\" ],\n"
2272 "\t\t\t },\n"
2273 "\t\t\t],\n"
2274 "\t\t ],\n"
2275 "\t\t detailed =>\n"
2276 "\t\t [ \"hash\", $prefix . \"Detailed\",\n"
2277 "\t\t\t{\n"
2278 "\t\t\t doc => [ \"doc\", $prefix . \"DetailedDoc\" ],\n"
2279 "\t\t\t return => [ \"doc\", $prefix . \"Return\" ],\n"
2280 "\t\t\t see => [ \"doc\", $prefix . \"See\" ],\n"
2281 "\t\t\t params =>\n"
2282 "\t\t\t [ \"list\", $prefix . \"PDBlocks\",\n"
2283 "\t\t\t [ \"hash\", $prefix . \"PDBlock\",\n"
2284 "\t\t\t\t{\n"
2285 "\t\t\t\t parameters =>\n"
2286 "\t\t\t\t [ \"list\", $prefix . \"PDParams\",\n"
2287 "\t\t\t\t [ \"hash\", $prefix . \"PDParam\",\n"
2288 "\t\t\t\t\t{\n"
2289 "\t\t\t\t\t name => [ \"string\", $prefix . \"PDParamName\" ],\n"
2290 "\t\t\t\t\t},\n"
2291 "\t\t\t\t ],\n"
2292 "\t\t\t\t ],\n"
2293 "\t\t\t\t doc => [ \"doc\", $prefix . \"PDDoc\" ],\n"
2294 "\t\t\t\t},\n"
2295 "\t\t\t ],\n"
2296 "\t\t\t ],\n"
2297 "\t\t\t},\n"
2298 "\t\t ],\n"
2299 "\t\t },\n"
2300 "\t\t],\n"
2301 "\t ],\n"
2302 "\t },\n"
2303 "\t];\n"
2304 "}\n"
2305 "\n"
2306 "$doxystructure =\n"
2307 " [ \"hash\", \"Root\",\n"
2308 " {\n"
2309 "\tfiles =>\n"
2310 "\t [ \"list\", \"Files\",\n"
2311 "\t [ \"hash\", \"File\",\n"
2312 "\t {\n"
2313 "\t\tname => [ \"string\", \"FileName\" ],\n"
2314 "\t\ttypedefs => memberlist(\"FileTypedef\"),\n"
2315 "\t\tvariables => memberlist(\"FileVariable\"),\n"
2316 "\t\tfunctions => memberlist(\"FileFunction\"),\n"
2317 "\t\tdetailed =>\n"
2318 "\t\t [ \"hash\", \"FileDetailed\",\n"
2319 "\t\t {\n"
2320 "\t\t doc => [ \"doc\", \"FileDetailedDoc\" ],\n"
2321 "\t\t },\n"
2322 "\t\t ],\n"
2323 "\t },\n"
2324 "\t ],\n"
2325 "\t ],\n"
2326 "\tpages =>\n"
2327 "\t [ \"list\", \"Pages\",\n"
2328 "\t [ \"hash\", \"Page\",\n"
2329 "\t {\n"
2330 "\t\tname => [ \"string\", \"PageName\" ],\n"
2331 "\t\tdetailed =>\n"
2332 "\t\t [ \"hash\", \"PageDetailed\",\n"
2333 "\t\t {\n"
2334 "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n"
2335 "\t\t },\n"
2336 "\t\t ],\n"
2337 "\t },\n"
2338 "\t ],\n"
2339 "\t ],\n"
2340 "\tclasses =>\n"
2341 "\t [ \"list\", \"Classes\",\n"
2342 "\t [ \"hash\", \"Class\",\n"
2343 "\t {\n"
2344 "\t\tname => [ \"string\", \"ClassName\" ],\n"
2345 "\t\tpublic_typedefs => memberlist(\"ClassPublicTypedef\"),\n"
2346 "\t\tpublic_methods => memberlist(\"ClassPublicMethod\"),\n"
2347 "\t\tpublic_members => memberlist(\"ClassPublicMember\"),\n"
2348 "\t\tprotected_typedefs => memberlist(\"ClassProtectedTypedef\"),\n"
2349 "\t\tprotected_methods => memberlist(\"ClassProtectedMethod\"),\n"
2350 "\t\tprotected_members => memberlist(\"ClassProtectedMember\"),\n"
2351 "\t\tprivate_typedefs => memberlist(\"ClassPrivateTypedef\"),\n"
2352 "\t\tprivate_methods => memberlist(\"ClassPrivateMethod\"),\n"
2353 "\t\tprivate_members => memberlist(\"ClassPrivateMember\"),\n"
2354 "\t\tdetailed =>\n"
2355 "\t\t [ \"hash\", \"ClassDetailed\",\n"
2356 "\t\t {\n"
2357 "\t\t doc => [ \"doc\", \"ClassDetailedDoc\" ],\n"
2358 "\t\t },\n"
2359 "\t\t ],\n"
2360 "\t },\n"
2361 "\t ],\n"
2362 "\t ],\n"
2363 "\tgroups =>\n"
2364 "\t [ \"list\", \"Groups\",\n"
2365 "\t [ \"hash\", \"Group\",\n"
2366 "\t {\n"
2367 "\t\tname => [ \"string\", \"GroupName\" ],\n"
2368 "\t\ttitle => [ \"string\", \"GroupTitle\" ],\n"
2369 "\t\tfiles =>\n"
2370 "\t\t [ \"list\", \"Files\",\n"
2371 "\t\t [ \"hash\", \"File\",\n"
2372 "\t\t {\n"
2373 "\t\t name => [ \"string\", \"Filename\" ]\n"
2374 "\t\t }\n"
2375 "\t\t ],\n"
2376 "\t\t ],\n"
2377 "\t\tclasses =>\n"
2378 "\t\t [ \"list\", \"Classes\",\n"
2379 "\t\t [ \"hash\", \"Class\",\n"
2380 "\t\t {\n"
2381 "\t\t name => [ \"string\", \"Classname\" ]\n"
2382 "\t\t }\n"
2383 "\t\t ],\n"
2384 "\t\t ],\n"
2385 "\t\tnamespaces =>\n"
2386 "\t\t [ \"list\", \"Namespaces\",\n"
2387 "\t\t [ \"hash\", \"Namespace\",\n"
2388 "\t\t {\n"
2389 "\t\t name => [ \"string\", \"NamespaceName\" ]\n"
2390 "\t\t }\n"
2391 "\t\t ],\n"
2392 "\t\t ],\n"
2393 "\t\tpages =>\n"
2394 "\t\t [ \"list\", \"Pages\",\n"
2395 "\t\t [ \"hash\", \"Page\","
2396 "\t\t {\n"
2397 "\t\t title => [ \"string\", \"PageName\" ]\n"
2398 "\t\t }\n"
2399 "\t\t ],\n"
2400 "\t\t ],\n"
2401 "\t\tgroups =>\n"
2402 "\t\t [ \"list\", \"Groups\",\n"
2403 "\t\t [ \"hash\", \"Group\",\n"
2404 "\t\t {\n"
2405 "\t\t title => [ \"string\", \"GroupName\" ]\n"
2406 "\t\t }\n"
2407 "\t\t ],\n"
2408 "\t\t ],\n"
2409 "\t\tfunctions => memberlist(\"GroupFunction\"),\n"
2410 "\t\tdetailed =>\n"
2411 "\t\t [ \"hash\", \"GroupDetailed\",\n"
2412 "\t\t {\n"
2413 "\t\t doc => [ \"doc\", \"GroupDetailedDoc\" ],\n"
2414 "\t\t },\n"
2415 "\t\t ],\n"
2416 "\t }\n"
2417 "\t ],\n"
2418 "\t ],\n"
2419 " },\n"
2420 " ];\n"
2421 "\n"
2422 "1;\n";
2423
2424 return true;
2425}
2426
2428{
2429 std::ofstream doxyRulesStream;
2430 if (!createOutputFile(doxyRulesStream, pathDoxyRules))
2431 return false;
2432
2433 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2434 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2435
2436 doxyRulesStream <<
2437 prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
2438 prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
2439 prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" <<
2440 prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" <<
2441 prefix << "DOXYRULES = " << pathDoxyRules << "\n";
2442 if (perlmodLatex)
2443 doxyRulesStream <<
2444 prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" <<
2445 prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" <<
2446 prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" <<
2447 prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" <<
2448 prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" <<
2449 prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" <<
2450 prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" <<
2451 prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
2452
2453 doxyRulesStream <<
2454 "\n"
2455 ".PHONY: clean-perlmod\n"
2456 "clean-perlmod::\n"
2457 "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2458 "\t$(" << prefix << "DOXYDOCS_PM)";
2459 if (perlmodLatex)
2460 doxyRulesStream <<
2461 " \\\n"
2462 "\t$(" << prefix << "DOXYLATEX_PL) \\\n"
2463 "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2464 "\t$(" << prefix << "DOXYDOCS_TEX) \\\n"
2465 "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2466 "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2467 "\t$(" << prefix << "DOXYLATEX_TEX) \\\n"
2468 "\t$(" << prefix << "DOXYLATEX_PDF) \\\n"
2469 "\t$(" << prefix << "DOXYLATEX_DVI) \\\n"
2470 "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)";
2471 doxyRulesStream << "\n\n";
2472
2473 doxyRulesStream <<
2474 "$(" << prefix << "DOXYRULES) \\\n"
2475 "$(" << prefix << "DOXYMAKEFILE) \\\n"
2476 "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2477 "$(" << prefix << "DOXYDOCS_PM)";
2478 if (perlmodLatex) {
2479 doxyRulesStream <<
2480 " \\\n"
2481 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2482 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2483 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2484 "$(" << prefix << "DOXYLATEX_TEX)";
2485 }
2486 doxyRulesStream <<
2487 ": \\\n"
2488 "\t$(" << prefix << "DOXYFILE)\n"
2489 "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
2490
2491 if (perlmodLatex) {
2492 doxyRulesStream <<
2493 "\n"
2494 "$(" << prefix << "DOXYDOCS_TEX): \\\n"
2495 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2496 "$(" << prefix << "DOXYDOCS_PM)\n"
2497 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2498 "\n"
2499 "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n"
2500 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2501 "$(" << prefix << "DOXYSTRUCTURE_PM)\n"
2502 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2503 "\n"
2504 "$(" << prefix << "DOXYLATEX_PDF) \\\n"
2505 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2506 "$(" << prefix << "DOXYLATEX_TEX) \\\n"
2507 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2508 "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2509 "$(" << prefix << "DOXYDOCS_TEX)\n"
2510 "\n"
2511 "$(" << prefix << "DOXYLATEX_PDF): \\\n"
2512 "$(" << prefix << "DOXYLATEX_TEX)\n"
2513 "\tpdflatex -interaction=nonstopmode \"$<\"\n"
2514 "\n"
2515 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2516 "$(" << prefix << "DOXYLATEX_TEX)\n"
2517 "\tlatex -interaction=nonstopmode \"$<\"\n";
2518 }
2519
2520 return true;
2521}
2522
2524{
2525 std::ofstream makefileStream;
2526 if (!createOutputFile(makefileStream, pathMakefile))
2527 return false;
2528
2529 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2530 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2531
2532 makefileStream <<
2533 ".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n"
2534 "default: " << (perlmodLatex ? "pdf" : "clean") << "\n"
2535 "\n"
2536 "include " << pathDoxyRules << "\n"
2537 "\n"
2538 "clean: clean-perlmod\n";
2539
2540 if (perlmodLatex) {
2541 makefileStream <<
2542 "pdf: $(" << prefix << "DOXYLATEX_PDF)\n"
2543 "dvi: $(" << prefix << "DOXYLATEX_DVI)\n";
2544 }
2545
2546 return true;
2547}
2548
2550{
2551 std::ofstream doxyLatexStructurePLStream;
2552 if (!createOutputFile(doxyLatexStructurePLStream, pathDoxyLatexStructurePL))
2553 return false;
2554
2555 doxyLatexStructurePLStream <<
2556 "use DoxyStructure;\n"
2557 "\n"
2558 "sub process($) {\n"
2559 "\tmy $node = $_[0];\n"
2560 "\tmy ($type, $name) = @$node[0, 1];\n"
2561 "\tmy $command;\n"
2562 "\tif ($type eq \"string\") { $command = \"String\" }\n"
2563 "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
2564 "\telsif ($type eq \"hash\") {\n"
2565 "\t\t$command = \"Hash\";\n"
2566 "\t\tfor my $subnode (values %{$$node[2]}) {\n"
2567 "\t\t\tprocess($subnode);\n"
2568 "\t\t}\n"
2569 "\t}\n"
2570 "\telsif ($type eq \"list\") {\n"
2571 "\t\t$command = \"List\";\n"
2572 "\t\tprocess($$node[2]);\n"
2573 "\t}\n"
2574 "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
2575 "}\n"
2576 "\n"
2577 "process($doxystructure);\n";
2578
2579 return true;
2580}
2581
2583{
2584 std::ofstream doxyLatexPLStream;
2585 if (!createOutputFile(doxyLatexPLStream, pathDoxyLatexPL))
2586 return false;
2587
2588 doxyLatexPLStream <<
2589 "use DoxyStructure;\n"
2590 "use DoxyDocs;\n"
2591 "\n"
2592 "sub latex_quote($) {\n"
2593 "\tmy $text = $_[0];\n"
2594 "\t$text =~ s/\\\\/\\\\textbackslash /g;\n"
2595 "\t$text =~ s/\\|/\\\\textbar /g;\n"
2596 "\t$text =~ s/</\\\\textless /g;\n"
2597 "\t$text =~ s/>/\\\\textgreater /g;\n"
2598 "\t$text =~ s/~/\\\\textasciitilde /g;\n"
2599 "\t$text =~ s/\\^/\\\\textasciicircum /g;\n"
2600 "\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n"
2601 "\tprint $text;\n"
2602 "}\n"
2603 "\n"
2604 "sub generate_doc($) {\n"
2605 "\tmy $doc = $_[0];\n"
2606 "\tfor my $item (@$doc) {\n"
2607 "\t\tmy $type = $$item{type};\n"
2608 "\t\tif ($type eq \"text\") {\n"
2609 "\t\t\tlatex_quote($$item{content});\n"
2610 "\t\t} elsif ($type eq \"parbreak\") {\n"
2611 "\t\t\tprint \"\\n\\n\";\n"
2612 "\t\t} elsif ($type eq \"style\") {\n"
2613 "\t\t\tmy $style = $$item{style};\n"
2614 "\t\t\tif ($$item{enable} eq \"yes\") {\n"
2615 "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n"
2616 "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n"
2617 "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n"
2618 "\t\t\t} else {\n"
2619 "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n"
2620 "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n"
2621 "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n"
2622 "\t\t\t}\n"
2623 "\t\t\tprint '{}';\n"
2624 "\t\t} elsif ($type eq \"symbol\") {\n"
2625 "\t\t\tmy $symbol = $$item{symbol};\n"
2626 "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n"
2627 "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n"
2628 "\t\t\tprint '{}';\n"
2629 "\t\t} elsif ($type eq \"accent\") {\n"
2630 "\t\t\tmy ($accent) = $$item{accent};\n"
2631 "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n"
2632 "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n"
2633 "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n"
2634 "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n"
2635 "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n"
2636 "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n"
2637 "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n"
2638 "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n"
2639 "\t\t} elsif ($type eq \"list\") {\n"
2640 "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n"
2641 "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n"
2642 "\t\t \tfor my $subitem (@{$$item{content}}) {\n"
2643 "\t\t\t\tprint \"\\n\\\\item \";\n"
2644 "\t\t\t\tgenerate_doc($subitem);\n"
2645 "\t\t \t}\n"
2646 "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n"
2647 "\t\t} elsif ($type eq \"url\") {\n"
2648 "\t\t\tlatex_quote($$item{content});\n"
2649 "\t\t}\n"
2650 "\t}\n"
2651 "}\n"
2652 "\n"
2653 "sub generate($$) {\n"
2654 "\tmy ($item, $node) = @_;\n"
2655 "\tmy ($type, $name) = @$node[0, 1];\n"
2656 "\tif ($type eq \"string\") {\n"
2657 "\t\tprint \"\\\\\" . $name . \"{\";\n"
2658 "\t\tlatex_quote($item);\n"
2659 "\t\tprint \"}\";\n"
2660 "\t} elsif ($type eq \"doc\") {\n"
2661 "\t\tif (@$item) {\n"
2662 "\t\t\tprint \"\\\\\" . $name . \"{\";\n"
2663 "\t\t\tgenerate_doc($item);\n"
2664 "\t\t\tprint \"}%\\n\";\n"
2665 "\t\t} else {\n"
2666 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2667 "\t\t}\n"
2668 "\t} elsif ($type eq \"hash\") {\n"
2669 "\t\tmy ($key, $value);\n"
2670 "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n"
2671 "\t\t\tmy $subname = $$subnode[1];\n"
2672 "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n"
2673 "\t\t\tif ($$item{$key}) {\n"
2674 "\t\t\t\tgenerate($$item{$key}, $subnode);\n"
2675 "\t\t\t} else {\n"
2676 "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
2677 "\t\t\t}\n"
2678 "\t\t\tprint \"}%\\n\";\n"
2679 "\t\t}\n"
2680 "\t\tprint \"\\\\\" . $name . \"%\\n\";\n"
2681 "\t} elsif ($type eq \"list\") {\n"
2682 "\t\tmy $index = 0;\n"
2683 "\t\tif (@$item) {\n"
2684 "\t\t\tprint \"\\\\\" . $name . \"{%\\n\";\n"
2685 "\t\t\tfor my $subitem (@$item) {\n"
2686 "\t\t\t\tif ($index) {\n"
2687 "\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n"
2688 "\t\t\t\t}\n"
2689 "\t\t\t\tgenerate($subitem, $$node[2]);\n"
2690 "\t\t\t\t$index++;\n"
2691 "\t\t\t}\n"
2692 "\t\t\tprint \"}%\\n\";\n"
2693 "\t\t} else {\n"
2694 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2695 "\t\t}\n"
2696 "\t}\n"
2697 "}\n"
2698 "\n"
2699 "generate($doxydocs, $doxystructure);\n";
2700
2701 return true;
2702}
2703
2705{
2706 std::ofstream doxyFormatTexStream;
2707 if (!createOutputFile(doxyFormatTexStream, pathDoxyFormatTex))
2708 return false;
2709
2710 doxyFormatTexStream <<
2711 "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
2712 "\\Defcs{Empty}{}\n"
2713 "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n"
2714 "\n"
2715 "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n"
2716 "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n"
2717 "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n"
2718 "\\def\\HashNode#1{\\Defcs{#1}{}}\n"
2719 "\n"
2720 "\\input{" << pathDoxyStructureTex << "}\n"
2721 "\n"
2722 "\\newbox\\BoxA\n"
2723 "\\dimendef\\DimenA=151\\relax\n"
2724 "\\dimendef\\DimenB=152\\relax\n"
2725 "\\countdef\\ZoneDepth=151\\relax\n"
2726 "\n"
2727 "\\def\\Cs#1{\\csname#1\\endcsname}\n"
2728 "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n"
2729 "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n"
2730 "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n"
2731 "\n"
2732 "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n"
2733 "\\raggedright#1\\vskip 0.5mm\\relax} }}\n"
2734 "\n"
2735 "\\def\\Zone#1#2#3{%\n"
2736 "\\Defcs{Test#1}{#2}%\n"
2737 "\\Defcs{Emit#1}{#3}%\n"
2738 "\\Defcs{#1}{%\n"
2739 "\\advance\\ZoneDepth1\\relax\n"
2740 "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n"
2741 "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n"
2742 "\\Cs{Test#1}\n"
2743 "\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n"
2744 "\\advance\\ZoneDepth-1\\relax\n"
2745 "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2746 "\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n"
2747 "\\advance\\ZoneDepth1\\relax\n"
2748 "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n"
2749 "\\Cs{Emit#1}\n"
2750 "\\advance\\ZoneDepth-1\\relax\\fi\n"
2751 "\\advance\\ZoneDepth1\\relax\\fi\n"
2752 "\\advance\\ZoneDepth-1\\relax}}\n"
2753 "\n"
2754 "\\def\\Member#1#2{%\n"
2755 "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n"
2756 "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n"
2757 "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n"
2758 "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2759 "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n"
2760 "\n"
2761 "\\def\\TypedefMemberList#1#2{%\n"
2762 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2763 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2764 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2765 "%\n"
2766 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2767 "\\Member{#1}{\\Frame{typedef \\Cs{field#1Type} \\Cs{field#1Name}}%\n"
2768 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2769 "\n"
2770 "\\def\\VariableMemberList#1#2{%\n"
2771 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2772 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2773 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2774 "%\n"
2775 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2776 "\\Member{#1}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}}%\n"
2777 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2778 "\n"
2779 "\\def\\FunctionMemberList#1#2{%\n"
2780 "\\Defcs{#1PDParamName}##1{\\textit{##1}}%\n"
2781 "\\Defcs{#1PDParam}{\\Cs{field#1PDParamName}}%\n"
2782 "\\Defcs{#1PDParamsSep}{, }%\n"
2783 "\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n"
2784 "%\n"
2785 "\\Defcs{#1PDBlocks}##1{%\n"
2786 "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n"
2787 "\\DimenA0pt\\relax\n"
2788 "\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n"
2789 "\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n"
2790 "##1%\n"
2791 "\\advance\\DimenA3mm\\relax\n"
2792 "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n"
2793 "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n"
2794 "\\Cs{field#1PDParams}}\\hfill\n"
2795 "\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n"
2796 "##1}\n"
2797 "\n"
2798 "\\Defcs{#1ParamName}##1{\\textit{##1}}\n"
2799 "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n"
2800 "\\Defcs{#1ParamsSep}{, }\n"
2801 "\n"
2802 "\\Defcs{#1Name}##1{\\textbf{##1}}\n"
2803 "\\Defcs{#1See}##1{\\See{##1}}\n"
2804 "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n"
2805 "\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n"
2806 "%\n"
2807 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2808 "\\Member{#1}{%\n"
2809 "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n"
2810 "\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n"
2811 "\n"
2812 "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n"
2813 "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n"
2814 "\n"
2815 "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n"
2816 "\n"
2817 "\\def\\ClassSubzones{%\n"
2818 "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n"
2819 "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n"
2820 "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n"
2821 "\n"
2822 "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n"
2823 "\n"
2824 "\\TypedefMemberList{FileTypedef}{Typedefs}\n"
2825 "\\VariableMemberList{FileVariable}{Variables}\n"
2826 "\\FunctionMemberList{FileFunction}{Functions}\n"
2827 "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n"
2828 "\n"
2829 "\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n"
2830 "\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n"
2831 "\\TypedefMemberList{ClassPrivateTypedef}{Private Typedefs}\n"
2832 "\\VariableMemberList{ClassPublicMember}{Public Members}\n"
2833 "\\VariableMemberList{ClassProtectedMember}{Protected Members}\n"
2834 "\\VariableMemberList{ClassPrivateMember}{Private Members}\n"
2835 "\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n"
2836 "\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n"
2837 "\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n"
2838 "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n"
2839 "\n"
2840 "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n"
2841 "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n"
2842 "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n"
2843 "\n"
2844 "\\newlength{\\oldparskip}\n"
2845 "\\newlength{\\oldparindent}\n"
2846 "\\newlength{\\oldfboxrule}\n"
2847 "\n"
2848 "\\ZoneDepth0\\relax\n"
2849 "\\Letcs{Mode0}1\\relax\n"
2850 "\n"
2851 "\\def\\EmitDoxyDocs{%\n"
2852 "\\setlength{\\oldparskip}{\\parskip}\n"
2853 "\\setlength{\\oldparindent}{\\parindent}\n"
2854 "\\setlength{\\oldfboxrule}{\\fboxrule}\n"
2855 "\\setlength{\\parskip}{0cm}\n"
2856 "\\setlength{\\parindent}{0cm}\n"
2857 "\\setlength{\\fboxrule}{1pt}\n"
2858 "\\AllPages\\AllFiles\\AllClasses\n"
2859 "\\setlength{\\parskip}{\\oldparskip}\n"
2860 "\\setlength{\\parindent}{\\oldparindent}\n"
2861 "\\setlength{\\fboxrule}{\\oldfboxrule}}\n";
2862
2863 return true;
2864}
2865
2867{
2868 std::ofstream doxyLatexTexStream;
2869 if (!createOutputFile(doxyLatexTexStream, pathDoxyLatexTex))
2870 return false;
2871
2872 doxyLatexTexStream <<
2873 "\\documentclass[a4paper,12pt]{article}\n"
2874 "\\usepackage[latin1]{inputenc}\n"
2875 "\\usepackage[none]{hyphenat}\n"
2876 "\\usepackage[T1]{fontenc}\n"
2877 "\\usepackage{hyperref}\n"
2878 "\\usepackage{times}\n"
2879 "\n"
2880 "\\input{doxyformat}\n"
2881 "\n"
2882 "\\begin{document}\n"
2883 "\\input{" << pathDoxyDocsTex << "}\n"
2884 "\\sloppy\n"
2885 "\\EmitDoxyDocs\n"
2886 "\\end{document}\n";
2887
2888 return true;
2889}
2890
2892{
2893 // + classes
2894 // + namespaces
2895 // + files
2896 // - packages
2897 // + groups
2898 // + related pages
2899 // - examples
2900
2901 Dir perlModDir;
2902 if (!createOutputDir(perlModDir))
2903 return;
2904
2905 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2906
2907 QCString perlModAbsPath = perlModDir.absPath();
2908 pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
2909 pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
2910 pathMakefile = perlModAbsPath + "/Makefile";
2911 pathDoxyRules = perlModAbsPath + "/doxyrules.make";
2912
2913 if (perlmodLatex) {
2914 pathDoxyStructureTex = perlModAbsPath + "/doxystructure.tex";
2915 pathDoxyFormatTex = perlModAbsPath + "/doxyformat.tex";
2916 pathDoxyLatexTex = perlModAbsPath + "/doxylatex.tex";
2917 pathDoxyLatexDVI = perlModAbsPath + "/doxylatex.dvi";
2918 pathDoxyLatexPDF = perlModAbsPath + "/doxylatex.pdf";
2919 pathDoxyDocsTex = perlModAbsPath + "/doxydocs.tex";
2920 pathDoxyLatexPL = perlModAbsPath + "/doxylatex.pl";
2921 pathDoxyLatexStructurePL = perlModAbsPath + "/doxylatex-structure.pl";
2922 }
2923
2924 if (!(generatePerlModOutput()
2926 && generateMakefile()
2927 && generateDoxyRules()))
2928 return;
2929
2930 if (perlmodLatex) {
2935 return;
2936 }
2937}
2938
2940{
2941 PerlModGenerator pmg(Config_getBool(PERLMOD_PRETTY));
2942 pmg.generate();
2943}
2944
2945// Local Variables:
2946// c-basic-offset: 2
2947// End:
2948
2949/* This elisp function for XEmacs makes Control-Z transform
2950 the text in the region into a valid C string.
2951
2952 (global-set-key '(control z) (lambda () (interactive)
2953 (save-excursion
2954 (if (< (mark) (point)) (exchange-point-and-mark))
2955 (let ((start (point)) (replacers
2956 '(("\\\\" "\\\\\\\\")
2957 ("\"" "\\\\\"")
2958 ("\t" "\\\\t")
2959 ("^.*$" "\"\\&\\\\n\""))))
2960 (while replacers
2961 (while (re-search-forward (caar replacers) (mark) t)
2962 (replace-match (cadar replacers) t))
2963 (goto-char start)
2964 (setq replacers (cdr replacers)))))))
2965*/
constexpr auto prefix
Definition anchor.cpp:44
This class represents an function or template argument list.
Definition arguments.h:65
iterator end()
Definition arguments.h:94
bool hasParameters() const
Definition arguments.h:76
bool constSpecifier() const
Definition arguments.h:111
bool empty() const
Definition arguments.h:99
iterator begin()
Definition arguments.h:93
bool volatileSpecifier() const
Definition arguments.h:112
A abstract class representing of a compound symbol.
Definition classdef.h:104
virtual const ArgumentList & templateArguments() const =0
Returns the template arguments of this class.
virtual QCString compoundTypeString() const =0
Returns the type of compound as a string.
virtual const BaseClassList & baseClasses() const =0
Returns the list of base classes from which this class directly inherits.
virtual MemberList * getMemberList(MemberListType lt) const =0
Returns the members in the list identified by lt.
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual bool isImplicitTemplateInstance() const =0
virtual const MemberGroupList & getMemberGroups() const =0
Returns the member groups defined for this class.
virtual ClassLinkedRefMap getClasses() const =0
returns the classes nested into this class
virtual const IncludeInfo * includeInfo() const =0
virtual const BaseClassList & subClasses() const =0
Returns the list of sub classes that directly derive from this class.
virtual QCString initializer() const =0
virtual ArgumentList getTemplateParameterList() const =0
virtual const IncludeInfo * includeInfo() const =0
The common base class of all entity definitions found in the sources.
Definition definition.h:76
virtual QCString docFile() const =0
virtual int getEndBodyLine() const =0
virtual SrcLangExt getLanguage() const =0
Returns the programming language this definition was written in.
virtual int docLine() const =0
virtual QCString getDefFileName() const =0
virtual int getDefLine() const =0
virtual QCString briefDescription(bool abbreviate=FALSE) const =0
virtual bool isAnonymous() const =0
virtual QCString documentation() const =0
virtual Definition * getOuterScope() const =0
virtual int getStartBodyLine() const =0
virtual bool isReference() const =0
virtual const QCString & name() const =0
Class representing a directory in the file system.
Definition dir.h:75
static std::string currentDirPath()
Definition dir.cpp:340
std::string absPath() const
Definition dir.cpp:363
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:295
void setPath(const std::string &path)
Definition dir.cpp:229
bool exists() const
Definition dir.cpp:257
Node representing an anchor.
Definition docnode.h:228
QCString anchor() const
Definition docnode.h:231
QCString file() const
Definition docnode.h:232
Node representing an auto List.
Definition docnode.h: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:2038
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
Definition linkedmap.h:47
bool empty() const
Definition linkedmap.h:374
A model of a class/file/namespace member symbol.
Definition memberdef.h:48
virtual QCString typeString() const =0
virtual QCString enumBaseType() const =0
virtual QCString excpString() const =0
virtual const ClassDef * getClassDef() const =0
virtual const MemberVector & enumFieldList() const =0
virtual const ArgumentList & argumentList() const =0
virtual const MemberVector & reimplementedBy() const =0
virtual bool isStatic() const =0
virtual const MemberDef * reimplements() const =0
virtual QCString bitfieldString() const =0
virtual Protection protection() const =0
virtual MemberType memberType() const =0
virtual QCString argsString() const =0
virtual Specifier virtualness(int count=0) const =0
virtual const ArgumentList & declArgumentList() const =0
virtual const QCString & initializer() const =0
A list of MemberDef objects as shown in documentation sections.
Definition memberlist.h:109
A vector of MemberDef object.
Definition memberlist.h:35
bool empty() const noexcept
Definition memberlist.h:60
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual const MemberGroupList & getMemberGroups() const =0
virtual FileList getUsedFiles() const =0
virtual const ConceptLinkedRefMap & getConcepts() const =0
virtual const ClassLinkedRefMap & getClasses() const =0
static ModuleManager & instance()
An abstract interface of a namespace symbol.
virtual MemberList * getMemberList(MemberListType lt) const =0
virtual NamespaceLinkedRefMap getNamespaces() const =0
virtual ClassLinkedRefMap getClasses() const =0
virtual const MemberGroupList & getMemberGroups() const =0
A model of a page symbol.
Definition pagedef.h:26
Concrete visitor implementation for PerlMod output.
PerlModDocVisitor(PerlModOutput &)
void openItem(const QCString &)
void visitChildren(const T &t)
void addLink(const QCString &ref, const QCString &file, const QCString &anchor)
PerlModOutput & m_output
void singleItem(const QCString &)
void openSubBlock(const QCString &=QCString())
void operator()(const DocWord &)
void generatePerlModForPage(PageDef *pi)
PerlModOutput m_output
void generatePerlModForMember(const MemberDef *md, const Definition *)
bool generateDoxyFormatTex()
QCString pathDoxyLatexPL
QCString pathDoxyStructureTex
bool generateDoxyLatexTex()
bool createOutputDir(Dir &perlModDir)
QCString pathDoxyDocsPM
void generatePerlModSection(const Definition *d, MemberList *ml, const QCString &name, const QCString &header=QCString())
QCString pathDoxyStructurePM
void generatePerlModForClass(const ClassDef *cd)
QCString pathDoxyLatexDVI
bool generatePerlModOutput()
void generatePerlModForModule(const ModuleDef *mod)
QCString pathDoxyDocsTex
void generatePerlModForNamespace(const NamespaceDef *nd)
PerlModGenerator(bool pretty)
void addIncludeInfo(const IncludeInfo *ii)
void addListOfAllMembers(const ClassDef *cd)
QCString pathDoxyLatexStructurePL
bool generateDoxyStructurePM()
void generatePerlModForGroup(const GroupDef *gd)
void generatePerlModForFile(const FileDef *fd)
QCString pathDoxyFormatTex
QCString pathDoxyLatexPDF
bool createOutputFile(std::ofstream &f, const QCString &s)
void generatePerlModForConcept(const ConceptDef *cd)
bool generateDoxyLatexStructurePL()
QCString pathDoxyLatexTex
void generatePerlUserDefinedSection(const Definition *d, const MemberGroupList &mgl)
PerlModOutput & closeList()
PerlModOutput & add(char c)
void iaddFieldQuotedString(const QCString &, const QCString &)
char m_spaces[PERLOUTPUT_MAX_INDENTATION *2+2]
virtual ~PerlModOutput()
PerlModOutput(bool pretty)
PerlModOutput & add(QCString &s)
PerlModOutput & open(char c, const QCString &s=QCString())
PerlModOutput & addFieldQuotedChar(const QCString &field, char content)
PerlModOutputStream * m_stream
PerlModOutput & continueBlock()
PerlModOutput & addField(const QCString &s)
void iopen(char, const QCString &)
PerlModOutput & openHash(const QCString &s=QCString())
PerlModOutput & addFieldQuotedString(const QCString &field, const QCString &content)
PerlModOutput & add(int n)
PerlModOutput & openList(const QCString &s=QCString())
void setPerlModOutputStream(PerlModOutputStream *os)
PerlModOutput & close(char c=0)
PerlModOutput & closeHash()
PerlModOutput & addQuoted(const QCString &s)
void iclose(char)
PerlModOutput & add(const QCString &s)
void iaddFieldQuotedChar(const QCString &, char)
PerlModOutput & addFieldBoolean(const QCString &field, bool content)
void iaddQuoted(const QCString &)
void iaddField(const QCString &)
PerlModOutput & indent()
PerlModOutput & add(unsigned int n)
std::ostream * m_t
PerlModOutputStream(std::ostream &t)
This is an alternative implementation of QCString.
Definition qcstring.h:101
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
QCString mid(size_t index, size_t len=static_cast< size_t >(-1)) const
Definition qcstring.h:226
char & at(size_t i)
Returns a reference to the character at index i.
Definition qcstring.h:578
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
QCString stripWhiteSpace() const
returns a copy of this string with leading and trailing whitespace removed
Definition qcstring.h:245
QCString & setNum(short n)
Definition qcstring.h:444
QCString right(size_t len) const
Definition qcstring.h:219
QCString & sprintf(const char *format,...)
Definition qcstring.cpp:29
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91
const char * data() const
Returns a pointer to the contents of the string in the form of a 0-terminated C string.
Definition qcstring.h:159
class that provide information about a section.
Definition section.h:57
QCString title() const
Definition section.h:69
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:175
#define Config_getBool(name)
Definition config.h:33
#define Config_getString(name)
Definition config.h:32
#define NON_COPYABLE(cls)
Macro to help implementing the rule of 5 for a non-copyable & movable class.
Definition construct.h:37
IDocParserPtr createDocParser()
factory function to create a parser
Definition docparser.cpp:55
IDocNodeASTPtr validatingParseDoc(IDocParser &parserIntf, const QCString &fileName, int startLine, const Definition *ctx, const MemberDef *md, const QCString &input, bool indexWords, bool isExample, const QCString &exampleName, bool singleLine, bool linkFromIndex, bool markdownSupport)
@ ImportLocal
Definition filedef.h:54
@ IncludeLocal
Definition filedef.h:50
#define err(fmt,...)
Definition message.h:127
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
static void addTemplateArgumentList(const ArgumentList &al, PerlModOutput &output, const QCString &)
void generatePerlMod()
static const char * getVirtualnessName(Specifier virt)
static void addTemplateList(const ClassDef *cd, PerlModOutput &output)
static const char * getProtectionName(Protection prot)
static void addPerlModDocBlock(PerlModOutput &output, const QCString &name, const QCString &fileName, int lineNr, const Definition *scope, const MemberDef *md, const QCString &text)
static QCString pathDoxyExec
void setPerlModDoxyfile(const QCString &qs)
static QCString pathDoxyfile
#define PERLOUTPUT_MAX_INDENTATION
Portable versions of functions that are platform dependent.
const char * qPrint(const char *s)
Definition qcstring.h:672
#define TRUE
Definition qcstring.h:37
#define FALSE
Definition qcstring.h:34
This class contains the information about the argument of a function or template.
Definition arguments.h:27
QCString type
Definition arguments.h:42
QCString name
Definition arguments.h:44
Class representing the data associated with a #include statement.
Definition filedef.h:75
QCString includeName
Definition filedef.h:80
IncludeKind kind
Definition filedef.h:81
const FileDef * fileDef
Definition filedef.h:79
@ Enumeration
Definition types.h:557
@ EnumValue
Definition types.h:558
@ Dictionary
Definition types.h:568
@ Interface
Definition types.h:565
@ Sequence
Definition types.h:567
@ Variable
Definition types.h:555
@ Property
Definition types.h:563
@ Typedef
Definition types.h:556
@ Function
Definition types.h:554
@ Service
Definition types.h:566
Protection
Definition types.h:32
Specifier
Definition types.h:80
static const char * to_string_lower(Protection prot)
Definition types.h:50
std::string_view word
Definition util.cpp:980
QCString filterTitle(const QCString &title)
Definition util.cpp:6086
A bunch of utility functions.