Doxygen
Loading...
Searching...
No Matches
PerlModDocVisitor Class Reference

Concrete visitor implementation for PerlMod output. More...

+ Inheritance diagram for PerlModDocVisitor:
+ Collaboration diagram for PerlModDocVisitor:

Public Member Functions

 PerlModDocVisitor (PerlModOutput &)
 
void finish ()
 
void operator() (const DocWord &)
 
void operator() (const DocLinkedWord &)
 
void operator() (const DocWhiteSpace &)
 
void operator() (const DocSymbol &)
 
void operator() (const DocEmoji &)
 
void operator() (const DocURL &)
 
void operator() (const DocLineBreak &)
 
void operator() (const DocHorRuler &)
 
void operator() (const DocStyleChange &)
 
void operator() (const DocVerbatim &)
 
void operator() (const DocAnchor &)
 
void operator() (const DocInclude &)
 
void operator() (const DocIncOperator &)
 
void operator() (const DocFormula &)
 
void operator() (const DocIndexEntry &)
 
void operator() (const DocSimpleSectSep &)
 
void operator() (const DocCite &)
 
void operator() (const DocSeparator &)
 
void operator() (const DocAutoList &)
 
void operator() (const DocAutoListItem &)
 
void operator() (const DocPara &)
 
void operator() (const DocRoot &)
 
void operator() (const DocSimpleSect &)
 
void operator() (const DocTitle &)
 
void operator() (const DocSimpleList &)
 
void operator() (const DocSimpleListItem &)
 
void operator() (const DocSection &)
 
void operator() (const DocHtmlList &)
 
void operator() (const DocHtmlListItem &)
 
void operator() (const DocHtmlDescList &)
 
void operator() (const DocHtmlDescTitle &)
 
void operator() (const DocHtmlDescData &)
 
void operator() (const DocHtmlTable &)
 
void operator() (const DocHtmlRow &)
 
void operator() (const DocHtmlCell &)
 
void operator() (const DocHtmlCaption &)
 
void operator() (const DocInternal &)
 
void operator() (const DocHRef &)
 
void operator() (const DocHtmlSummary &)
 
void operator() (const DocHtmlDetails &)
 
void operator() (const DocHtmlHeader &)
 
void operator() (const DocImage &)
 
void operator() (const DocDotFile &)
 
void operator() (const DocMscFile &)
 
void operator() (const DocDiaFile &)
 
void operator() (const DocPlantUmlFile &)
 
void operator() (const DocLink &)
 
void operator() (const DocRef &)
 
void operator() (const DocSecRefItem &)
 
void operator() (const DocSecRefList &)
 
void operator() (const DocParamSect &)
 
void operator() (const DocParamList &)
 
void operator() (const DocXRefItem &)
 
void operator() (const DocInternalRef &)
 
void operator() (const DocText &)
 
void operator() (const DocHtmlBlockQuote &)
 
void operator() (const DocVhdlFlow &)
 
void operator() (const DocParBlock &)
 
- Public Member Functions inherited from DocVisitor
 DocVisitor ()
 
virtual ~DocVisitor ()
 
CodeParserInterfacegetCodeParser (const QCString &langExt)
 
void pushHidden (bool hide)
 
bool popHidden ()
 

Private Member Functions

template<class T>
void visitChildren (const T &t)
 
void addLink (const QCString &ref, const QCString &file, const QCString &anchor)
 
void enterText ()
 
void leaveText ()
 
void openItem (const QCString &)
 
void closeItem ()
 
void singleItem (const QCString &)
 
void openSubBlock (const QCString &=QCString())
 
void closeSubBlock ()
 

Private Attributes

PerlModOutputm_output
 
bool m_textmode
 
bool m_textblockstart
 
QCString m_other
 

Detailed Description

Concrete visitor implementation for PerlMod output.

Definition at line 270 of file perlmodgen.cpp.

Constructor & Destructor Documentation

◆ PerlModDocVisitor()

PerlModDocVisitor::PerlModDocVisitor ( PerlModOutput & output)

Definition at line 381 of file perlmodgen.cpp.

382 : m_output(output), m_textmode(false), m_textblockstart(FALSE)
383{
384 m_output.openList("doc");
385}
PerlModOutput & m_output
#define FALSE
Definition qcstring.h:34

References FALSE, m_output, m_textblockstart, and m_textmode.

Member Function Documentation

◆ addLink()

void PerlModDocVisitor::addLink ( const QCString & ref,
const QCString & file,
const QCString & anchor )
private

Definition at line 394 of file perlmodgen.cpp.

395{
396 QCString link = file;
397 if (!anchor.isEmpty())
398 (link += "_1") += anchor;
399 m_output.addFieldQuotedString("link", link);
400}
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150

References QCString::isEmpty(), and m_output.

Referenced by operator()(), operator()(), and operator()().

◆ closeItem()

◆ closeSubBlock()

void PerlModDocVisitor::closeSubBlock ( )
private

◆ enterText()

void PerlModDocVisitor::enterText ( )
private

Definition at line 414 of file perlmodgen.cpp.

415{
416 if (m_textmode)
417 return;
418 openItem("text");
419 m_output.addField("content").add('\'');
420 m_textmode = true;
421}
void openItem(const QCString &)

References m_output, m_textmode, and openItem().

Referenced by operator()(), operator()(), operator()(), and operator()().

◆ finish()

void PerlModDocVisitor::finish ( )

Definition at line 387 of file perlmodgen.cpp.

388{
389 leaveText();
390 m_output.closeList()
391 .add(m_other);
392}

References leaveText(), m_other, and m_output.

Referenced by addPerlModDocBlock().

◆ leaveText()

void PerlModDocVisitor::leaveText ( )
private

Definition at line 423 of file perlmodgen.cpp.

424{
425 if (!m_textmode)
426 return;
427 m_textmode = false;
429 .add('\'')
430 .closeHash();
431}

References m_output, and m_textmode.

Referenced by closeItem(), closeSubBlock(), finish(), openItem(), openSubBlock(), operator()(), operator()(), operator()(), and operator()().

◆ openItem()

void PerlModDocVisitor::openItem ( const QCString & name)
private

