Skip to main content

The PerlModDocVisitor Class Reference

Concrete visitor implementation for PerlMod output. More...

Declaration

class PerlModDocVisitor { ... }

Base class

classDocVisitor

Helper base class for functionality shared by all visitors. More...

Public Constructors Index

PerlModDocVisitor (PerlModOutput &)

Public Operators Index

voidoperator() (const DocWord &)
voidoperator() (const DocLinkedWord &)
voidoperator() (const DocWhiteSpace &)
voidoperator() (const DocSymbol &)
voidoperator() (const DocEmoji &)
voidoperator() (const DocURL &)
voidoperator() (const DocLineBreak &)
voidoperator() (const DocHorRuler &)
voidoperator() (const DocStyleChange &)
voidoperator() (const DocVerbatim &)
voidoperator() (const DocAnchor &)
voidoperator() (const DocInclude &)
voidoperator() (const DocIncOperator &)
voidoperator() (const DocFormula &)
voidoperator() (const DocIndexEntry &)
voidoperator() (const DocSimpleSectSep &)
voidoperator() (const DocCite &)
voidoperator() (const DocSeparator &)
voidoperator() (const DocAutoList &)
voidoperator() (const DocAutoListItem &)
voidoperator() (const DocPara &)
voidoperator() (const DocRoot &)
voidoperator() (const DocSimpleSect &)
voidoperator() (const DocTitle &)
voidoperator() (const DocSimpleList &)
voidoperator() (const DocSimpleListItem &)
voidoperator() (const DocSection &)
voidoperator() (const DocHtmlList &)
voidoperator() (const DocHtmlListItem &)
voidoperator() (const DocHtmlDescList &)
voidoperator() (const DocHtmlDescTitle &)
voidoperator() (const DocHtmlDescData &)
voidoperator() (const DocHtmlTable &)
voidoperator() (const DocHtmlRow &)
voidoperator() (const DocHtmlCell &)
voidoperator() (const DocHtmlCaption &)
voidoperator() (const DocInternal &)
voidoperator() (const DocHRef &)
voidoperator() (const DocHtmlSummary &)
voidoperator() (const DocHtmlDetails &)
voidoperator() (const DocHtmlHeader &)
voidoperator() (const DocImage &)
voidoperator() (const DocDotFile &)
voidoperator() (const DocMscFile &)
voidoperator() (const DocDiaFile &)
voidoperator() (const DocPlantUmlFile &)
voidoperator() (const DocLink &)
voidoperator() (const DocRef &)
voidoperator() (const DocSecRefItem &)
voidoperator() (const DocSecRefList &)
voidoperator() (const DocParamSect &)
voidoperator() (const DocParamList &)
voidoperator() (const DocXRefItem &)
voidoperator() (const DocInternalRef &)
voidoperator() (const DocText &)
voidoperator() (const DocHtmlBlockQuote &)
voidoperator() (const DocVhdlFlow &)
voidoperator() (const DocParBlock &)

Public Member Functions Index

voidfinish ()

Private Member Functions Index

template <class T>
voidvisitChildren (const T &t)
voidaddLink (const QCString &ref, const QCString &file, const QCString &anchor)
voidenterText ()
voidleaveText ()
voidopenItem (const QCString &)
voidcloseItem ()
voidsingleItem (const QCString &)
voidopenSubBlock (const QCString &=QCString())
voidcloseSubBlock ()

Private Member Attributes Index

PerlModOutput &m_output
boolm_textmode
boolm_textblockstart
QCStringm_other

Description

Concrete visitor implementation for PerlMod output.

Definition at line 271 of file perlmodgen.cpp.

Public Constructors

PerlModDocVisitor()

PerlModDocVisitor::PerlModDocVisitor (PerlModOutput & output)

Definition at line 274 of file perlmodgen.cpp.

383 : m_output(output), m_textmode(false), m_textblockstart(FALSE)
384{
385 m_output.openList("doc");
386}

References FALSE, m_output, m_textblockstart and m_textmode.

Public Operators

operator()()

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

Definition at line 282 of file perlmodgen.cpp.

476{
477 enterText();
478 m_output.addQuoted(w.word());
479}

References enterText, m_output and DocWord::word.

operator()()

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

Definition at line 283 of file perlmodgen.cpp.

482{
483 openItem("url");
484 addLink(w.ref(), w.file(), w.anchor());
485 m_output.addFieldQuotedString("content", w.word());
486 closeItem();
487}

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

operator()()

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

Definition at line 284 of file perlmodgen.cpp.

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

References enterText and m_output.

operator()()

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

Definition at line 285 of file perlmodgen.cpp.

496{
498 const char *accent=nullptr;
499 if (res->symb)
500 {
501 switch (res->type)
502 {
504 enterText();
505 m_output.add(res->symb);
506 break;
508 enterText();
509 m_output.add(res->symb[0]);
510 break;
512 leaveText();
513 openItem("symbol");
514 m_output.addFieldQuotedString("symbol", res->symb);
515 closeItem();
516 break;
517 default:
518 switch(res->type)
519 {
521 accent = "umlaut";
522 break;
524 accent = "acute";
525 break;
527 accent = "grave";
528 break;
530 accent = "circ";
531 break;
533 accent = "slash";
534 break;
536 accent = "tilde";
537 break;
539 accent = "cedilla";
540 break;
542 accent = "ring";
543 break;
544 default:
545 break;
546 }
547 leaveText();
548 if (accent)
549 {
550 openItem("accent");
552 .addFieldQuotedString("accent", accent)
553 .addFieldQuotedChar("letter", res->symb[0]);
554 closeItem();
555 }
556 break;
557 }
558 }
559 else
560 {
561 err("perl: non supported HTML-entity found: {}\n",HtmlEntityMapper::instance().html(sy.symbol(),TRUE));
562 }
563}

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()()

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

Definition at line 286 of file perlmodgen.cpp.

566{
567 enterText();
568 const char *name = EmojiEntityMapper::instance().name(sy.index());
569 if (name)
570 {
571 m_output.add(name);
572 }
573 else
574 {
575 m_output.add(sy.name());
576 }
577}

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

operator()()

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

Definition at line 287 of file perlmodgen.cpp.

580{
581 openItem("url");
582 m_output.addFieldQuotedString("content", u.url());
583 closeItem();
584}

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

operator()()

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

Definition at line 288 of file perlmodgen.cpp.

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

Reference singleItem.

operator()()

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

Definition at line 289 of file perlmodgen.cpp.

592{
593 singleItem("hruler");
594}

Reference singleItem.

operator()()

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

Definition at line 290 of file perlmodgen.cpp.

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

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, DocStyleChange::Typewriter and DocStyleChange::Underline.

operator()()

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

Definition at line 291 of file perlmodgen.cpp.

627{
628 const char *type = nullptr;
629 switch (s.type())
630 {
632#if 0
633 m_output.add("<programlisting>");
634 parseCode(m_ci,s->context(),s->text(),FALSE,0);
635 m_output.add("</programlisting>");
636 return;
637#endif
640 case DocVerbatim::Verbatim: type = "preformatted"; break;
641 case DocVerbatim::HtmlOnly: type = "htmlonly"; break;
642 case DocVerbatim::RtfOnly: type = "rtfonly"; break;
643 case DocVerbatim::ManOnly: type = "manonly"; break;
644 case DocVerbatim::LatexOnly: type = "latexonly"; break;
645 case DocVerbatim::XmlOnly: type = "xmlonly"; break;
646 case DocVerbatim::DocbookOnly: type = "docbookonly"; break;
647 case DocVerbatim::Dot: type = "dot"; break;
648 case DocVerbatim::Msc: type = "msc"; break;
649 case DocVerbatim::PlantUML: type = "plantuml"; break;
650 }
651 openItem(type);
652 if (s.hasCaption())
653 {
654 openSubBlock("caption");
657 }
658 m_output.addFieldQuotedString("content", s.text());
659 closeItem();
660}

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()()

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

Definition at line 292 of file perlmodgen.cpp.

663{
664 QCString anchor = anc.file() + "_1" + anc.anchor();
665 openItem("anchor");
666 m_output.addFieldQuotedString("id", anchor);
667 closeItem();
668}

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

operator()()

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

Definition at line 293 of file perlmodgen.cpp.

