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