◆ openSubBlock()

void PerlModDocVisitor::openSubBlock ( const QCString & s = QCString())
private

◆ operator()() [1/58]

void PerlModDocVisitor::operator() ( const DocAnchor & anc)

Definition at line 660 of file perlmodgen.cpp.

661{
662 QCString anchor = anc.file() + "_1" + anc.anchor();
663 openItem("anchor");
664 m_output.addFieldQuotedString("id", anchor);
665 closeItem();
666}
QCString anchor() const
Definition docnode.h:231
QCString file() const
Definition docnode.h:232

References DocAnchor::anchor(), closeItem(), DocAnchor::file(), m_output, and openItem().

◆ operator()() [2/58]

void PerlModDocVisitor::operator() ( const DocAutoList & l)

Definition at line 755 of file perlmodgen.cpp.

756{
757 openItem("list");
758 m_output.addFieldQuotedString("style", l.isEnumList() ? "ordered" : (l.isCheckedList() ? "check" :"itemized"));
759 openSubBlock("content");
760 visitChildren(l);
762 closeItem();
763}
bool isCheckedList() const
Definition docnode.h:577
bool isEnumList() const
Definition docnode.h:575
void visitChildren(const T &t)
void openSubBlock(const QCString &=QCString())

References closeItem(), closeSubBlock(), DocAutoList::isCheckedList(), DocAutoList::isEnumList(), m_output, openItem(), openSubBlock(), and visitChildren().

◆ operator()() [3/58]

void PerlModDocVisitor::operator() ( const DocAutoListItem & li)

Definition at line 765 of file perlmodgen.cpp.

766{
767 openSubBlock();
768 switch (li.itemNumber())
769 {
770 case DocAutoList::Unchecked: // unchecked
771 m_output.addFieldQuotedString("style", "Unchecked");
772 break;
773 case DocAutoList::Checked_x: // checked with x
774 case DocAutoList::Checked_X: // checked with X
775 m_output.addFieldQuotedString("style", "Checked");
776 break;
777 default:
778 break;
779 }
780 visitChildren(li);
782}
int itemNumber() const
Definition docnode.h:593

References DocAutoList::Checked_X, DocAutoList::Checked_x, closeSubBlock(), DocAutoListItem::itemNumber(), m_output, openSubBlock(), DocAutoList::Unchecked, and visitChildren().

◆ operator()() [4/58]

void PerlModDocVisitor::operator() ( const DocCite & cite)

Definition at line 743 of file perlmodgen.cpp.

744{
745 openItem("cite");
746 m_output.addFieldQuotedString("text", cite.text());
747 closeItem();
748}
QCString text() const
Definition docnode.h:251

References closeItem(), m_output, openItem(), and DocCite::text().

◆ operator()() [5/58]

void PerlModDocVisitor::operator() ( const DocDiaFile & df)

Definition at line 1124 of file perlmodgen.cpp.

1125{
1126#if 0
1127 m_output.add("<diafile name=\""); m_output.add(df->file()); m_output.add("\">");
1128#endif
1129 visitChildren(df);
1130#if 0
1131 m_output.add("</diafile>");
1132#endif
1133}
QCString file() const
Definition docnode.h:679

References DocDiagramFileBase::file(), m_output, and visitChildren().

◆ operator()() [6/58]

void PerlModDocVisitor::operator() ( const DocDotFile & df)

Definition at line 1103 of file perlmodgen.cpp.

1104{
1105#if 0
1106 m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
1107#endif
1108 visitChildren(df);
1109#if 0
1110 m_output.add("</dotfile>");
1111#endif
1112}

References DocDiagramFileBase::file(), m_output, and visitChildren().

◆ operator()() [7/58]

void PerlModDocVisitor::operator() ( const DocEmoji & sy)

Definition at line 564 of file perlmodgen.cpp.

565{
566 enterText();
567 const char *name = EmojiEntityMapper::instance().name(sy.index());
568 if (name)
569 {
570 m_output.add(name);
571 }
572 else
573 {
574 m_output.add(sy.name());
575 }
576}
int index() const
Definition docnode.h:340
QCString name() const
Definition docnode.h:339
const char * name(int index) const
Access routine to the name of the Emoji entity.
Definition emoji.cpp:2026
static EmojiEntityMapper & instance()
Returns the one and only instance of the Emoji entity mapper.
Definition emoji.cpp:1978

References enterText(), DocEmoji::index(), EmojiEntityMapper::instance(), m_output, DocEmoji::name(), and EmojiEntityMapper::name().

◆ operator()() [8/58]

void PerlModDocVisitor::operator() ( const DocFormula & f)

Definition at line 718 of file perlmodgen.cpp.

719{
720 openItem("formula");
721 QCString id;
722 id += QCString().setNum(f.id());
723 m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f.text());
724 closeItem();
725}
QCString text() const
Definition docnode.h:528
int id() const
Definition docnode.h:530

References closeItem(), DocFormula::id(), m_output, openItem(), QCString::setNum(), and DocFormula::text().

◆ operator()() [9/58]

void PerlModDocVisitor::operator() ( const DocHorRuler & )

Definition at line 590 of file perlmodgen.cpp.

591{
592 singleItem("hruler");
593}
void singleItem(const QCString &)

References singleItem().

◆ operator()() [10/58]

void PerlModDocVisitor::operator() ( const DocHRef & href)

Definition at line 1019 of file perlmodgen.cpp.

1020{
1021#if 0
1022 m_output.add("<ulink url=\""); m_output.add(href.url()); m_output.add("\">");
1023#endif
1024 visitChildren(href);
1025#if 0
1026 m_output.add("</ulink>");
1027#endif
1028}
QCString url() const
Definition docnode.h:824

References m_output, DocHRef::url(), and visitChildren().

◆ operator()() [11/58]

void PerlModDocVisitor::operator() ( const DocHtmlBlockQuote & q)

Definition at line 1308 of file perlmodgen.cpp.

1309{
1310 openItem("blockquote");
1311 openSubBlock("content");
1312 visitChildren(q);
1313 closeSubBlock();
1314 closeItem();
1315}

