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