671{
672 const char *type = nullptr;
673 switch (inc.type())
674 {
676 return;
678 return;
679 case DocInclude::DontInclude: return;
681 case DocInclude::HtmlInclude: type = "htmlonly"; break;
682 case DocInclude::LatexInclude: type = "latexonly"; break;
683 case DocInclude::RtfInclude: type = "rtfonly"; break;
684 case DocInclude::ManInclude: type = "manonly"; break;
685 case DocInclude::XmlInclude: type = "xmlonly"; break;
686 case DocInclude::DocbookInclude: type = "docbookonly"; break;
687 case DocInclude::VerbInclude: type = "preformatted"; break;
688 case DocInclude::Snippet: return;
690 }
691 openItem(type);
692 m_output.addFieldQuotedString("content", inc.text());
693 closeItem();
694}

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()()

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

Definition at line 294 of file perlmodgen.cpp.

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

References FALSE, m_output and DocIncOperator::Skip.

operator()()

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

Definition at line 295 of file perlmodgen.cpp.

721{
722 openItem("formula");
723 QCString id;
724 id += QCString().setNum(f.id());
725 m_output.addFieldQuotedString("id", id).addFieldQuotedString("content", f.text());
726 closeItem();
727}

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

operator()()

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

Definition at line 296 of file perlmodgen.cpp.

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

Reference m_output.

operator()()

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

Definition at line 297 of file perlmodgen.cpp.

operator()()

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

Definition at line 298 of file perlmodgen.cpp.

746{
747 openItem("cite");
748 auto opt = cite.option();
749 QCString txt;
750 if (!cite.file().isEmpty())
751 {
752 txt = cite.getText();
753 }
754 else
755 {
756 if (!opt.noPar()) txt += "[";
757 txt += cite.target();
758 if (!opt.noPar()) txt += "]";
759 }
760 m_output.addFieldQuotedString("text", txt);
761 closeItem();
762}

References closeItem, DocCite::file, DocCite::getText, QCString::isEmpty, m_output, openItem, DocCite::option and DocCite::target.

operator()()

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

Definition at line 299 of file perlmodgen.cpp.

operator()()

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

Definition at line 305 of file perlmodgen.cpp.

770{
771 openItem("list");
772 m_output.addFieldQuotedString("style", l.isEnumList() ? "ordered" : (l.isCheckedList() ? "check" :"itemized"));
773 openSubBlock("content");
776 closeItem();
777}

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

operator()()

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

Definition at line 306 of file perlmodgen.cpp.

780{
782 switch (li.itemNumber())
783 {
784 case DocAutoList::Unchecked: // unchecked
785 m_output.addFieldQuotedString("style", "Unchecked");
786 break;
787 case DocAutoList::Checked_x: // checked with x
788 case DocAutoList::Checked_X: // checked with X
789 m_output.addFieldQuotedString("style", "Checked");
790 break;
791 default:
792 break;
793 }
794 visitChildren(li);
796}

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

operator()()

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

Definition at line 307 of file perlmodgen.cpp.

799{
801 m_textblockstart = false;
802 else
803 singleItem("parbreak");
804 /*
805 openItem("para");
806 openSubBlock("content");
807 */
809 /*
810 closeSubBlock();
811 closeItem();
812 */
813}

References m_textblockstart, singleItem and visitChildren.

operator()()

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

Definition at line 308 of file perlmodgen.cpp.

816{
818}

Reference visitChildren.

operator()()

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

Definition at line 309 of file perlmodgen.cpp.

821{
822 const char *type = nullptr;
823 switch (s.type())
824 {
825 case DocSimpleSect::See: type = "see"; break;
826 case DocSimpleSect::Return: type = "return"; break;
827 case DocSimpleSect::Author: type = "author"; break;
828 case DocSimpleSect::Authors: type = "authors"; break;
829 case DocSimpleSect::Version: type = "version"; break;
830 case DocSimpleSect::Since: type = "since"; break;
831 case DocSimpleSect::Date: type = "date"; break;
832 case DocSimpleSect::Note: type = "note"; break;
833 case DocSimpleSect::Warning: type = "warning"; break;
834 case DocSimpleSect::Pre: type = "pre"; break;
835 case DocSimpleSect::Post: type = "post"; break;
836 case DocSimpleSect::Copyright: type = "copyright"; break;
837 case DocSimpleSect::Invar: type = "invariant"; break;
838 case DocSimpleSect::Remark: type = "remark"; break;
839 case DocSimpleSect::Attention: type = "attention"; break;
840 case DocSimpleSect::Important: type = "important"; break;
841 case DocSimpleSect::User: type = "par"; break;
842 case DocSimpleSect::Rcs: type = "rcs"; break;
844 err("unknown simple section found\n");
845 break;
846 }
847 leaveText();
848 m_output.openHash();
849 //openOther();
850 openSubBlock(type);
851 if (s.title())
852 {
853 std::visit(*this,*s.title());
854 }
857 //closeOther();
858 m_output.closeHash();
859}

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()()

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

Definition at line 310 of file perlmodgen.cpp.

862{
863 openItem("title");
864 openSubBlock("content");
867 closeItem();
868}

References closeItem, closeSubBlock, openItem, openSubBlock and visitChildren.

operator()()

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

Definition at line 311 of file perlmodgen.cpp.

871{
872 openItem("list");
873 m_output.addFieldQuotedString("style", "itemized");
874 openSubBlock("content");
877 closeItem();
878}

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

operator()()

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

Definition at line 312 of file perlmodgen.cpp.

881{
883 if (li.paragraph())
884 {
885 std::visit(*this,*li.paragraph());
886 }
888}

References closeSubBlock, openSubBlock and DocSimpleListItem::paragraph.

operator()()

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

Definition at line 313 of file perlmodgen.cpp.

891{
892 QCString sect = QCString().sprintf("sect%d",s.level());
893 openItem(sect);
894 //m_output.addFieldQuotedString("title", s.title());
895 if (s.title())
896 {
897 std::visit(*this,*s.title());
898 }
899 openSubBlock("content");
902 closeItem();
903}

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

operator()()

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

Definition at line 314 of file perlmodgen.cpp.

906{
907 openItem("list");
908 m_output.addFieldQuotedString("style", (l.type() == DocHtmlList::Ordered) ? "ordered" : "itemized");
909 for (const auto &opt : l.attribs())
910 {
911 if (opt.name=="type")
912 {
913 m_output.addFieldQuotedString("list_type", qPrint(opt.value));
914 }
915 if (opt.name=="start")
916 {
917 m_output.addFieldQuotedString("start", qPrint(opt.value));
918 }
919 }
920 openSubBlock("content");
923 closeItem();
924}

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

operator()()

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

Definition at line 315 of file perlmodgen.cpp.

927{
928 for (const auto &opt : l.attribs())
929 {
930 if (opt.name=="value")
931 {
932 m_output.addFieldQuotedString("item_value", qPrint(opt.value));
933 }
934 }
938}

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

operator()()

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

Definition at line 316 of file perlmodgen.cpp.

941{
942#if 0
943 m_output.add("<variablelist>\n");
944#endif
945 visitChildren(dl);
946#if 0
947 m_output.add("</variablelist>\n");
948#endif
949}

References m_output and visitChildren.

operator()()

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

Definition at line 317 of file perlmodgen.cpp.

952{
953#if 0
954 m_output.add("<varlistentry><term>");
955#endif
956 visitChildren(dt);
957#if 0
958 m_output.add("</term></varlistentry>\n");
959#endif
960}

References m_output and visitChildren.

operator()()

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

Definition at line 318 of file perlmodgen.cpp.

963{
964#if 0
965 m_output.add("<listitem>");
966#endif
967 visitChildren(dd);
968#if 0
969 m_output.add("</listitem>\n");
970#endif
971}

References m_output and visitChildren.

operator()()

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

Definition at line 319 of file perlmodgen.cpp.

974{
975#if 0
976 m_output.add("<table rows=\""); m_output.add(t.numRows());
977 m_output.add("\" cols=\""); m_output.add(t.numCols()); m_output.add("\">");
978#endif
979 if (t.caption())
980 {
981 std::visit(*this,*t.caption());
982 }
984#if 0
985 m_output.add("</table>\n");
986#endif
987}

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

operator()()

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

Definition at line 320 of file perlmodgen.cpp.

990{
991#if 0
992 m_output.add("<row>\n");
993#endif
995#if 0
996 m_output.add("</row>\n");
997#endif
998}

References m_output and visitChildren.

operator()()

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

Definition at line 321 of file perlmodgen.cpp.

1001{
1002#if 0
1003 if (c.isHeading()) m_output.add("<entry thead=\"yes\">"); else m_output.add("<entry thead=\"no\">");
1004#endif
1005 visitChildren(c);
1006#if 0
1007 m_output.add("</entry>");
1008#endif
1009}

References DocHtmlCell::isHeading, m_output and visitChildren.

operator()()

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

Definition at line 322 of file perlmodgen.cpp.

1012{
1013#if 0
1014 m_output.add("<caption>");
1015#endif
1016 visitChildren(c);
1017#if 0
1018 m_output.add("</caption>\n");
1019#endif
1020}

References m_output and visitChildren.

operator()()

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

Definition at line 323 of file perlmodgen.cpp.

1023{
1024#if 0
1025 m_output.add("<internal>");
1026#endif
1027 visitChildren(i);
1028#if 0
1029 m_output.add("</internal>");
1030#endif
1031}

References m_output and visitChildren.

operator()()

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

Definition at line 324 of file perlmodgen.cpp.

1034{
1035#if 0
1036 m_output.add("<ulink url=\""); m_output.add(href.url()); m_output.add("\">");
1037#endif
1038 visitChildren(href);
1039#if 0
1040 m_output.add("</ulink>");
1041#endif
1042}

References m_output, DocHRef::url and visitChildren.

operator()()

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

Definition at line 325 of file perlmodgen.cpp.

1045{
1046 openItem("summary");
1047 openSubBlock("content");
1048 visitChildren(summary);
1050 closeItem();
1051}

References closeItem, closeSubBlock, openItem, openSubBlock and visitChildren.

operator()()

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

Definition at line 326 of file perlmodgen.cpp.

1054{
1055 openItem("details");
1056 auto summary = details.summary();
1057 if (summary)
1058 {
1059 std::visit(*this,*summary);
1060 }
1061 openSubBlock("content");
1064 closeItem();
1065}

References closeItem, closeSubBlock, openItem, openSubBlock and visitChildren.

operator()()

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

Definition at line 327 of file perlmodgen.cpp.

1068{
1069#if 0
1070 m_output.add("<sect"); m_output.add(header.level()); m_output.add(">");
1071#endif
1072 visitChildren(header);
1073#if 0
1074 m_output.add("</sect"); m_output.add(header.level()); m_output.add(">\n");
1075#endif
1076}

References DocHtmlHeader::level, m_output and visitChildren.

operator()()

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

Definition at line 328 of file perlmodgen.cpp.

1079{
1080#if 0
1081 m_output.add("<image type=\"");
1082 switch(img.type())
1083 {
1084 case DocImage::Html: m_output.add("html"); break;
1085 case DocImage::Latex: m_output.add("latex"); break;
1086 case DocImage::Rtf: m_output.add("rtf"); break;
1087 }
1088 m_output.add("\"");
1089
1090 QCString baseName=img.name();
1091 int i;
1092 if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
1093 {
1094 baseName=baseName.right(baseName.length()-i-1);
1095 }
1096 m_output.add(" name=\""); m_output.add(baseName); m_output.add("\"");
1097 if (!img.width().isEmpty())
1098 {
1099 m_output.add(" width=\"");
1100 m_output.addQuoted(img.width());
1101 m_output.add("\"");
1102 }
1103 else if (!img.height().isEmpty())
1104 {
1105 m_output.add(" height=\"");
1106 m_output.addQuoted(img.height());
1107 m_output.add("\"");
1108 }
1109 m_output.add(">");
1110#endif
1111 visitChildren(img);
1112#if 0
1113 m_output.add("</image>");
1114#endif
1115}

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()()

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

Definition at line 329 of file perlmodgen.cpp.

1118{
1119#if 0
1120 m_output.add("<dotfile name=\""); m_output.add(df->file()); m_output.add("\">");
1121#endif
1122 visitChildren(df);
1123#if 0
1124 m_output.add("</dotfile>");
1125#endif
1126}

References DocDiagramFileBase::file, m_output and visitChildren.

operator()()

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

Definition at line 330 of file perlmodgen.cpp.

1128{
1129#if 0
1130 m_output.add("<mscfile name=\""); m_output.add(df->file()); m_output.add("\">");
1131#endif
1132 visitChildren(df);
1133#if 0
1134 m_output.add("<mscfile>");
1135#endif
1136}

References DocDiagramFileBase::file, m_output and visitChildren.

operator()()

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

Definition at line 331 of file perlmodgen.cpp.

1139{
1140#if 0
1141 m_output.add("<diafile name=\""); m_output.add(df->file()); m_output.add("\">");
1142#endif
1143 visitChildren(df);
1144#if 0
1145 m_output.add("</diafile>");
1146#endif
1147}

References DocDiagramFileBase::file, m_output and visitChildren.

operator()()

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

Definition at line 332 of file perlmodgen.cpp.

1150{
1151#if 0
1152 m_output.add("<plantumlfile name=\""); m_output.add(df->file()); m_output.add("\">");
1153#endif
1154 visitChildren(df);
1155#if 0
1156 m_output.add("</plantumlfile>");
1157#endif
1158}

References DocDiagramFileBase::file, m_output and visitChildren.

operator()()

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

Definition at line 333 of file perlmodgen.cpp.

1162{
1163 openItem("link");
1164 addLink(lnk.ref(), lnk.file(), lnk.anchor());
1165 visitChildren(lnk);
1166 closeItem();
1167}

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

operator()()

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

Definition at line 334 of file perlmodgen.cpp.

1170{
1171 openItem("ref");
1172 if (!ref.hasLinkText())
1173 m_output.addFieldQuotedString("text", ref.targetTitle());
1174 openSubBlock("content");
1175 visitChildren(ref);
1177 closeItem();
1178}

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

operator()()

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

Definition at line 335 of file perlmodgen.cpp.

1181{
1182#if 0
1183 m_output.add("<tocitem id=\""); m_output.add(ref->file()); m_output.add("_1"); m_output.add(ref->anchor()); m_output.add("\">");
1184#endif
1185 visitChildren(ref);
1186#if 0
1187 m_output.add("</tocitem>");
1188#endif
1189}

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

operator()()

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

Definition at line 336 of file perlmodgen.cpp.

1192{
1193#if 0
1194 m_output.add("<toclist>");
1195#endif
1196 visitChildren(l);
1197#if 0
1198 m_output.add("</toclist>");
1199#endif
1200}

References m_output and visitChildren.

operator()()

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

Definition at line 337 of file perlmodgen.cpp.

1203{
1204 leaveText();
1205 const char *type = nullptr;
1206 switch(s.type())
1207 {
1208 case DocParamSect::Param: type = "params"; break;
1209 case DocParamSect::RetVal: type = "retvals"; break;
1210 case DocParamSect::Exception: type = "exceptions"; break;
1211 case DocParamSect::TemplateParam: type = "templateparam"; break;
1213 err("unknown parameter section found\n");
1214 break;
1215 }
1216 m_output.openHash();
1217 //openOther();
1218 openSubBlock(type);
1219 visitChildren(s);
1221 //closeOther();
1222 m_output.closeHash();
1223}

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

operator()()

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

Definition at line 338 of file perlmodgen.cpp.

1230{
1231 leaveText();
1232 m_output.openHash().openList("parameters");
1233 for (const auto &param : pl.parameters())
1234 {
1235 QCString name;
1236 const DocWord *word = std::get_if<DocWord>(&param);
1237 const DocLinkedWord *linkedWord = std::get_if<DocLinkedWord>(&param);
1238 if (word)
1239 {
1240 name = word->word();
1241 }
1242 else if (linkedWord)
1243 {
1244 name = linkedWord->word();
1245 }
1246
1247 QCString dir = "";
1248 const DocParamSect *sect = std::get_if<DocParamSect>(pl.parent());
1249 if (sect && sect->hasInOutSpecifier())
1250 {
1252 {
1253 if (pl.direction()==DocParamSect::In)
1254 {
1255 dir = "in";
1256 }
1257 else if (pl.direction()==DocParamSect::Out)
1258 {
1259 dir = "out";
1260 }
1261 else if (pl.direction()==DocParamSect::InOut)
1262 {
1263 dir = "in,out";
1264 }
1265 }
1266 }
1267
1268 m_output.openHash()
1269 .addFieldQuotedString("name", name).addFieldQuotedString("dir", dir)
1270 .closeHash();
1271 }
1272 m_output.closeList()
1273 .openList("doc");
1274 for (const auto &par : pl.paragraphs())
1275 {
1276 std::visit(*this,par);
1277 }
1278 leaveText();
1279 m_output.closeList()
1280 .closeHash();
1281}

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 DocWord::word.

operator()()

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

Definition at line 339 of file perlmodgen.cpp.

1284{
1285#if 0
1286 m_output.add("<xrefsect id=\"");
1287 m_output.add(x->file()); m_output.add("_1"); m_output.add(x->anchor());
1288 m_output.add("\">");
1289 m_output.add("<xreftitle>");
1290 m_output.addQuoted(x->title());
1291 m_output.add("</xreftitle>");
1292 m_output.add("<xrefdescription>");
1293#endif
1294 if (x.title().isEmpty()) return;
1295 openItem("xrefitem");
1296 openSubBlock("content");
1297 visitChildren(x);
1298 if (x.title().isEmpty()) return;
1300 closeItem();
1301#if 0
1302 m_output.add("</xrefdescription>");
1303 m_output.add("</xrefsect>");
1304#endif
1305}

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

operator()()

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

Definition at line 340 of file perlmodgen.cpp.

1308{
1309 openItem("ref");
1310 addLink(QCString(),ref.file(),ref.anchor());
1311 openSubBlock("content");
1312 visitChildren(ref);
1314 closeItem();
1315}

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

operator()()

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

Definition at line 341 of file perlmodgen.cpp.

1318{
1319 visitChildren(t);
1320}

Reference visitChildren.

operator()()

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

Definition at line 342 of file perlmodgen.cpp.

1323{
1324 openItem("blockquote");
1325 openSubBlock("content");
1326 visitChildren(q);
1328 closeItem();
1329}

References closeItem, closeSubBlock, openItem, openSubBlock and visitChildren.

operator()()

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

Definition at line 343 of file perlmodgen.cpp.

operator()()

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

Definition at line 344 of file perlmodgen.cpp.

1336{
1337 visitChildren(pb);
1338}

Reference visitChildren.

Public Member Functions

finish()

void PerlModDocVisitor::finish ()

Definition at line 276 of file perlmodgen.cpp.

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

References leaveText, m_other and m_output.

Referenced by addPerlModDocBlock.

Private Member Functions

addLink()

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

Definition at line 360 of file perlmodgen.cpp.

395void PerlModDocVisitor::addLink(const QCString &,const QCString &file,const QCString &anchor)
396{
397 QCString link = file;
398 if (!anchor.isEmpty())
399 (link += "_1") += anchor;
400 m_output.addFieldQuotedString("link", link);
401}

References QCString::isEmpty and m_output.

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

closeItem()

closeSubBlock()

void PerlModDocVisitor::closeSubBlock ()

enterText()

void PerlModDocVisitor::enterText ()

Definition at line 363 of file perlmodgen.cpp.

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

References m_output, m_textmode and openItem.

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

leaveText()

void PerlModDocVisitor::leaveText ()

Definition at line 364 of file perlmodgen.cpp.

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

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)

openSubBlock()

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

singleItem()

void PerlModDocVisitor::singleItem (const QCString & name)

Definition at line 368 of file perlmodgen.cpp.

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

References closeItem and openItem.

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

visitChildren()

template <class T>
void PerlModDocVisitor::visitChildren (const T & t)
inline

Private Member Attributes

m_other

QCString PerlModDocVisitor::m_other

Definition at line 379 of file perlmodgen.cpp.

Referenced by finish.

m_output

m_textblockstart

bool PerlModDocVisitor::m_textblockstart

Definition at line 378 of file perlmodgen.cpp.

Referenced by openSubBlock, operator() and PerlModDocVisitor.

m_textmode

bool PerlModDocVisitor::m_textmode

Definition at line 377 of file perlmodgen.cpp.

Referenced by enterText, leaveText and PerlModDocVisitor.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.