References closeItem(), closeSubBlock(), openItem(), openSubBlock(), and visitChildren().

◆ operator()() [12/58]

void PerlModDocVisitor::operator() ( const DocHtmlCaption & c)

Definition at line 997 of file perlmodgen.cpp.

998{
999#if 0
1000 m_output.add("<caption>");
1001#endif
1002 visitChildren(c);
1003#if 0
1004 m_output.add("</caption>\n");
1005#endif
1006}

References m_output, and visitChildren().

◆ operator()() [13/58]

void PerlModDocVisitor::operator() ( const DocHtmlCell & c)

Definition at line 986 of file perlmodgen.cpp.

987{
988#if 0
989 if (c.isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
990#endif
991 visitChildren(c);
992#if 0
993 m_output.add("</entry>");
994#endif
995}
bool isHeading() const
Definition docnode.h:1194

References DocHtmlCell::isHeading(), m_output, and visitChildren().

◆ operator()() [14/58]

void PerlModDocVisitor::operator() ( const DocHtmlDescData & dd)

Definition at line 948 of file perlmodgen.cpp.

949{
950#if 0
951 m_output.add("<listitem>");
952#endif
953 visitChildren(dd);
954#if 0
955 m_output.add("</listitem>\n");
956#endif
957}

References m_output, and visitChildren().

◆ operator()() [15/58]

void PerlModDocVisitor::operator() ( const DocHtmlDescList & dl)

Definition at line 926 of file perlmodgen.cpp.

927{
928#if 0
929 m_output.add("<variablelist>\n");
930#endif
931 visitChildren(dl);
932#if 0
933 m_output.add("</variablelist>\n");
934#endif
935}

References m_output, and visitChildren().

◆ operator()() [16/58]

void PerlModDocVisitor::operator() ( const DocHtmlDescTitle & dt)

Definition at line 937 of file perlmodgen.cpp.

938{
939#if 0
940 m_output.add("<varlistentry><term>");
941#endif
942 visitChildren(dt);
943#if 0
944 m_output.add("</term></varlistentry>\n");
945#endif
946}

References m_output, and visitChildren().

◆ operator()() [17/58]

void PerlModDocVisitor::operator() ( const DocHtmlDetails & details)

Definition at line 1039 of file perlmodgen.cpp.

1040{
1041 openItem("details");
1042 auto summary = details.summary();
1043 if (summary)
1044 {
1045 std::visit(*this,*summary);
1046 }
1047 openSubBlock("content");
1048 visitChildren(details);
1049 closeSubBlock();
1050 closeItem();
1051}
const DocNodeVariant * summary() const
Definition docnode.h:858

References closeItem(), closeSubBlock(), openItem(), openSubBlock(), and visitChildren().

◆ operator()() [18/58]

void PerlModDocVisitor::operator() ( const DocHtmlHeader & header)

Definition at line 1053 of file perlmodgen.cpp.

1054{
1055#if 0
1056 m_output.add("<sect"); m_output.add(header.level()); m_output.add(">");
1057#endif
1058 visitChildren(header);
1059#if 0
1060 m_output.add("</sect"); m_output.add(header.level()); m_output.add(">\n");
1061#endif
1062}
int level() const
Definition docnode.h:871

References DocHtmlHeader::level(), m_output, and visitChildren().

◆ operator()() [19/58]

void PerlModDocVisitor::operator() ( const DocHtmlList & l)

Definition at line 891 of file perlmodgen.cpp.

892{
893 openItem("list");
894 m_output.addFieldQuotedString("style", (l.type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
895 for (const auto &opt : l.attribs())
896 {
897 if (opt.name=="type")
898 {
899 m_output.addFieldQuotedString("list_type", qPrint(opt.value));
900 }
901 if (opt.name=="start")
902 {
903 m_output.addFieldQuotedString("start", qPrint(opt.value));
904 }
905 }
906 openSubBlock("content");
907 visitChildren(l);
909 closeItem();
910}
const HtmlAttribList & attribs() const
Definition docnode.h:1000
Type type() const
Definition docnode.h:999
const char * qPrint(const char *s)
Definition qcstring.h:672

References DocHtmlList::attribs(), closeItem(), closeSubBlock(), m_output, openItem(), openSubBlock(), DocHtmlList::Ordered, qPrint(), DocHtmlList::type(), and visitChildren().

◆ operator()() [20/58]

void PerlModDocVisitor::operator() ( const DocHtmlListItem & l)

Definition at line 912 of file perlmodgen.cpp.

913{
914 for (const auto &opt : l.attribs())
915 {
916 if (opt.name=="value")
917 {
918 m_output.addFieldQuotedString("item_value", qPrint(opt.value));
919 }
920 }
921 openSubBlock();
922 visitChildren(l);
924}
const HtmlAttribList & attribs() const
Definition docnode.h:1164

References DocHtmlListItem::attribs(), closeSubBlock(), m_output, openSubBlock(), qPrint(), and visitChildren().

◆ operator()() [21/58]

void PerlModDocVisitor::operator() ( const DocHtmlRow & r)

Definition at line 975 of file perlmodgen.cpp.

976{
977#if 0
978 m_output.add("<row>\n");
979#endif
980 visitChildren(r);
981#if 0
982 m_output.add("</row>\n");
983#endif
984}

References m_output, and visitChildren().

◆ operator()() [22/58]

void PerlModDocVisitor::operator() ( const DocHtmlSummary & summary)

Definition at line 1030 of file perlmodgen.cpp.

1031{
1032 openItem("summary");
1033 openSubBlock("content");
1034 visitChildren(summary);
1035 closeSubBlock();
1036 closeItem();
1037}

References closeItem(), closeSubBlock(), openItem(), openSubBlock(), and visitChildren().

◆ operator()() [23/58]

void PerlModDocVisitor::operator() ( const DocHtmlTable & t)

Definition at line 959 of file perlmodgen.cpp.

960{
961#if 0
962 m_output.add("<table rows=\""); m_output.add(t.numRows());
963 m_output.add("\" cols=\""); m_output.add(t.numCols()); m_output.add("\">");
964#endif
965 if (t.caption())
966 {
967 std::visit(*this,*t.caption());
968 }
969 visitChildren(t);
970#if 0
971 m_output.add("</table>\n");
972#endif
973}
size_t numRows() const
Definition docnode.h:1267
const DocNodeVariant * caption() const
Definition docnode.cpp:2029

References DocHtmlTable::caption(), m_output, DocHtmlTable::numRows(), and visitChildren().

◆ operator()() [24/58]

void PerlModDocVisitor::operator() ( const DocImage & img)

Definition at line 1064 of file perlmodgen.cpp.

1065{
1066#if 0
1067 m_output.add("<image type=\"");
1068 switch(img.type())
1069 {
1070 case DocImage::Html: m_output.add("html"); break;
1071 case DocImage::Latex: m_output.add("latex"); break;
1072 case DocImage::Rtf: m_output.add("rtf"); break;
1073 }
1074 m_output.add("\"");
1075
1076 QCString baseName=img.name();
1077 int i;
1078 if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
1079 {
1080 baseName=baseName.right(baseName.length()-i-1);
1081 }
1082 m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
1083 if (!img.width().isEmpty())
1084 {
1085 m_output.add(" width=\"");
1086 m_output.addQuoted(img.width());
1087 m_output.add("\"");
1088 }
1089 else if (!img.height().isEmpty())
1090 {
1091 m_output.add(" height=\"");
1092 m_output.addQuoted(img.height());
1093 m_output.add("\"");
1094 }
1095 m_output.add(">");
1096#endif
1097 visitChildren(img);
1098#if 0
1099 m_output.add("</image>");
1100#endif
1101}
QCString name() const
Definition docnode.h:642
QCString height() const
Definition docnode.h:645
Type type() const
Definition docnode.h:641
QCString width() const
Definition docnode.h:644
size_t length() const
Returns the length of the string, not counting the 0-terminator.
Definition qcstring.h:153
QCString right(size_t len) const
Definition qcstring.h:219
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition qcstring.cpp:91

References QCString::findRev(), DocImage::height(), DocImage::Html, QCString::isEmpty(), DocImage::Latex, QCString::length(), m_output, DocImage::name(), QCString::right(), DocImage::Rtf, DocImage::type(), visitChildren(), and DocImage::width().

◆ operator()() [25/58]

void PerlModDocVisitor::operator() ( const DocInclude & inc)

Definition at line 668 of file perlmodgen.cpp.

669{
670 const char *type = nullptr;
671 switch (inc.type())
672 {
674 return;
676 return;
677 case DocInclude::DontInclude: return;
678 case DocInclude::DontIncWithLines: return;
679 case DocInclude::HtmlInclude: type = "htmlonly"; break;
680 case DocInclude::LatexInclude: type = "latexonly"; break;
681 case DocInclude::RtfInclude: type = "rtfonly"; break;
682 case DocInclude::ManInclude: type = "manonly"; break;
683 case DocInclude::XmlInclude: type = "xmlonly"; break;
684 case DocInclude::DocbookInclude: type = "docbookonly"; break;
685 case DocInclude::VerbInclude: type = "preformatted"; break;
686 case DocInclude::Snippet: return;
687 case DocInclude::SnippetWithLines: return;
688 }
689 openItem(type);
690 m_output.addFieldQuotedString("content", inc.text());
691 closeItem();
692}
@ LatexInclude
Definition docnode.h:432
@ SnippetWithLines
Definition docnode.h:433
@ DontIncWithLines
Definition docnode.h:434
@ IncWithLines
Definition docnode.h:433
@ HtmlInclude
Definition docnode.h:432
@ VerbInclude
Definition docnode.h:432
@ DontInclude
Definition docnode.h:432
@ DocbookInclude
Definition docnode.h:434
Type type() const
Definition docnode.h:446
QCString text() const
Definition docnode.h:447

References closeItem(), DocInclude::DocbookInclude, DocInclude::DontInclude, DocInclude::DontIncWithLines, DocInclude::HtmlInclude, DocInclude::Include, DocInclude::IncWithLines, DocInclude::LatexInclude, m_output, DocInclude::ManInclude, openItem(), DocInclude::RtfInclude, DocInclude::Snippet, DocInclude::SnippetWithLines, DocInclude::text(), DocInclude::type(), DocInclude::VerbInclude, and DocInclude::XmlInclude.

◆ operator()() [26/58]

void PerlModDocVisitor::operator() ( const DocIncOperator & )

Definition at line 694 of file perlmodgen.cpp.

695{
696#if 0
697 //printf("DocIncOperator: type=%d first=%d, last=%d text='%s'\n",
698 // op.type(),op.isFirst(),op.isLast(),op.text().data());
699 if (op.isFirst())
700 {
701 m_output.add("<programlisting>");
702 }
703 if (op.type()!=DocIncOperator::Skip)
704 {
705 parseCode(m_ci,op.context(),op.text(),FALSE,0);
706 }
707 if (op.isLast())
708 {
709 m_output.add("</programlisting>");
710 }
711 else
712 {
713 m_output.add('\n');
714 }
715#endif
716}

References FALSE, m_output, and DocIncOperator::Skip.

◆ operator()() [27/58]

void PerlModDocVisitor::operator() ( const DocIndexEntry & )

Definition at line 727 of file perlmodgen.cpp.

728{
729#if 0
730 m_output.add("<indexentry>"
731 "<primaryie>");
732 m_output.addQuoted(ie->entry());
733 m_output.add("</primaryie>"
734 "<secondaryie></secondaryie>"
735 "</indexentry>");
736#endif
737}

References m_output.

◆ operator()() [28/58]

void PerlModDocVisitor::operator() ( const DocInternal & i)

Definition at line 1008 of file perlmodgen.cpp.

1009{
1010#if 0
1011 m_output.add("<internal>");
1012#endif
1013 visitChildren(i);
1014#if 0
1015 m_output.add("</internal>");
1016#endif
1017}

References m_output, and visitChildren().

◆ operator()() [29/58]

void PerlModDocVisitor::operator() ( const DocInternalRef & ref)

Definition at line 1293 of file perlmodgen.cpp.

1294{
1295 openItem("ref");
1296 addLink(QCString(),ref.file(),ref.anchor());
1297 openSubBlock("content");
1298 visitChildren(ref);
1299 closeSubBlock();
1300 closeItem();
1301}
QCString file() const
Definition docnode.h:805
QCString anchor() const
Definition docnode.h:807
void addLink(const QCString &ref, const QCString &file, const QCString &anchor)

References addLink(), DocInternalRef::anchor(), closeItem(), closeSubBlock(), DocInternalRef::file(), openItem(), openSubBlock(), and visitChildren().

◆ operator()() [30/58]

void PerlModDocVisitor::operator() ( const DocLineBreak & )

Definition at line 585 of file perlmodgen.cpp.

586{
587 singleItem("linebreak");
588}

References singleItem().

◆ operator()() [31/58]

void PerlModDocVisitor::operator() ( const DocLink & lnk)

Definition at line 1147 of file perlmodgen.cpp.

1148{
1149 openItem("link");
1150 addLink(lnk.ref(), lnk.file(), lnk.anchor());
1151 visitChildren(lnk);
1152 closeItem();
1153}

References addLink(), DocLink::anchor(), closeItem(), DocLink::file(), openItem(), DocLink::ref(), and visitChildren().

◆ operator()() [32/58]

void PerlModDocVisitor::operator() ( const DocLinkedWord & w)

Definition at line 480 of file perlmodgen.cpp.

481{
482 openItem("url");
483 addLink(w.ref(), w.file(), w.anchor());
484 m_output.addFieldQuotedString("content", w.word());
485 closeItem();
486}
QCString file() const
Definition docnode.h:170
QCString ref() const
Definition docnode.h:172
QCString word() const
Definition docnode.h:169
QCString anchor() const
Definition docnode.h:173

References addLink(), DocLinkedWord::anchor(), closeItem(), DocLinkedWord::file(), m_output, openItem(), DocLinkedWord::ref(), and DocLinkedWord::word().

◆ operator()() [33/58]

void PerlModDocVisitor::operator() ( const DocMscFile & df)

Definition at line 1113 of file perlmodgen.cpp.

1114{
1115#if 0
1116 m_output.add("<mscfile name=\""); m_output.add(df->file()); m_output.add("\">");
1117#endif
1118 visitChildren(df);
1119#if 0
1120 m_output.add("<mscfile>");
1121#endif
1122}

References DocDiagramFileBase::file(), m_output, and visitChildren().

◆ operator()() [34/58]

void PerlModDocVisitor::operator() ( const DocPara & p)

Definition at line 784 of file perlmodgen.cpp.

785{
787 m_textblockstart = false;
788 else
789 singleItem("parbreak");
790 /*
791 openItem("para");
792 openSubBlock("content");
793 */
794 visitChildren(p);
795 /*
796 closeSubBlock();
797 closeItem();
798 */
799}

References m_textblockstart, singleItem(), and visitChildren().

◆ operator()() [35/58]

void PerlModDocVisitor::operator() ( const DocParamList & pl)

Definition at line 1215 of file perlmodgen.cpp.

1216{
1217 leaveText();
1218 m_output.openHash().openList("parameters");
1219 for (const auto &param : pl.parameters())
1220 {
1221 QCString name;
1222 const DocWord *word = std::get_if<DocWord>(&param);
1223 const DocLinkedWord *linkedWord = std::get_if<DocLinkedWord>(&param);
1224 if (word)
1225 {
1226 name = word->word();
1227 }
1228 else if (linkedWord)
1229 {
1230 name = linkedWord->word();
1231 }
1232
1233 QCString dir = "";
1234 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1235 if (sect && sect->hasInOutSpecifier())
1236 {
1238 {
1239 if (pl.direction()==DocParamSect::In)
1240 {
1241 dir = "in";
1242 }
1243 else if (pl.direction()==DocParamSect::Out)
1244 {
1245 dir = "out";
1246 }
1247 else if (pl.direction()==DocParamSect::InOut)
1248 {
1249 dir = "in,out";
1250 }
1251 }
1252 }
1253
1254 m_output.openHash()
1255 .addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
1256 .closeHash();
1257 }
1258 m_output.closeList()
1259 .openList("doc");
1260 for (const auto &par : pl.paragraphs())
1261 {
1262 std::visit(*this,par);
1263 }
1264 leaveText();
1265 m_output.closeList()
1266 .closeHash();
1267}
DocNodeVariant * parent()
Definition docnode.h:89
const DocNodeList & parameters() const
Definition docnode.h:1123
DocParamSect::Direction direction() const
Definition docnode.h:1127
const DocNodeList & paragraphs() const
Definition docnode.h:1125
bool hasInOutSpecifier() const
Definition docnode.h:1063
std::string_view word
Definition util.cpp:980

References DocParamList::direction(), DocParamSect::hasInOutSpecifier(), DocParamSect::In, DocParamSect::InOut, leaveText(), m_output, DocParamSect::Out, DocParamList::paragraphs(), DocParamList::parameters(), DocNode::parent(), DocParamSect::Unspecified, DocLinkedWord::word(), and word.

◆ operator()() [36/58]

void PerlModDocVisitor::operator() ( const DocParamSect & s)

Definition at line 1188 of file perlmodgen.cpp.

1189{
1190 leaveText();
1191 const char *type = nullptr;
1192 switch(s.type())
1193 {
1194 case DocParamSect::Param: type = "params"; break;
1195 case DocParamSect::RetVal: type = "retvals"; break;
1196 case DocParamSect::Exception: type = "exceptions"; break;
1197 case DocParamSect::TemplateParam: type = "templateparam"; break;
1199 err("unknown parameter section found\n");
1200 break;
1201 }
1202 m_output.openHash();
1203 //openOther();
1204 openSubBlock(type);
1205 visitChildren(s);
1206 closeSubBlock();
1207 //closeOther();
1208 m_output.closeHash();
1209}
Type type() const
Definition docnode.h:1062
#define err(fmt,...)
Definition message.h:84

References closeSubBlock(), err, DocParamSect::Exception, leaveText(), m_output, openSubBlock(), DocParamSect::Param, DocParamSect::RetVal, DocParamSect::TemplateParam, DocParamSect::type(), DocParamSect::Unknown, and visitChildren().

◆ operator()() [37/58]

void PerlModDocVisitor::operator() ( const DocParBlock & pb)

Definition at line 1321 of file perlmodgen.cpp.

1322{
1323 visitChildren(pb);
1324}

References visitChildren().

◆ operator()() [38/58]

void PerlModDocVisitor::operator() ( const DocPlantUmlFile & df)

Definition at line 1135 of file perlmodgen.cpp.

1136{
1137#if 0
1138 m_output.add("<plantumlfile name=\""); m_output.add(df->file()); m_output.add("\">");
1139#endif
1140 visitChildren(df);
1141#if 0
1142 m_output.add("</plantumlfile>");
1143#endif
1144}

References DocDiagramFileBase::file(), m_output, and visitChildren().

◆ operator()() [39/58]

void PerlModDocVisitor::operator() ( const DocRef & ref)

Definition at line 1155 of file perlmodgen.cpp.

1156{
1157 openItem("ref");
1158 if (!ref.hasLinkText())
1159 m_output.addFieldQuotedString("text", ref.targetTitle());
1160 openSubBlock("content");
1161 visitChildren(ref);
1162 closeSubBlock();
1163 closeItem();
1164}
QCString targetTitle() const
Definition docnode.h:780
bool hasLinkText() const
Definition docnode.h:782

References closeItem(), closeSubBlock(), DocRef::hasLinkText(), m_output, openItem(), openSubBlock(), DocRef::targetTitle(), and visitChildren().

◆ operator()() [40/58]

void PerlModDocVisitor::operator() ( const DocRoot & r)

Definition at line 801 of file perlmodgen.cpp.

802{
803 visitChildren(r);
804}

References visitChildren().

◆ operator()() [41/58]

void PerlModDocVisitor::operator() ( const DocSecRefItem & ref)

Definition at line 1166 of file perlmodgen.cpp.

1167{
1168#if 0
1169 m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
1170#endif
1171 visitChildren(ref);
1172#if 0
1173 m_output.add("</tocitem>");
1174#endif
1175}
QCString file() const
Definition docnode.h:933
QCString anchor() const
Definition docnode.h:934

References DocSecRefItem::anchor(), DocSecRefItem::file(), m_output, and visitChildren().

◆ operator()() [42/58]

void PerlModDocVisitor::operator() ( const DocSecRefList & l)

Definition at line 1177 of file perlmodgen.cpp.

1178{
1179#if 0
1180 m_output.add("<toclist>");
1181#endif
1182 visitChildren(l);
1183#if 0
1184 m_output.add("</toclist>");
1185#endif
1186}

References m_output, and visitChildren().

◆ operator()() [43/58]

void PerlModDocVisitor::operator() ( const DocSection & s)

Definition at line 876 of file perlmodgen.cpp.

877{
878 QCString sect = QCString().sprintf("sect%d",s.level());
879 openItem(sect);
880 //m_output.addFieldQuotedString("title", s.title());
881 if (s.title())
882 {
883 std::visit(*this,*s.title());
884 }
885 openSubBlock("content");
886 visitChildren(s);
888 closeItem();
889}
int level() const
Definition docnode.h:912
const DocNodeVariant * title() const
Definition docnode.h:913

References closeItem(), closeSubBlock(), DocSection::level(), openItem(), openSubBlock(), QCString::sprintf(), DocSection::title(), and visitChildren().

◆ operator()() [44/58]

void PerlModDocVisitor::operator() ( const DocSeparator & )

Definition at line 1211 of file perlmodgen.cpp.

1212{
1213}

◆ operator()() [45/58]

void PerlModDocVisitor::operator() ( const DocSimpleList & l)

Definition at line 856 of file perlmodgen.cpp.

857{
858 openItem("list");
859 m_output.addFieldQuotedString("style", "itemized");
860 openSubBlock("content");
861 visitChildren(l);
863 closeItem();
864}

References closeItem(), closeSubBlock(), m_output, openItem(), openSubBlock(), and visitChildren().

◆ operator()() [46/58]

void PerlModDocVisitor::operator() ( const DocSimpleListItem & li)

Definition at line 866 of file perlmodgen.cpp.

867{
868 openSubBlock();
869 if (li.paragraph())
870 {
871 std::visit(*this,*li.paragraph());
872 }
874}
const DocNodeVariant * paragraph() const
Definition docnode.h:1151

References closeSubBlock(), openSubBlock(), and DocSimpleListItem::paragraph().

◆ operator()() [47/58]

void PerlModDocVisitor::operator() ( const DocSimpleSect & s)

Definition at line 806 of file perlmodgen.cpp.

807{
808 const char *type = nullptr;
809 switch (s.type())
810 {
811 case DocSimpleSect::See: type = "see"; break;
812 case DocSimpleSect::Return: type = "return"; break;
813 case DocSimpleSect::Author: type = "author"; break;
814 case DocSimpleSect::Authors: type = "authors"; break;
815 case DocSimpleSect::Version: type = "version"; break;
816 case DocSimpleSect::Since: type = "since"; break;
817 case DocSimpleSect::Date: type = "date"; break;
818 case DocSimpleSect::Note: type = "note"; break;
819 case DocSimpleSect::Warning: type = "warning"; break;
820 case DocSimpleSect::Pre: type = "pre"; break;
821 case DocSimpleSect::Post: type = "post"; break;
822 case DocSimpleSect::Copyright: type = "copyright"; break;
823 case DocSimpleSect::Invar: type = "invariant"; break;
824 case DocSimpleSect::Remark: type = "remark"; break;
825 case DocSimpleSect::Attention: type = "attention"; break;
826 case DocSimpleSect::Important: type = "important"; break;
827 case DocSimpleSect::User: type = "par"; break;
828 case DocSimpleSect::Rcs: type = "rcs"; break;
830 err("unknown simple section found\n");
831 break;
832 }
833 leaveText();
834 m_output.openHash();
835 //openOther();
836 openSubBlock(type);
837 if (s.title())
838 {
839 std::visit(*this,*s.title());
840 }
841 visitChildren(s);
843 //closeOther();
844 m_output.closeHash();
845}
Type type() const
Definition docnode.h:1020
const DocNodeVariant * title() const
Definition docnode.h:1027

References DocSimpleSect::Attention, DocSimpleSect::Author, DocSimpleSect::Authors, closeSubBlock(), DocSimpleSect::Copyright, DocSimpleSect::Date, err, DocSimpleSect::Important, DocSimpleSect::Invar, leaveText(), m_output, DocSimpleSect::Note, openSubBlock(), DocSimpleSect::Post, DocSimpleSect::Pre, DocSimpleSect::Rcs, DocSimpleSect::Remark, DocSimpleSect::Return, DocSimpleSect::See, DocSimpleSect::Since, DocSimpleSect::title(), DocSimpleSect::type(), DocSimpleSect::Unknown, DocSimpleSect::User, DocSimpleSect::Version, visitChildren(), and DocSimpleSect::Warning.

◆ operator()() [48/58]

void PerlModDocVisitor::operator() ( const DocSimpleSectSep & )

Definition at line 739 of file perlmodgen.cpp.

740{
741}

◆ operator()() [49/58]

void PerlModDocVisitor::operator() ( const DocStyleChange & s)

Definition at line 595 of file perlmodgen.cpp.

596{
597 const char *style = nullptr;
598 switch (s.style())
599 {
600 case DocStyleChange::Bold: style = "bold"; break;
601 case DocStyleChange::S: style = "s"; break;
602 case DocStyleChange::Strike: style = "strike"; break;
603 case DocStyleChange::Del: style = "del"; break;
604 case DocStyleChange::Underline: style = "underline"; break;
605 case DocStyleChange::Ins: style = "ins"; break;
606 case DocStyleChange::Italic: style = "italic"; break;
607 case DocStyleChange::Code: style = "code"; break;
608 case DocStyleChange::Subscript: style = "subscript"; break;
609 case DocStyleChange::Superscript: style = "superscript"; break;
610 case DocStyleChange::Center: style = "center"; break;
611 case DocStyleChange::Small: style = "small"; break;
612 case DocStyleChange::Cite: style = "cite"; break;
613 case DocStyleChange::Preformatted: style = "preformatted"; break;
614 case DocStyleChange::Div: style = "div"; break;
615 case DocStyleChange::Span: style = "span"; break;
616 case DocStyleChange::Kbd: style = "kbd"; break;
617 }
618 openItem("style");
619 m_output.addFieldQuotedString("style", style)
620 .addFieldBoolean("enable", s.enable());
621 closeItem();
622}
Style style() const
Definition docnode.h:302
bool enable() const
Definition docnode.h:304

References DocStyleChange::Bold, DocStyleChange::Center, DocStyleChange::Cite, closeItem(), DocStyleChange::Code, DocStyleChange::Del, DocStyleChange::Div, DocStyleChange::enable(), DocStyleChange::Ins, DocStyleChange::Italic, DocStyleChange::Kbd, m_output, openItem(), DocStyleChange::Preformatted, DocStyleChange::S, DocStyleChange::Small, DocStyleChange::Span, DocStyleChange::Strike, DocStyleChange::style(), DocStyleChange::Subscript, DocStyleChange::Superscript, and DocStyleChange::Underline.

◆ operator()() [50/58]

void PerlModDocVisitor::operator() ( const DocSymbol & sy)

Definition at line 494 of file perlmodgen.cpp.

495{
496 const HtmlEntityMapper::PerlSymb *res = HtmlEntityMapper::instance().perl(sy.symbol());
497 const char *accent=nullptr;
498 if (res->symb)
499 {
500 switch (res->type)
501 {
503 enterText();
504 m_output.add(res->symb);
505 break;
507 enterText();
508 m_output.add(res->symb[0]);
509 break;
511 leaveText();
512 openItem("symbol");
513 m_output.addFieldQuotedString("symbol", res->symb);
514 closeItem();
515 break;
516 default:
517 switch(res->type)
518 {
520 accent = "umlaut";
521 break;
523 accent = "acute";
524 break;
526 accent = "grave";
527 break;
529 accent = "circ";
530 break;
532 accent = "slash";
533 break;
535 accent = "tilde";
536 break;
538 accent = "cedilla";
539 break;
541 accent = "ring";
542 break;
543 default:
544 break;
545 }
546 leaveText();
547 if (accent)
548 {
549 openItem("accent");
551 .addFieldQuotedString("accent", accent)
552 .addFieldQuotedChar("letter", res->symb[0]);
553 closeItem();
554 }
555 break;
556 }
557 }
558 else
559 {
560 err("perl: non supported HTML-entity found: %s\n",HtmlEntityMapper::instance().html(sy.symbol(),TRUE));
561 }
562}
HtmlEntityMapper::SymType symbol() const
Definition docnode.h:327
const PerlSymb * perl(SymType symb) const
Access routine to the perl struct with the perl code of the HTML entity.
static HtmlEntityMapper & instance()
Returns the one and only instance of the HTML entity mapper.
#define TRUE
Definition qcstring.h:37

References closeItem(), enterText(), err, HtmlEntityMapper::instance(), leaveText(), m_output, openItem(), HtmlEntityMapper::perl(), HtmlEntityMapper::Perl_acute, HtmlEntityMapper::Perl_cedilla, HtmlEntityMapper::Perl_char, HtmlEntityMapper::Perl_circ, HtmlEntityMapper::Perl_grave, HtmlEntityMapper::Perl_ring, HtmlEntityMapper::Perl_slash, HtmlEntityMapper::Perl_string, HtmlEntityMapper::Perl_symbol, HtmlEntityMapper::Perl_tilde, HtmlEntityMapper::Perl_umlaut, HtmlEntityMapper::PerlSymb::symb, DocSymbol::symbol(), TRUE, and HtmlEntityMapper::PerlSymb::type.

◆ operator()() [51/58]

void PerlModDocVisitor::operator() ( const DocText & t)

Definition at line 1303 of file perlmodgen.cpp.

1304{
1305 visitChildren(t);
1306}

References visitChildren().

◆ operator()() [52/58]

void PerlModDocVisitor::operator() ( const DocTitle & t)

Definition at line 847 of file perlmodgen.cpp.

848{
849 openItem("title");
850 openSubBlock("content");
851 visitChildren(t);
853 closeItem();
854}

References closeItem(), closeSubBlock(), openItem(), openSubBlock(), and visitChildren().

◆ operator()() [53/58]

void PerlModDocVisitor::operator() ( const DocURL & u)

Definition at line 578 of file perlmodgen.cpp.

579{
580 openItem("url");
581 m_output.addFieldQuotedString("content", u.url());
582 closeItem();
583}
QCString url() const
Definition docnode.h:191

References closeItem(), m_output, openItem(), and DocURL::url().

◆ operator()() [54/58]

void PerlModDocVisitor::operator() ( const DocVerbatim & s)

Definition at line 624 of file perlmodgen.cpp.

625{
626 const char *type = nullptr;
627 switch (s.type())
628 {
630#if 0
631 m_output.add("<programlisting>");
632 parseCode(m_ci,s->context(),s->text(),FALSE,0);
633 m_output.add("</programlisting>");
634 return;
635#endif
638 case DocVerbatim::Verbatim: type = "preformatted"; break;
639 case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
640 case DocVerbatim::RtfOnly: type = "rtfonly"; break;
641 case DocVerbatim::ManOnly: type = "manonly"; break;
642 case DocVerbatim::LatexOnly: type = "latexonly"; break;
643 case DocVerbatim::XmlOnly: type = "xmlonly"; break;
644 case DocVerbatim::DocbookOnly: type = "docbookonly"; break;
645 case DocVerbatim::Dot: type = "dot"; break;
646 case DocVerbatim::Msc: type = "msc"; break;
647 case DocVerbatim::PlantUML: type = "plantuml"; break;
648 }
649 openItem(type);
650 if (s.hasCaption())
651 {
652 openSubBlock("caption");
653 visitChildren(s);
655 }
656 m_output.addFieldQuotedString("content", s.text());
657 closeItem();
658}
bool hasCaption() const
Definition docnode.h:385
QCString context() const
Definition docnode.h:379
Type type() const
Definition docnode.h:377
QCString text() const
Definition docnode.h:378
@ JavaDocLiteral
Definition docnode.h:373

References closeItem(), closeSubBlock(), DocVerbatim::Code, DocVerbatim::context(), DocVerbatim::DocbookOnly, DocVerbatim::Dot, FALSE, DocVerbatim::hasCaption(), DocVerbatim::HtmlOnly, DocVerbatim::JavaDocCode, DocVerbatim::JavaDocLiteral, DocVerbatim::LatexOnly, m_output, DocVerbatim::ManOnly, DocVerbatim::Msc, openItem(), openSubBlock(), DocVerbatim::PlantUML, DocVerbatim::RtfOnly, DocVerbatim::text(), DocVerbatim::type(), DocVerbatim::Verbatim, visitChildren(), and DocVerbatim::XmlOnly.

◆ operator()() [55/58]

void PerlModDocVisitor::operator() ( const DocVhdlFlow & )

Definition at line 1317 of file perlmodgen.cpp.

1318{
1319}

◆ operator()() [56/58]

void PerlModDocVisitor::operator() ( const DocWhiteSpace & )

Definition at line 488 of file perlmodgen.cpp.

489{
490 enterText();
491 m_output.add(' ');
492}

References enterText(), and m_output.

◆ operator()() [57/58]

void PerlModDocVisitor::operator() ( const DocWord & w)

Definition at line 474 of file perlmodgen.cpp.

475{
476 enterText();
477 m_output.addQuoted(w.word());
478}
QCString word() const
Definition docnode.h:155

References enterText(), m_output, and DocWord::word().

◆ operator()() [58/58]

void PerlModDocVisitor::operator() ( const DocXRefItem & x)

Definition at line 1269 of file perlmodgen.cpp.

1270{
1271#if 0
1272 m_output.add("<xrefsect id=\"");
1273 m_output.add(x->file()); m_output.add("_1"); m_output.add(x->anchor());
1274 m_output.add("\">");
1275 m_output.add("<xreftitle>");
1276 m_output.addQuoted(x->title());
1277 m_output.add("</xreftitle>");
1278 m_output.add("<xrefdescription>");
1279#endif
1280 if (x.title().isEmpty()) return;
1281 openItem("xrefitem");
1282 openSubBlock("content");
1283 visitChildren(x);
1284 if (x.title().isEmpty()) return;
1285 closeSubBlock();
1286 closeItem();
1287#if 0
1288 m_output.add("</xrefdescription>");
1289 m_output.add("</xrefsect>");
1290#endif
1291}
QCString anchor() const
Definition docnode.h:619
QCString file() const
Definition docnode.h:618
QCString title() const
Definition docnode.h:620

References DocXRefItem::anchor(), closeItem(), closeSubBlock(), DocXRefItem::file(), QCString::isEmpty(), m_output, openItem(), openSubBlock(), DocXRefItem::title(), and visitChildren().

◆ singleItem()

void PerlModDocVisitor::singleItem ( const QCString & name)
private

Definition at line 433 of file perlmodgen.cpp.

434{
435 openItem(name);
436 closeItem();
437}

References closeItem(), and openItem().

Referenced by operator()(), operator()(), and operator()().

◆ visitChildren()

Member Data Documentation

◆ m_other

QCString PerlModDocVisitor::m_other
private

Definition at line 378 of file perlmodgen.cpp.

Referenced by finish().

◆ m_output

◆ m_textblockstart

bool PerlModDocVisitor::m_textblockstart
private

Definition at line 377 of file perlmodgen.cpp.

Referenced by openSubBlock(), operator()(), and PerlModDocVisitor().

◆ m_textmode

bool PerlModDocVisitor::m_textmode
private

Definition at line 376 of file perlmodgen.cpp.

Referenced by enterText(), leaveText(), and PerlModDocVisitor().


The documentation for this class was generated from the following file: