Skip to main content

The PerlModGenerator Class Reference

Declaration

class PerlModGenerator { ... }

Public Constructors Index

PerlModGenerator (bool pretty)

Public Member Functions Index

voidgeneratePerlModForMember (const MemberDef *md, const Definition *)
voidgeneratePerlUserDefinedSection (const Definition *d, const MemberGroupList &mgl)
voidgeneratePerlModSection (const Definition *d, MemberList *ml, const QCString &name, const QCString &header=QCString())
voidaddListOfAllMembers (const ClassDef *cd)
voidaddIncludeInfo (const IncludeInfo *ii)
voidgeneratePerlModForClass (const ClassDef *cd)
voidgeneratePerlModForConcept (const ConceptDef *cd)
voidgeneratePerlModForModule (const ModuleDef *mod)
voidgeneratePerlModForNamespace (const NamespaceDef *nd)
voidgeneratePerlModForFile (const FileDef *fd)
voidgeneratePerlModForGroup (const GroupDef *gd)
voidgeneratePerlModForPage (PageDef *pi)
boolcreateOutputFile (std::ofstream &f, const QCString &s)
boolcreateOutputDir (Dir &perlModDir)
boolgenerateDoxyLatexTex ()
boolgenerateDoxyFormatTex ()
boolgenerateDoxyStructurePM ()
boolgenerateDoxyLatexPL ()
boolgenerateDoxyLatexStructurePL ()
boolgenerateDoxyRules ()
boolgenerateMakefile ()
boolgeneratePerlModOutput ()
voidgenerate ()

Public Member Attributes Index

PerlModOutputm_output
QCStringpathDoxyStructurePM
QCStringpathDoxyDocsTex
QCStringpathDoxyFormatTex
QCStringpathDoxyLatexTex
QCStringpathDoxyLatexDVI
QCStringpathDoxyLatexPDF
QCStringpathDoxyStructureTex
QCStringpathDoxyDocsPM
QCStringpathDoxyLatexPL
QCStringpathDoxyLatexStructurePL
QCStringpathDoxyRules
QCStringpathMakefile

Definition at line 1420 of file perlmodgen.cpp.

Public Constructors

PerlModGenerator()

PerlModGenerator::PerlModGenerator (bool pretty)
inline

Definition at line 1439 of file perlmodgen.cpp.

1439 inline PerlModGenerator(bool pretty) : m_output(pretty) { }

Reference m_output.

Public Member Functions

addIncludeInfo()

void PerlModGenerator::addIncludeInfo (const IncludeInfo * ii)

Definition at line 1446 of file perlmodgen.cpp.

1718{
1719 if (ii)
1720 {
1721 QCString nm = ii->includeName;
1722 if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1723 if (!nm.isEmpty())
1724 {
1725 m_output.openHash("includes");
1726 m_output.addFieldBoolean("local", ii->kind==IncludeKind::IncludeLocal || ii->kind==IncludeKind::ImportLocal)
1727 .addFieldQuotedString("name", nm)
1728 .closeHash();
1729 }
1730 }
1731}

References FileDef::docName, IncludeInfo::fileDef, ImportLocal, IncludeLocal, IncludeInfo::includeName, QCString::isEmpty, IncludeInfo::kind and m_output.

Referenced by generatePerlModForClass and generatePerlModForConcept.

addListOfAllMembers()

void PerlModGenerator::addListOfAllMembers (const ClassDef * cd)

Definition at line 1445 of file perlmodgen.cpp.

1665{
1666 m_output.openList("all_members");
1667 for (auto &mni : cd->memberNameInfoLinkedMap())
1668 {
1669 for (auto &mi : *mni)
1670 {
1671 const MemberDef *md=mi->memberDef();
1672 const ClassDef *mcd=md->getClassDef();
1673
1674 m_output.openHash()
1675 .addFieldQuotedString("name", md->name())
1676 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1677 .addFieldQuotedString("protection", getProtectionName(mi->prot()));
1678
1679 if (!mi->ambiguityResolutionScope().isEmpty())
1680 m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope());
1681
1682 m_output.addFieldQuotedString("scope", mcd->name())
1683 .closeHash();
1684 }
1685 }
1686 m_output.closeList();
1687}

References MemberDef::getClassDef, getProtectionName, getVirtualnessName, m_output, ClassDef::memberNameInfoLinkedMap, Definition::name and MemberDef::virtualness.

Referenced by generatePerlModForClass.

createOutputDir()

bool PerlModGenerator::createOutputDir (Dir & perlModDir)

Definition at line 1456 of file perlmodgen.cpp.

2247{
2248 std::string outputDirectory = Config_getString(OUTPUT_DIRECTORY).str();
2249 perlModDir.setPath(outputDirectory+"/perlmod");
2250 if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
2251 {
2252 err("Could not create perlmod directory in {}\n",outputDirectory);
2253 return false;
2254 }
2255 return true;
2256}

References Config_getString, err, Dir::exists, Dir::mkdir and Dir::setPath.

Referenced by generate.

createOutputFile()

bool PerlModGenerator::createOutputFile (std::ofstream & f, const QCString & s)

Definition at line 1455 of file perlmodgen.cpp.

2235bool PerlModGenerator::createOutputFile(std::ofstream &f, const QCString &s)
2236{
2238 if (!f.is_open())
2239 {
2240 err("Cannot open file {} for writing!\n", s);
2241 return false;
2242 }
2243 return true;
2244}

References err and Portable::openOutputStream.

Referenced by generateDoxyFormatTex, generateDoxyLatexPL, generateDoxyLatexStructurePL, generateDoxyLatexTex, generateDoxyRules, generateDoxyStructurePM, generateMakefile and generatePerlModOutput.

generate()

void PerlModGenerator::generate ()

Definition at line 1466 of file perlmodgen.cpp.

2906{
2907 // + classes
2908 // + namespaces
2909 // + files
2910 // - packages
2911 // + groups
2912 // + related pages
2913 // - examples
2914
2915 Dir perlModDir;
2916 if (!createOutputDir(perlModDir))
2917 return;
2918
2919 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2920
2921 QCString perlModAbsPath = perlModDir.absPath();
2922 pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
2923 pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
2924 pathMakefile = perlModAbsPath + "/Makefile";
2925 pathDoxyRules = perlModAbsPath + "/doxyrules.make";
2926
2927 if (perlmodLatex) {
2928 pathDoxyStructureTex = perlModAbsPath + "/doxystructure.tex";
2929 pathDoxyFormatTex = perlModAbsPath + "/doxyformat.tex";
2930 pathDoxyLatexTex = perlModAbsPath + "/doxylatex.tex";
2931 pathDoxyLatexDVI = perlModAbsPath + "/doxylatex.dvi";
2932 pathDoxyLatexPDF = perlModAbsPath + "/doxylatex.pdf";
2933 pathDoxyDocsTex = perlModAbsPath + "/doxydocs.tex";
2934 pathDoxyLatexPL = perlModAbsPath + "/doxylatex.pl";
2935 pathDoxyLatexStructurePL = perlModAbsPath + "/doxylatex-structure.pl";
2936 }
2937
2941 && generateDoxyRules()))
2942 return;
2943
2944 if (perlmodLatex) {
2949 return;
2950 }
2951}

References Dir::absPath, Config_getBool, createOutputDir, generateDoxyFormatTex, generateDoxyLatexPL, generateDoxyLatexStructurePL, generateDoxyLatexTex, generateDoxyRules, generateDoxyStructurePM, generateMakefile, generatePerlModOutput, pathDoxyDocsPM, pathDoxyDocsTex, pathDoxyFormatTex, pathDoxyLatexDVI, pathDoxyLatexPDF, pathDoxyLatexPL, pathDoxyLatexStructurePL, pathDoxyLatexTex, pathDoxyRules, pathDoxyStructurePM, pathDoxyStructureTex and pathMakefile.

Referenced by generatePerlMod.

generateDoxyFormatTex()

bool PerlModGenerator::generateDoxyFormatTex ()

Definition at line 1458 of file perlmodgen.cpp.

2719{
2720 std::ofstream doxyFormatTexStream;
2721 if (!createOutputFile(doxyFormatTexStream, pathDoxyFormatTex))
2722 return false;
2723
2724 doxyFormatTexStream <<
2725 "\\def\\Defcs#1{\\long\\expandafter\\def\\csname#1\\endcsname}\n"
2726 "\\Defcs{Empty}{}\n"
2727 "\\def\\IfEmpty#1{\\expandafter\\ifx\\csname#1\\endcsname\\Empty}\n"
2728 "\n"
2729 "\\def\\StringNode#1{\\Defcs{#1}##1{##1}}\n"
2730 "\\def\\DocNode#1{\\Defcs{#1}##1{##1}}\n"
2731 "\\def\\ListNode#1{\\Defcs{#1}##1{##1}\\Defcs{#1Sep}{}}\n"
2732 "\\def\\HashNode#1{\\Defcs{#1}{}}\n"
2733 "\n"
2734 "\\input{" << pathDoxyStructureTex << "}\n"
2735 "\n"
2736 "\\newbox\\BoxA\n"
2737 "\\dimendef\\DimenA=151\\relax\n"
2738 "\\dimendef\\DimenB=152\\relax\n"
2739 "\\countdef\\ZoneDepth=151\\relax\n"
2740 "\n"
2741 "\\def\\Cs#1{\\csname#1\\endcsname}\n"
2742 "\\def\\Letcs#1{\\expandafter\\let\\csname#1\\endcsname}\n"
2743 "\\def\\Heading#1{\\vskip 4mm\\relax\\textbf{#1}}\n"
2744 "\\def\\See#1{\\begin{flushleft}\\Heading{See also: }#1\\end{flushleft}}\n"
2745 "\n"
2746 "\\def\\Frame#1{\\vskip 3mm\\relax\\fbox{ \\vbox{\\hsize0.95\\hsize\\vskip 1mm\\relax\n"
2747 "\\raggedright#1\\vskip 0.5mm\\relax} }}\n"
2748 "\n"
2749 "\\def\\Zone#1#2#3{%\n"
2750 "\\Defcs{Test#1}{#2}%\n"
2751 "\\Defcs{Emit#1}{#3}%\n"
2752 "\\Defcs{#1}{%\n"
2753 "\\advance\\ZoneDepth1\\relax\n"
2754 "\\Letcs{Mode\\number\\ZoneDepth}0\\relax\n"
2755 "\\Letcs{Present\\number\\ZoneDepth}0\\relax\n"
2756 "\\Cs{Test#1}\n"
2757 "\\expandafter\\if\\Cs{Present\\number\\ZoneDepth}1%\n"
2758 "\\advance\\ZoneDepth-1\\relax\n"
2759 "\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2760 "\\expandafter\\if\\Cs{Mode\\number\\ZoneDepth}1%\n"
2761 "\\advance\\ZoneDepth1\\relax\n"
2762 "\\Letcs{Mode\\number\\ZoneDepth}1\\relax\n"
2763 "\\Cs{Emit#1}\n"
2764 "\\advance\\ZoneDepth-1\\relax\\fi\n"
2765 "\\advance\\ZoneDepth1\\relax\\fi\n"
2766 "\\advance\\ZoneDepth-1\\relax}}\n"
2767 "\n"
2768 "\\def\\Member#1#2{%\n"
2769 "\\Defcs{Test#1}{\\Cs{field#1Detailed}\n"
2770 "\\IfEmpty{field#1DetailedDoc}\\else\\Letcs{Present#1}1\\fi}\n"
2771 "\\Defcs{#1}{\\Letcs{Present#1}0\\relax\n"
2772 "\\Cs{Test#1}\\if1\\Cs{Present#1}\\Letcs{Present\\number\\ZoneDepth}1\\relax\n"
2773 "\\if1\\Cs{Mode\\number\\ZoneDepth}#2\\fi\\fi}}\n"
2774 "\n"
2775 "\\def\\TypedefMemberList#1#2{%\n"
2776 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2777 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2778 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2779 "%\n"
2780 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2781 "\\Member{#1}{\\Frame{typedef \\Cs{field#1Type} \\Cs{field#1Name}}%\n"
2782 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2783 "\n"
2784 "\\def\\VariableMemberList#1#2{%\n"
2785 "\\Defcs{#1DetailedDoc}##1{\\vskip 5.5mm\\relax##1}%\n"
2786 "\\Defcs{#1Name}##1{\\textbf{##1}}%\n"
2787 "\\Defcs{#1See}##1{\\See{##1}}%\n"
2788 "%\n"
2789 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2790 "\\Member{#1}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}}%\n"
2791 "\\Cs{field#1DetailedDoc}\\Cs{field#1See}\\vskip 5mm\\relax}}%\n"
2792 "\n"
2793 "\\def\\FunctionMemberList#1#2{%\n"
2794 "\\Defcs{#1PDParamName}##1{\\textit{##1}}%\n"
2795 "\\Defcs{#1PDParam}{\\Cs{field#1PDParamName}}%\n"
2796 "\\Defcs{#1PDParamsSep}{, }%\n"
2797 "\\Defcs{#1PDBlocksSep}{\\vskip 2mm\\relax}%\n"
2798 "%\n"
2799 "\\Defcs{#1PDBlocks}##1{%\n"
2800 "\\Heading{Parameters:}\\vskip 1.5mm\\relax\n"
2801 "\\DimenA0pt\\relax\n"
2802 "\\Defcs{#1PDBlock}{\\setbox\\BoxA\\hbox{\\Cs{field#1PDParams}}%\n"
2803 "\\ifdim\\DimenA<\\wd\\BoxA\\DimenA\\wd\\BoxA\\fi}%\n"
2804 "##1%\n"
2805 "\\advance\\DimenA3mm\\relax\n"
2806 "\\DimenB\\hsize\\advance\\DimenB-\\DimenA\\relax\n"
2807 "\\Defcs{#1PDBlock}{\\hbox to\\hsize{\\vtop{\\hsize\\DimenA\\relax\n"
2808 "\\Cs{field#1PDParams}}\\hfill\n"
2809 "\\vtop{\\hsize\\DimenB\\relax\\Cs{field#1PDDoc}}}}%\n"
2810 "##1}\n"
2811 "\n"
2812 "\\Defcs{#1ParamName}##1{\\textit{##1}}\n"
2813 "\\Defcs{#1Param}{\\Cs{field#1ParamType}{} \\Cs{field#1ParamName}}\n"
2814 "\\Defcs{#1ParamsSep}{, }\n"
2815 "\n"
2816 "\\Defcs{#1Name}##1{\\textbf{##1}}\n"
2817 "\\Defcs{#1See}##1{\\See{##1}}\n"
2818 "\\Defcs{#1Return}##1{\\Heading{Returns: }##1}\n"
2819 "\\Defcs{field#1Title}{\\Frame{\\Cs{field#1Type}{} \\Cs{field#1Name}(\\Cs{field#1Params})}}%\n"
2820 "%\n"
2821 "\\Zone{#1s}{\\Cs{field#1List}}{\\subsubsection{#2}\\Cs{field#1List}}%\n"
2822 "\\Member{#1}{%\n"
2823 "\\Cs{field#1Title}\\vskip 6mm\\relax\\Cs{field#1DetailedDoc}\n"
2824 "\\Cs{field#1Return}\\Cs{field#1PDBlocks}\\Cs{field#1See}\\vskip 5mm\\relax}}\n"
2825 "\n"
2826 "\\def\\FileDetailed{\\fieldFileDetailedDoc\\par}\n"
2827 "\\def\\ClassDetailed{\\fieldClassDetailedDoc\\par}\n"
2828 "\n"
2829 "\\def\\FileSubzones{\\fieldFileTypedefs\\fieldFileVariables\\fieldFileFunctions}\n"
2830 "\n"
2831 "\\def\\ClassSubzones{%\n"
2832 "\\fieldClassPublicTypedefs\\fieldClassPublicMembers\\fieldClassPublicMethods\n"
2833 "\\fieldClassProtectedTypedefs\\fieldClassProtectedMembers\\fieldClassProtectedMethods\n"
2834 "\\fieldClassPrivateTypedefs\\fieldClassPrivateMembers\\fieldClassPrivateMethods}\n"
2835 "\n"
2836 "\\Member{Page}{\\subsection{\\fieldPageName}\\fieldPageDetailedDoc}\n"
2837 "\n"
2838 "\\TypedefMemberList{FileTypedef}{Typedefs}\n"
2839 "\\VariableMemberList{FileVariable}{Variables}\n"
2840 "\\FunctionMemberList{FileFunction}{Functions}\n"
2841 "\\Zone{File}{\\FileSubzones}{\\subsection{\\fieldFileName}\\fieldFileDetailed\\FileSubzones}\n"
2842 "\n"
2843 "\\TypedefMemberList{ClassPublicTypedef}{Public Typedefs}\n"
2844 "\\TypedefMemberList{ClassProtectedTypedef}{Protected Typedefs}\n"
2845 "\\TypedefMemberList{ClassPrivateTypedef}{Private Typedefs}\n"
2846 "\\VariableMemberList{ClassPublicMember}{Public Members}\n"
2847 "\\VariableMemberList{ClassProtectedMember}{Protected Members}\n"
2848 "\\VariableMemberList{ClassPrivateMember}{Private Members}\n"
2849 "\\FunctionMemberList{ClassPublicMethod}{Public Methods}\n"
2850 "\\FunctionMemberList{ClassProtectedMethod}{Protected Methods}\n"
2851 "\\FunctionMemberList{ClassPrivateMethod}{Private Methods}\n"
2852 "\\Zone{Class}{\\ClassSubzones}{\\subsection{\\fieldClassName}\\fieldClassDetailed\\ClassSubzones}\n"
2853 "\n"
2854 "\\Zone{AllPages}{\\fieldPages}{\\section{Pages}\\fieldPages}\n"
2855 "\\Zone{AllFiles}{\\fieldFiles}{\\section{Files}\\fieldFiles}\n"
2856 "\\Zone{AllClasses}{\\fieldClasses}{\\section{Classes}\\fieldClasses}\n"
2857 "\n"
2858 "\\newlength{\\oldparskip}\n"
2859 "\\newlength{\\oldparindent}\n"
2860 "\\newlength{\\oldfboxrule}\n"
2861 "\n"
2862 "\\ZoneDepth0\\relax\n"
2863 "\\Letcs{Mode0}1\\relax\n"
2864 "\n"
2865 "\\def\\EmitDoxyDocs{%\n"
2866 "\\setlength{\\oldparskip}{\\parskip}\n"
2867 "\\setlength{\\oldparindent}{\\parindent}\n"
2868 "\\setlength{\\oldfboxrule}{\\fboxrule}\n"
2869 "\\setlength{\\parskip}{0cm}\n"
2870 "\\setlength{\\parindent}{0cm}\n"
2871 "\\setlength{\\fboxrule}{1pt}\n"
2872 "\\AllPages\\AllFiles\\AllClasses\n"
2873 "\\setlength{\\parskip}{\\oldparskip}\n"
2874 "\\setlength{\\parindent}{\\oldparindent}\n"
2875 "\\setlength{\\fboxrule}{\\oldfboxrule}}\n";
2876
2877 return true;
2878}

References createOutputFile, pathDoxyFormatTex and pathDoxyStructureTex.

Referenced by generate.

generateDoxyLatexPL()

bool PerlModGenerator::generateDoxyLatexPL ()

Definition at line 1460 of file perlmodgen.cpp.

2597{
2598 std::ofstream doxyLatexPLStream;
2599 if (!createOutputFile(doxyLatexPLStream, pathDoxyLatexPL))
2600 return false;
2601
2602 doxyLatexPLStream <<
2603 "use DoxyStructure;\n"
2604 "use DoxyDocs;\n"
2605 "\n"
2606 "sub latex_quote($) {\n"
2607 "\tmy $text = $_[0];\n"
2608 "\t$text =~ s/\\\\/\\\\textbackslash /g;\n"
2609 "\t$text =~ s/\\|/\\\\textbar /g;\n"
2610 "\t$text =~ s/</\\\\textless /g;\n"
2611 "\t$text =~ s/>/\\\\textgreater /g;\n"
2612 "\t$text =~ s/~/\\\\textasciitilde /g;\n"
2613 "\t$text =~ s/\\^/\\\\textasciicircum /g;\n"
2614 "\t$text =~ s/[\\$&%#_{}]/\\\\$&/g;\n"
2615 "\tprint $text;\n"
2616 "}\n"
2617 "\n"
2618 "sub generate_doc($) {\n"
2619 "\tmy $doc = $_[0];\n"
2620 "\tfor my $item (@$doc) {\n"
2621 "\t\tmy $type = $$item{type};\n"
2622 "\t\tif ($type eq \"text\") {\n"
2623 "\t\t\tlatex_quote($$item{content});\n"
2624 "\t\t} elsif ($type eq \"parbreak\") {\n"
2625 "\t\t\tprint \"\\n\\n\";\n"
2626 "\t\t} elsif ($type eq \"style\") {\n"
2627 "\t\t\tmy $style = $$item{style};\n"
2628 "\t\t\tif ($$item{enable} eq \"yes\") {\n"
2629 "\t\t\t\tif ($style eq \"bold\") { print '\\bfseries'; }\n"
2630 "\t\t\t\tif ($style eq \"italic\") { print '\\itshape'; }\n"
2631 "\t\t\t\tif ($style eq \"code\") { print '\\ttfamily'; }\n"
2632 "\t\t\t} else {\n"
2633 "\t\t\t\tif ($style eq \"bold\") { print '\\mdseries'; }\n"
2634 "\t\t\t\tif ($style eq \"italic\") { print '\\upshape'; }\n"
2635 "\t\t\t\tif ($style eq \"code\") { print '\\rmfamily'; }\n"
2636 "\t\t\t}\n"
2637 "\t\t\tprint '{}';\n"
2638 "\t\t} elsif ($type eq \"symbol\") {\n"
2639 "\t\t\tmy $symbol = $$item{symbol};\n"
2640 "\t\t\tif ($symbol eq \"copyright\") { print '\\copyright'; }\n"
2641 "\t\t\telsif ($symbol eq \"szlig\") { print '\\ss'; }\n"
2642 "\t\t\tprint '{}';\n"
2643 "\t\t} elsif ($type eq \"accent\") {\n"
2644 "\t\t\tmy ($accent) = $$item{accent};\n"
2645 "\t\t\tif ($accent eq \"umlaut\") { print '\\\"'; }\n"
2646 "\t\t\telsif ($accent eq \"acute\") { print '\\\\\\''; }\n"
2647 "\t\t\telsif ($accent eq \"grave\") { print '\\`'; }\n"
2648 "\t\t\telsif ($accent eq \"circ\") { print '\\^'; }\n"
2649 "\t\t\telsif ($accent eq \"tilde\") { print '\\~'; }\n"
2650 "\t\t\telsif ($accent eq \"cedilla\") { print '\\c'; }\n"
2651 "\t\t\telsif ($accent eq \"ring\") { print '\\r'; }\n"
2652 "\t\t\tprint \"{\" . $$item{letter} . \"}\"; \n"
2653 "\t\t} elsif ($type eq \"list\") {\n"
2654 "\t\t\tmy $env = ($$item{style} eq \"ordered\") ? \"enumerate\" : \"itemize\";\n"
2655 "\t\t\tprint \"\\n\\\\begin{\" . $env .\"}\";\n"
2656 "\t\t \tfor my $subitem (@{$$item{content}}) {\n"
2657 "\t\t\t\tprint \"\\n\\\\item \";\n"
2658 "\t\t\t\tgenerate_doc($subitem);\n"
2659 "\t\t \t}\n"
2660 "\t\t\tprint \"\\n\\\\end{\" . $env .\"}\";\n"
2661 "\t\t} elsif ($type eq \"url\") {\n"
2662 "\t\t\tlatex_quote($$item{content});\n"
2663 "\t\t}\n"
2664 "\t}\n"
2665 "}\n"
2666 "\n"
2667 "sub generate($$) {\n"
2668 "\tmy ($item, $node) = @_;\n"
2669 "\tmy ($type, $name) = @$node[0, 1];\n"
2670 "\tif ($type eq \"string\") {\n"
2671 "\t\tprint \"\\\\\" . $name . \"{\";\n"
2672 "\t\tlatex_quote($item);\n"
2673 "\t\tprint \"}\";\n"
2674 "\t} elsif ($type eq \"doc\") {\n"
2675 "\t\tif (@$item) {\n"
2676 "\t\t\tprint \"\\\\\" . $name . \"{\";\n"
2677 "\t\t\tgenerate_doc($item);\n"
2678 "\t\t\tprint \"}%\\n\";\n"
2679 "\t\t} else {\n"
2680 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2681 "\t\t}\n"
2682 "\t} elsif ($type eq \"hash\") {\n"
2683 "\t\tmy ($key, $value);\n"
2684 "\t\twhile (($key, $subnode) = each %{$$node[2]}) {\n"
2685 "\t\t\tmy $subname = $$subnode[1];\n"
2686 "\t\t\tprint \"\\\\Defcs{field\" . $subname . \"}{\";\n"
2687 "\t\t\tif ($$item{$key}) {\n"
2688 "\t\t\t\tgenerate($$item{$key}, $subnode);\n"
2689 "\t\t\t} else {\n"
2690 "#\t\t\t\t\tprint \"\\\\\" . $subname . \"Empty%\\n\";\n"
2691 "\t\t\t}\n"
2692 "\t\t\tprint \"}%\\n\";\n"
2693 "\t\t}\n"
2694 "\t\tprint \"\\\\\" . $name . \"%\\n\";\n"
2695 "\t} elsif ($type eq \"list\") {\n"
2696 "\t\tmy $index = 0;\n"
2697 "\t\tif (@$item) {\n"
2698 "\t\t\tprint \"\\\\\" . $name . \"{%\\n\";\n"
2699 "\t\t\tfor my $subitem (@$item) {\n"
2700 "\t\t\t\tif ($index) {\n"
2701 "\t\t\t\t\tprint \"\\\\\" . $name . \"Sep%\\n\";\n"
2702 "\t\t\t\t}\n"
2703 "\t\t\t\tgenerate($subitem, $$node[2]);\n"
2704 "\t\t\t\t$index++;\n"
2705 "\t\t\t}\n"
2706 "\t\t\tprint \"}%\\n\";\n"
2707 "\t\t} else {\n"
2708 "#\t\t\tprint \"\\\\\" . $name . \"Empty%\\n\";\n"
2709 "\t\t}\n"
2710 "\t}\n"
2711 "}\n"
2712 "\n"
2713 "generate($doxydocs, $doxystructure);\n";
2714
2715 return true;
2716}

References createOutputFile and pathDoxyLatexPL.

Referenced by generate.

generateDoxyLatexStructurePL()

bool PerlModGenerator::generateDoxyLatexStructurePL ()

Definition at line 1461 of file perlmodgen.cpp.

2564{
2565 std::ofstream doxyLatexStructurePLStream;
2566 if (!createOutputFile(doxyLatexStructurePLStream, pathDoxyLatexStructurePL))
2567 return false;
2568
2569 doxyLatexStructurePLStream <<
2570 "use DoxyStructure;\n"
2571 "\n"
2572 "sub process($) {\n"
2573 "\tmy $node = $_[0];\n"
2574 "\tmy ($type, $name) = @$node[0, 1];\n"
2575 "\tmy $command;\n"
2576 "\tif ($type eq \"string\") { $command = \"String\" }\n"
2577 "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
2578 "\telsif ($type eq \"hash\") {\n"
2579 "\t\t$command = \"Hash\";\n"
2580 "\t\tfor my $subnode (values %{$$node[2]}) {\n"
2581 "\t\t\tprocess($subnode);\n"
2582 "\t\t}\n"
2583 "\t}\n"
2584 "\telsif ($type eq \"list\") {\n"
2585 "\t\t$command = \"List\";\n"
2586 "\t\tprocess($$node[2]);\n"
2587 "\t}\n"
2588 "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
2589 "}\n"
2590 "\n"
2591 "process($doxystructure);\n";
2592
2593 return true;
2594}

References createOutputFile and pathDoxyLatexStructurePL.

Referenced by generate.

generateDoxyLatexTex()

bool PerlModGenerator::generateDoxyLatexTex ()

Definition at line 1457 of file perlmodgen.cpp.

2881{
2882 std::ofstream doxyLatexTexStream;
2883 if (!createOutputFile(doxyLatexTexStream, pathDoxyLatexTex))
2884 return false;
2885
2886 doxyLatexTexStream <<
2887 "\\documentclass[a4paper,12pt]{article}\n"
2888 "\\usepackage[latin1]{inputenc}\n"
2889 "\\usepackage[none]{hyphenat}\n"
2890 "\\usepackage[T1]{fontenc}\n"
2891 "\\usepackage{hyperref}\n"
2892 "\\usepackage{times}\n"
2893 "\n"
2894 "\\input{doxyformat}\n"
2895 "\n"
2896 "\\begin{document}\n"
2897 "\\input{" << pathDoxyDocsTex << "}\n"
2898 "\\sloppy\n"
2899 "\\EmitDoxyDocs\n"
2900 "\\end{document}\n";
2901
2902 return true;
2903}

References createOutputFile, pathDoxyDocsTex and pathDoxyLatexTex.

Referenced by generate.

generateDoxyRules()

bool PerlModGenerator::generateDoxyRules ()

Definition at line 1462 of file perlmodgen.cpp.

2442{
2443 std::ofstream doxyRulesStream;
2444 if (!createOutputFile(doxyRulesStream, pathDoxyRules))
2445 return false;
2446
2447 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2448 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2449
2450 doxyRulesStream <<
2451 prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
2452 prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
2453 prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" <<
2454 prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" <<
2455 prefix << "DOXYRULES = " << pathDoxyRules << "\n";
2456 if (perlmodLatex)
2457 doxyRulesStream <<
2458 prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" <<
2459 prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" <<
2460 prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" <<
2461 prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" <<
2462 prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" <<
2463 prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" <<
2464 prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" <<
2465 prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
2466
2467 doxyRulesStream <<
2468 "\n"
2469 ".PHONY: clean-perlmod\n"
2470 "clean-perlmod::\n"
2471 "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2472 "\t$(" << prefix << "DOXYDOCS_PM)";
2473 if (perlmodLatex)
2474 doxyRulesStream <<
2475 " \\\n"
2476 "\t$(" << prefix << "DOXYLATEX_PL) \\\n"
2477 "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2478 "\t$(" << prefix << "DOXYDOCS_TEX) \\\n"
2479 "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2480 "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2481 "\t$(" << prefix << "DOXYLATEX_TEX) \\\n"
2482 "\t$(" << prefix << "DOXYLATEX_PDF) \\\n"
2483 "\t$(" << prefix << "DOXYLATEX_DVI) \\\n"
2484 "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)";
2485 doxyRulesStream << "\n\n";
2486
2487 doxyRulesStream <<
2488 "$(" << prefix << "DOXYRULES) \\\n"
2489 "$(" << prefix << "DOXYMAKEFILE) \\\n"
2490 "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2491 "$(" << prefix << "DOXYDOCS_PM)";
2492 if (perlmodLatex) {
2493 doxyRulesStream <<
2494 " \\\n"
2495 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2496 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2497 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2498 "$(" << prefix << "DOXYLATEX_TEX)";
2499 }
2500 doxyRulesStream <<
2501 ": \\\n"
2502 "\t$(" << prefix << "DOXYFILE)\n"
2503 "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
2504
2505 if (perlmodLatex) {
2506 doxyRulesStream <<
2507 "\n"
2508 "$(" << prefix << "DOXYDOCS_TEX): \\\n"
2509 "$(" << prefix << "DOXYLATEX_PL) \\\n"
2510 "$(" << prefix << "DOXYDOCS_PM)\n"
2511 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2512 "\n"
2513 "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n"
2514 "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2515 "$(" << prefix << "DOXYSTRUCTURE_PM)\n"
2516 "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2517 "\n"
2518 "$(" << prefix << "DOXYLATEX_PDF) \\\n"
2519 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2520 "$(" << prefix << "DOXYLATEX_TEX) \\\n"
2521 "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2522 "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2523 "$(" << prefix << "DOXYDOCS_TEX)\n"
2524 "\n"
2525 "$(" << prefix << "DOXYLATEX_PDF): \\\n"
2526 "$(" << prefix << "DOXYLATEX_TEX)\n"
2527 "\tpdflatex -interaction=nonstopmode \"$<\"\n"
2528 "\n"
2529 "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2530 "$(" << prefix << "DOXYLATEX_TEX)\n"
2531 "\tlatex -interaction=nonstopmode \"$<\"\n";
2532 }
2533
2534 return true;
2535}

References Config_getBool, Config_getString, createOutputFile, pathDoxyDocsPM, pathDoxyDocsTex, pathDoxyExec, pathDoxyfile, pathDoxyFormatTex, pathDoxyLatexDVI, pathDoxyLatexPDF, pathDoxyLatexPL, pathDoxyLatexStructurePL, pathDoxyLatexTex, pathDoxyRules, pathDoxyStructurePM, pathDoxyStructureTex and prefix.

Referenced by generate.

generateDoxyStructurePM()

bool PerlModGenerator::generateDoxyStructurePM ()

Definition at line 1459 of file perlmodgen.cpp.

2259{
2260 std::ofstream doxyModelPMStream;
2261 if (!createOutputFile(doxyModelPMStream, pathDoxyStructurePM))
2262 return false;
2263
2264 doxyModelPMStream <<
2265 "sub memberlist($) {\n"
2266 " my $prefix = $_[0];\n"
2267 " return\n"
2268 "\t[ \"hash\", $prefix . \"s\",\n"
2269 "\t {\n"
2270 "\t members =>\n"
2271 "\t [ \"list\", $prefix . \"List\",\n"
2272 "\t\t[ \"hash\", $prefix,\n"
2273 "\t\t {\n"
2274 "\t\t kind => [ \"string\", $prefix . \"Kind\" ],\n"
2275 "\t\t name => [ \"string\", $prefix . \"Name\" ],\n"
2276 "\t\t static => [ \"string\", $prefix . \"Static\" ],\n"
2277 "\t\t virtualness => [ \"string\", $prefix . \"Virtualness\" ],\n"
2278 "\t\t protection => [ \"string\", $prefix . \"Protection\" ],\n"
2279 "\t\t type => [ \"string\", $prefix . \"Type\" ],\n"
2280 "\t\t parameters =>\n"
2281 "\t\t [ \"list\", $prefix . \"Params\",\n"
2282 "\t\t\t[ \"hash\", $prefix . \"Param\",\n"
2283 "\t\t\t {\n"
2284 "\t\t\t declaration_name => [ \"string\", $prefix . \"ParamName\" ],\n"
2285 "\t\t\t type => [ \"string\", $prefix . \"ParamType\" ],\n"
2286 "\t\t\t },\n"
2287 "\t\t\t],\n"
2288 "\t\t ],\n"
2289 "\t\t detailed =>\n"
2290 "\t\t [ \"hash\", $prefix . \"Detailed\",\n"
2291 "\t\t\t{\n"
2292 "\t\t\t doc => [ \"doc\", $prefix . \"DetailedDoc\" ],\n"
2293 "\t\t\t return => [ \"doc\", $prefix . \"Return\" ],\n"
2294 "\t\t\t see => [ \"doc\", $prefix . \"See\" ],\n"
2295 "\t\t\t params =>\n"
2296 "\t\t\t [ \"list\", $prefix . \"PDBlocks\",\n"
2297 "\t\t\t [ \"hash\", $prefix . \"PDBlock\",\n"
2298 "\t\t\t\t{\n"
2299 "\t\t\t\t parameters =>\n"
2300 "\t\t\t\t [ \"list\", $prefix . \"PDParams\",\n"
2301 "\t\t\t\t [ \"hash\", $prefix . \"PDParam\",\n"
2302 "\t\t\t\t\t{\n"
2303 "\t\t\t\t\t name => [ \"string\", $prefix . \"PDParamName\" ],\n"
2304 "\t\t\t\t\t},\n"
2305 "\t\t\t\t ],\n"
2306 "\t\t\t\t ],\n"
2307 "\t\t\t\t doc => [ \"doc\", $prefix . \"PDDoc\" ],\n"
2308 "\t\t\t\t},\n"
2309 "\t\t\t ],\n"
2310 "\t\t\t ],\n"
2311 "\t\t\t},\n"
2312 "\t\t ],\n"
2313 "\t\t },\n"
2314 "\t\t],\n"
2315 "\t ],\n"
2316 "\t },\n"
2317 "\t];\n"
2318 "}\n"
2319 "\n"
2320 "$doxystructure =\n"
2321 " [ \"hash\", \"Root\",\n"
2322 " {\n"
2323 "\tfiles =>\n"
2324 "\t [ \"list\", \"Files\",\n"
2325 "\t [ \"hash\", \"File\",\n"
2326 "\t {\n"
2327 "\t\tname => [ \"string\", \"FileName\" ],\n"
2328 "\t\ttypedefs => memberlist(\"FileTypedef\"),\n"
2329 "\t\tvariables => memberlist(\"FileVariable\"),\n"
2330 "\t\tfunctions => memberlist(\"FileFunction\"),\n"
2331 "\t\tdetailed =>\n"
2332 "\t\t [ \"hash\", \"FileDetailed\",\n"
2333 "\t\t {\n"
2334 "\t\t doc => [ \"doc\", \"FileDetailedDoc\" ],\n"
2335 "\t\t },\n"
2336 "\t\t ],\n"
2337 "\t },\n"
2338 "\t ],\n"
2339 "\t ],\n"
2340 "\tpages =>\n"
2341 "\t [ \"list\", \"Pages\",\n"
2342 "\t [ \"hash\", \"Page\",\n"
2343 "\t {\n"
2344 "\t\tname => [ \"string\", \"PageName\" ],\n"
2345 "\t\tdetailed =>\n"
2346 "\t\t [ \"hash\", \"PageDetailed\",\n"
2347 "\t\t {\n"
2348 "\t\t doc => [ \"doc\", \"PageDetailedDoc\" ],\n"
2349 "\t\t },\n"
2350 "\t\t ],\n"
2351 "\t },\n"
2352 "\t ],\n"
2353 "\t ],\n"
2354 "\tclasses =>\n"
2355 "\t [ \"list\", \"Classes\",\n"
2356 "\t [ \"hash\", \"Class\",\n"
2357 "\t {\n"
2358 "\t\tname => [ \"string\", \"ClassName\" ],\n"
2359 "\t\tpublic_typedefs => memberlist(\"ClassPublicTypedef\"),\n"
2360 "\t\tpublic_methods => memberlist(\"ClassPublicMethod\"),\n"
2361 "\t\tpublic_members => memberlist(\"ClassPublicMember\"),\n"
2362 "\t\tprotected_typedefs => memberlist(\"ClassProtectedTypedef\"),\n"
2363 "\t\tprotected_methods => memberlist(\"ClassProtectedMethod\"),\n"
2364 "\t\tprotected_members => memberlist(\"ClassProtectedMember\"),\n"
2365 "\t\tprivate_typedefs => memberlist(\"ClassPrivateTypedef\"),\n"
2366 "\t\tprivate_methods => memberlist(\"ClassPrivateMethod\"),\n"
2367 "\t\tprivate_members => memberlist(\"ClassPrivateMember\"),\n"
2368 "\t\tdetailed =>\n"
2369 "\t\t [ \"hash\", \"ClassDetailed\",\n"
2370 "\t\t {\n"
2371 "\t\t doc => [ \"doc\", \"ClassDetailedDoc\" ],\n"
2372 "\t\t },\n"
2373 "\t\t ],\n"
2374 "\t },\n"
2375 "\t ],\n"
2376 "\t ],\n"
2377 "\tgroups =>\n"
2378 "\t [ \"list\", \"Groups\",\n"
2379 "\t [ \"hash\", \"Group\",\n"
2380 "\t {\n"
2381 "\t\tname => [ \"string\", \"GroupName\" ],\n"
2382 "\t\ttitle => [ \"string\", \"GroupTitle\" ],\n"
2383 "\t\tfiles =>\n"
2384 "\t\t [ \"list\", \"Files\",\n"
2385 "\t\t [ \"hash\", \"File\",\n"
2386 "\t\t {\n"
2387 "\t\t name => [ \"string\", \"Filename\" ]\n"
2388 "\t\t }\n"
2389 "\t\t ],\n"
2390 "\t\t ],\n"
2391 "\t\tclasses =>\n"
2392 "\t\t [ \"list\", \"Classes\",\n"
2393 "\t\t [ \"hash\", \"Class\",\n"
2394 "\t\t {\n"
2395 "\t\t name => [ \"string\", \"Classname\" ]\n"
2396 "\t\t }\n"
2397 "\t\t ],\n"
2398 "\t\t ],\n"
2399 "\t\tnamespaces =>\n"
2400 "\t\t [ \"list\", \"Namespaces\",\n"
2401 "\t\t [ \"hash\", \"Namespace\",\n"
2402 "\t\t {\n"
2403 "\t\t name => [ \"string\", \"NamespaceName\" ]\n"
2404 "\t\t }\n"
2405 "\t\t ],\n"
2406 "\t\t ],\n"
2407 "\t\tpages =>\n"
2408 "\t\t [ \"list\", \"Pages\",\n"
2409 "\t\t [ \"hash\", \"Page\","
2410 "\t\t {\n"
2411 "\t\t title => [ \"string\", \"PageName\" ]\n"
2412 "\t\t }\n"
2413 "\t\t ],\n"
2414 "\t\t ],\n"
2415 "\t\tgroups =>\n"
2416 "\t\t [ \"list\", \"Groups\",\n"
2417 "\t\t [ \"hash\", \"Group\",\n"
2418 "\t\t {\n"
2419 "\t\t title => [ \"string\", \"GroupName\" ]\n"
2420 "\t\t }\n"
2421 "\t\t ],\n"
2422 "\t\t ],\n"
2423 "\t\tfunctions => memberlist(\"GroupFunction\"),\n"
2424 "\t\tdetailed =>\n"
2425 "\t\t [ \"hash\", \"GroupDetailed\",\n"
2426 "\t\t {\n"
2427 "\t\t doc => [ \"doc\", \"GroupDetailedDoc\" ],\n"
2428 "\t\t },\n"
2429 "\t\t ],\n"
2430 "\t }\n"
2431 "\t ],\n"
2432 "\t ],\n"
2433 " },\n"
2434 " ];\n"
2435 "\n"
2436 "1;\n";
2437
2438 return true;
2439}

References createOutputFile and pathDoxyStructurePM.

Referenced by generate.

generateMakefile()

bool PerlModGenerator::generateMakefile ()

Definition at line 1463 of file perlmodgen.cpp.

2538{
2539 std::ofstream makefileStream;
2540 if (!createOutputFile(makefileStream, pathMakefile))
2541 return false;
2542
2543 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2544 QCString prefix = Config_getString(PERLMOD_MAKEVAR_PREFIX);
2545
2546 makefileStream <<
2547 ".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n"
2548 "default: " << (perlmodLatex ? "pdf" : "clean") << "\n"
2549 "\n"
2550 "include " << pathDoxyRules << "\n"
2551 "\n"
2552 "clean: clean-perlmod\n";
2553
2554 if (perlmodLatex) {
2555 makefileStream <<
2556 "pdf: $(" << prefix << "DOXYLATEX_PDF)\n"
2557 "dvi: $(" << prefix << "DOXYLATEX_DVI)\n";
2558 }
2559
2560 return true;
2561}

References Config_getBool, Config_getString, createOutputFile, pathDoxyRules, pathMakefile and prefix.

Referenced by generate.

generatePerlModForClass()

void PerlModGenerator::generatePerlModForClass (const ClassDef * cd)

Definition at line 1447 of file perlmodgen.cpp.

1734{
1735 // + brief description
1736 // + detailed description
1737 // + template argument list(s)
1738 // - include file
1739 // + member groups
1740 // + inheritance diagram
1741 // + list of direct super classes
1742 // + list of direct sub classes
1743 // + list of inner classes
1744 // + collaboration diagram
1745 // + list of all members
1746 // + user defined member sections
1747 // + standard member sections
1748 // + detailed member documentation
1749 // - examples using the class
1750
1751 if (cd->isReference()) return; // skip external references.
1752 if (cd->isAnonymous()) return; // skip anonymous compounds.
1753 if (cd->isImplicitTemplateInstance()) return; // skip generated template instances.
1754
1755 m_output.openHash()
1756 .addFieldQuotedString("name", cd->name());
1757 /* DGA: fix # #7547 Perlmod does not generate "kind" information to discriminate struct/union */
1758 m_output.addFieldQuotedString("kind", cd->compoundTypeString());
1759
1760 if (!cd->baseClasses().empty())
1761 {
1762 m_output.openList("base");
1763 for (const auto &bcd : cd->baseClasses())
1764 {
1765 m_output.openHash()
1766 .addFieldQuotedString("name", bcd.classDef->displayName())
1767 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1768 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1769 .closeHash();
1770 }
1771 m_output.closeList();
1772 }
1773
1774 if (!cd->subClasses().empty())
1775 {
1776 m_output.openList("derived");
1777 for (const auto &bcd : cd->subClasses())
1778 {
1779 m_output.openHash()
1780 .addFieldQuotedString("name", bcd.classDef->displayName())
1781 .addFieldQuotedString("virtualness", getVirtualnessName(bcd.virt))
1782 .addFieldQuotedString("protection", getProtectionName(bcd.prot))
1783 .closeHash();
1784 }
1785 m_output.closeList();
1786 }
1787
1788 {
1789 m_output.openList("inner");
1790 for (const auto &icd : cd->getClasses())
1791 m_output.openHash()
1792 .addFieldQuotedString("name", icd->name())
1793 .closeHash();
1794 m_output.closeList();
1795 }
1796
1798
1802
1803 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubTypes()),"public_typedefs");
1804 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubMethods()),"public_methods");
1805 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubAttribs()),"public_members");
1806 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubSlots()),"public_slots");
1807 generatePerlModSection(cd,cd->getMemberList(MemberListType::Signals()),"signals");
1808 generatePerlModSection(cd,cd->getMemberList(MemberListType::DcopMethods()),"dcop_methods");
1809 generatePerlModSection(cd,cd->getMemberList(MemberListType::Properties()),"properties");
1810 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticMethods()),"public_static_methods");
1811 generatePerlModSection(cd,cd->getMemberList(MemberListType::PubStaticAttribs()),"public_static_members");
1812 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProTypes()),"protected_typedefs");
1813 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProMethods()),"protected_methods");
1814 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProAttribs()),"protected_members");
1815 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProSlots()),"protected_slots");
1816 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticMethods()),"protected_static_methods");
1817 generatePerlModSection(cd,cd->getMemberList(MemberListType::ProStaticAttribs()),"protected_static_members");
1818 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriTypes()),"private_typedefs");
1819 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriMethods()),"private_methods");
1820 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriAttribs()),"private_members");
1821 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriSlots()),"private_slots");
1822 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticMethods()),"private_static_methods");
1823 generatePerlModSection(cd,cd->getMemberList(MemberListType::PriStaticAttribs()),"private_static_members");
1824 generatePerlModSection(cd,cd->getMemberList(MemberListType::Friends()),"friend_methods");
1825 generatePerlModSection(cd,cd->getMemberList(MemberListType::Related()),"related_methods");
1826
1827 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->briefDescription());
1828 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd,nullptr,cd->documentation());
1829
1830#if 0
1831 DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
1832 if (!inheritanceGraph.isTrivial())
1833 {
1834 t << " <inheritancegraph>" << endl;
1835 inheritanceGraph.writePerlMod(t);
1836 t << " </inheritancegraph>" << endl;
1837 }
1838 DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
1839 if (!collaborationGraph.isTrivial())
1840 {
1841 t << " <collaborationgraph>" << endl;
1842 collaborationGraph.writePerlMod(t);
1843 t << " </collaborationgraph>" << endl;
1844 }
1845 t << " <location file=\""
1846 << cd->getDefFileName() << "\" line=\""
1847 << cd->getDefLine() << "\"";
1848 if (cd->getStartBodyLine()!=-1)
1849 {
1850 t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1851 << cd->getEndBodyLine() << "\"";
1852 }
1853 t << "/>" << endl;
1854#endif
1855
1856 m_output.closeHash();
1857}

References addIncludeInfo, addListOfAllMembers, addPerlModDocBlock, addTemplateList, ClassDef::baseClasses, Definition::briefDescription, ClassDef::compoundTypeString, Definition::documentation, generatePerlModSection, generatePerlUserDefinedSection, ClassDef::getClasses, Definition::getDefFileName, Definition::getDefLine, Definition::getEndBodyLine, ClassDef::getMemberGroups, ClassDef::getMemberList, getProtectionName, Definition::getStartBodyLine, getVirtualnessName, ClassDef::includeInfo, Definition::isAnonymous, ClassDef::isImplicitTemplateInstance, Definition::isReference, DotClassGraph::isTrivial, m_output, Definition::name and ClassDef::subClasses.

Referenced by generatePerlModOutput.

generatePerlModForConcept()

void PerlModGenerator::generatePerlModForConcept (const ConceptDef * cd)

Definition at line 1448 of file perlmodgen.cpp.

1860{
1861 if (cd->isReference()) return; // skip external references
1862
1863 m_output.openHash()
1864 .addFieldQuotedString("name", cd->name());
1865
1868 m_output.addFieldQuotedString("initializer", cd->initializer());
1869 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->briefDescription());
1870 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->documentation());
1871
1872 m_output.closeHash();
1873}

References addIncludeInfo, addPerlModDocBlock, addTemplateList, Definition::briefDescription, Definition::documentation, Definition::getDefFileName, Definition::getDefLine, ConceptDef::includeInfo, ConceptDef::initializer, Definition::isReference, m_output and Definition::name.

Referenced by generatePerlModOutput.

generatePerlModForFile()

void PerlModGenerator::generatePerlModForFile (const FileDef * fd)

Definition at line 1451 of file perlmodgen.cpp.

1987{
1988 // + includes files
1989 // + includedby files
1990 // - include graph
1991 // - included by graph
1992 // - contained class definitions
1993 // - contained namespace definitions
1994 // - member groups
1995 // + normal members
1996 // + brief desc
1997 // + detailed desc
1998 // - source code
1999 // - location
2000 // - number of lines
2001
2002 if (fd->isReference()) return;
2003
2004 m_output.openHash()
2005 .addFieldQuotedString("name", fd->name());
2006
2007 m_output.openList("includes");
2008 for (const auto &inc: fd->includeFileList())
2009 {
2010 m_output.openHash()
2011 .addFieldQuotedString("name", inc.includeName);
2012 if (inc.fileDef && !inc.fileDef->isReference())
2013 {
2014 m_output.addFieldQuotedString("ref", inc.fileDef->getOutputFileBase());
2015 }
2016 m_output.closeHash();
2017 }
2018 m_output.closeList();
2019
2020 m_output.openList("included_by");
2021 for (const auto &inc : fd->includedByFileList())
2022 {
2023 m_output.openHash()
2024 .addFieldQuotedString("name", inc.includeName);
2025 if (inc.fileDef && !inc.fileDef->isReference())
2026 {
2027 m_output.addFieldQuotedString("ref", inc.fileDef->getOutputFileBase());
2028 }
2029 m_output.closeHash();
2030 }
2031 m_output.closeList();
2032
2034
2035 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2036 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2037 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2038 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2039 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2040 generatePerlModSection(fd,fd->getMemberList(MemberListType::DecVarMembers()),"variables");
2041
2042 addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->briefDescription());
2043 addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),nullptr,nullptr,fd->documentation());
2044
2045 m_output.closeHash();
2046}

References addPerlModDocBlock, Definition::briefDescription, Definition::documentation, generatePerlModSection, generatePerlUserDefinedSection, Definition::getDefFileName, Definition::getDefLine, FileDef::getMemberGroups, FileDef::getMemberList, FileDef::includedByFileList, FileDef::includeFileList, Definition::isReference, m_output and Definition::name.

Referenced by generatePerlModOutput.

generatePerlModForGroup()

void PerlModGenerator::generatePerlModForGroup (const GroupDef * gd)

Definition at line 1452 of file perlmodgen.cpp.

2049{
2050 // + members
2051 // + member groups
2052 // + files
2053 // + classes
2054 // + namespaces
2055 // - packages
2056 // + pages
2057 // + child groups
2058 // - examples
2059 // + brief description
2060 // + detailed description
2061
2062 if (gd->isReference()) return; // skip external references
2063
2064 m_output.openHash()
2065 .addFieldQuotedString("name", gd->name())
2066 .addFieldQuotedString("title", gd->groupTitle());
2067
2068 if (!gd->getFiles().empty())
2069 {
2070 m_output.openList("files");
2071 for (const auto &fd : gd->getFiles())
2072 m_output.openHash()
2073 .addFieldQuotedString("name", fd->name())
2074 .closeHash();
2075 m_output.closeList();
2076 }
2077
2078 if (!gd->getClasses().empty())
2079 {
2080 m_output.openList("classes");
2081 for (const auto &cd : gd->getClasses())
2082 m_output.openHash()
2083 .addFieldQuotedString("name", cd->name())
2084 .closeHash();
2085 m_output.closeList();
2086 }
2087
2088 if (!gd->getConcepts().empty())
2089 {
2090 m_output.openList("concepts");
2091 for (const auto &cd : gd->getConcepts())
2092 m_output.openHash()
2093 .addFieldQuotedString("name", cd->name())
2094 .closeHash();
2095 m_output.closeList();
2096 }
2097
2098 if (!gd->getModules().empty())
2099 {
2100 m_output.openList("modules");
2101 for (const auto &mod : gd->getModules())
2102 m_output.openHash()
2103 .addFieldQuotedString("name", mod->name())
2104 .closeHash();
2105 m_output.closeList();
2106 }
2107
2108 if (!gd->getNamespaces().empty())
2109 {
2110 m_output.openList("namespaces");
2111 for (const auto &nd : gd->getNamespaces())
2112 m_output.openHash()
2113 .addFieldQuotedString("name", nd->name())
2114 .closeHash();
2115 m_output.closeList();
2116 }
2117
2118 if (!gd->getPages().empty())
2119 {
2120 m_output.openList("pages");
2121 for (const auto &pd : gd->getPages())
2122 m_output.openHash()
2123 .addFieldQuotedString("title", pd->title())
2124 .closeHash();
2125 m_output.closeList();
2126 }
2127
2128 if (!gd->getSubGroups().empty())
2129 {
2130 m_output.openList("groups");
2131 for (const auto &sgd : gd->getSubGroups())
2132 m_output.openHash()
2133 .addFieldQuotedString("title", sgd->groupTitle())
2134 .closeHash();
2135 m_output.closeList();
2136 }
2137
2139
2140 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecDefineMembers()),"defines");
2141 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
2142 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
2143 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecEnumMembers()),"enums");
2144 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecFuncMembers()),"functions");
2145 generatePerlModSection(gd,gd->getMemberList(MemberListType::DecVarMembers()),"variables");
2146
2147 addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->briefDescription());
2148 addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),nullptr,nullptr,gd->documentation());
2149
2150 m_output.closeHash();
2151}

References addPerlModDocBlock, Definition::briefDescription, Definition::documentation, LinkedRefMap< T, Hash, KeyEqual, Map >::empty, generatePerlModSection, generatePerlUserDefinedSection, GroupDef::getClasses, GroupDef::getConcepts, Definition::getDefFileName, Definition::getDefLine, GroupDef::getFiles, GroupDef::getMemberGroups, GroupDef::getMemberList, GroupDef::getModules, GroupDef::getNamespaces, GroupDef::getPages, GroupDef::getSubGroups, GroupDef::groupTitle, Definition::isReference, m_output and Definition::name.

Referenced by generatePerlModOutput.

generatePerlModForMember()

void PerlModGenerator::generatePerlModForMember (const MemberDef * md, const Definition *)

Definition at line 1441 of file perlmodgen.cpp.

1470{
1471 // + declaration/definition arg lists
1472 // + reimplements
1473 // + reimplementedBy
1474 // + exceptions
1475 // + const/volatile specifiers
1476 // - examples
1477 // - source definition
1478 // - source references
1479 // - source referenced by
1480 // - body code
1481 // - template arguments
1482 // (templateArguments(), definitionTemplateParameterLists())
1483
1484 QCString memType;
1485 QCString name;
1486 bool isFunc=FALSE;
1487 switch (md->memberType())
1488 {
1489 case MemberType::Define: memType="define"; break;
1490 case MemberType::EnumValue: memType="enumvalue"; break;
1491 case MemberType::Property: memType="property"; break;
1492 case MemberType::Variable: memType="variable"; break;
1493 case MemberType::Typedef: memType="typedef"; break;
1494 case MemberType::Enumeration: memType="enum"; break;
1495 case MemberType::Function: memType="function"; isFunc=TRUE; break;
1496 case MemberType::Signal: memType="signal"; isFunc=TRUE; break;
1497 case MemberType::Friend: memType="friend"; isFunc=TRUE; break;
1498 case MemberType::DCOP: memType="dcop"; isFunc=TRUE; break;
1499 case MemberType::Slot: memType="slot"; isFunc=TRUE; break;
1500 case MemberType::Event: memType="event"; break;
1501 case MemberType::Interface: memType="interface"; break;
1502 case MemberType::Service: memType="service"; break;
1503 case MemberType::Sequence: memType="sequence"; break;
1504 case MemberType::Dictionary: memType="dictionary"; break;
1505 }
1506
1507 bool isFortran = md->getLanguage()==SrcLangExt::Fortran;
1508 name = md->name();
1509 if (md->isAnonymous()) name = "__unnamed" + name.right(name.length() - 1)+"__";
1510
1511 m_output.openHash()
1512 .addFieldQuotedString("kind", memType)
1513 .addFieldQuotedString("name", name)
1514 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1515 .addFieldQuotedString("protection", getProtectionName(md->protection()))
1516 .addFieldBoolean("static", md->isStatic());
1517
1520 if (md->memberType()!=MemberType::Define &&
1522 m_output.addFieldQuotedString("type", md->typeString());
1523
1524 const ArgumentList &al = md->argumentList();
1525 if (isFunc) //function
1526 {
1527 m_output.addFieldBoolean("const", al.constSpecifier())
1528 .addFieldBoolean("volatile", al.volatileSpecifier());
1529
1530 m_output.openList("parameters");
1531 const ArgumentList &declAl = md->declArgumentList();
1532 if (!declAl.empty())
1533 {
1534 auto defIt = al.begin();
1535 for (const Argument &a : declAl)
1536 {
1537 const Argument *defArg = nullptr;
1538 if (defIt!=al.end())
1539 {
1540 defArg = &(*defIt);
1541 ++defIt;
1542 }
1543 m_output.openHash();
1544
1545 if (!a.name.isEmpty())
1546 m_output.addFieldQuotedString("declaration_name", a.name);
1547
1548 if (defArg && !defArg->name.isEmpty() && defArg->name!=a.name)
1549 m_output.addFieldQuotedString("definition_name", defArg->name);
1550
1551 if (isFortran && defArg && !defArg->type.isEmpty())
1552 m_output.addFieldQuotedString("type", defArg->type);
1553 else if (!a.type.isEmpty())
1554 m_output.addFieldQuotedString("type", a.type);
1555
1556 if (!a.array.isEmpty())
1557 m_output.addFieldQuotedString("array", a.array);
1558
1559 if (!a.defval.isEmpty())
1560 m_output.addFieldQuotedString("default_value", a.defval);
1561
1562 if (!a.attrib.isEmpty())
1563 m_output.addFieldQuotedString("attributes", a.attrib);
1564
1565 m_output.closeHash();
1566 }
1567 }
1568 m_output.closeList();
1569 }
1570 else if (md->memberType()==MemberType::Define &&
1571 md->argsString()!=nullptr) // define
1572 {
1573 m_output.openList("parameters");
1574 for (const Argument &a : al)
1575 {
1576 m_output.openHash()
1577 .addFieldQuotedString("name", a.type)
1578 .closeHash();
1579 }
1580 m_output.closeList();
1581 }
1582 else if (md->argsString()!=nullptr)
1583 {
1584 m_output.addFieldQuotedString("arguments", md->argsString());
1585 }
1586
1587 if (!md->initializer().isEmpty())
1588 m_output.addFieldQuotedString("initializer", md->initializer());
1589
1590 if (!md->excpString().isEmpty())
1591 m_output.addFieldQuotedString("exceptions", md->excpString());
1592
1593 if (md->memberType()==MemberType::Enumeration) // enum
1594 {
1595 const MemberVector &enumFields = md->enumFieldList();
1596 m_output.addFieldQuotedString("type", md->enumBaseType());
1597 if (!enumFields.empty())
1598 {
1599 m_output.openList("values");
1600 for (const auto &emd : enumFields)
1601 {
1602 m_output.openHash()
1603 .addFieldQuotedString("name", emd->name());
1604
1605 if (!emd->initializer().isEmpty())
1606 m_output.addFieldQuotedString("initializer", emd->initializer());
1607
1608 addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1609
1610 addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->documentation());
1611
1612 m_output.closeHash();
1613 }
1614 m_output.closeList();
1615 }
1616 }
1617
1618 if (md->memberType() == MemberType::Variable && !md->bitfieldString().isEmpty())
1619 {
1620 QCString bitfield = md->bitfieldString();
1621 if (bitfield.at(0) == ':') bitfield = bitfield.mid(1);
1622 m_output.addFieldQuotedString("bitfield", bitfield);
1623 }
1624
1625 const MemberDef *rmd = md->reimplements();
1626 if (rmd)
1627 m_output.openHash("reimplements")
1628 .addFieldQuotedString("name", rmd->name())
1629 .closeHash();
1630
1631 const MemberVector &rbml = md->reimplementedBy();
1632 if (!rbml.empty())
1633 {
1634 m_output.openList("reimplemented_by");
1635 for (const auto &rbmd : rbml)
1636 m_output.openHash()
1637 .addFieldQuotedString("name", rbmd->name())
1638 .closeHash();
1639 m_output.closeList();
1640 }
1641
1642 m_output.closeHash();
1643}

References addPerlModDocBlock, MemberDef::argsString, MemberDef::argumentList, QCString::at, ArgumentList::begin, MemberDef::bitfieldString, Definition::briefDescription, ArgumentList::constSpecifier, DCOP, MemberDef::declArgumentList, Define, Dictionary, Definition::documentation, ArgumentList::empty, MemberVector::empty, ArgumentList::end, MemberDef::enumBaseType, Enumeration, MemberDef::enumFieldList, EnumValue, Event, MemberDef::excpString, FALSE, Friend, Function, Definition::getDefFileName, Definition::getDefLine, Definition::getLanguage, Definition::getOuterScope, getProtectionName, getVirtualnessName, MemberDef::initializer, Interface, Definition::isAnonymous, QCString::isEmpty, MemberDef::isStatic, QCString::length, m_output, MemberDef::memberType, QCString::mid, Argument::name, Definition::name, Property, MemberDef::protection, MemberDef::reimplementedBy, MemberDef::reimplements, QCString::right, Sequence, Service, Signal, Slot, TRUE, Argument::type, Typedef, MemberDef::typeString, Variable, MemberDef::virtualness and ArgumentList::volatileSpecifier.

Referenced by generatePerlModSection and generatePerlUserDefinedSection.

generatePerlModForModule()

void PerlModGenerator::generatePerlModForModule (const ModuleDef * mod)

Definition at line 1449 of file perlmodgen.cpp.

1876{
1877 // + contained class definitions
1878 // + contained concept definitions
1879 // + member groups
1880 // + normal members
1881 // + brief desc
1882 // + detailed desc
1883 // + location (file_id, line, column)
1884 // - exports
1885 // + used files
1886
1887 if (mod->isReference()) return; // skip external references
1888
1889 m_output.openHash()
1890 .addFieldQuotedString("name", mod->name());
1891
1893
1894 if (!mod->getClasses().empty())
1895 {
1896 m_output.openList("classes");
1897 for (const auto &cd : mod->getClasses())
1898 m_output.openHash()
1899 .addFieldQuotedString("name", cd->name())
1900 .closeHash();
1901 m_output.closeList();
1902 }
1903
1904 if (!mod->getConcepts().empty())
1905 {
1906 m_output.openList("concepts");
1907 for (const auto &cd : mod->getConcepts())
1908 m_output.openHash()
1909 .addFieldQuotedString("name", cd->name())
1910 .closeHash();
1911 m_output.closeList();
1912 }
1913
1914 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1915 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecEnumMembers()),"enums");
1916 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecFuncMembers()),"functions");
1917 generatePerlModSection(mod,mod->getMemberList(MemberListType::DecVarMembers()),"variables");
1918
1919 addPerlModDocBlock(m_output,"brief",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->briefDescription());
1920 addPerlModDocBlock(m_output,"detailed",mod->getDefFileName(),mod->getDefLine(),nullptr,nullptr,mod->documentation());
1921
1922 if (!mod->getUsedFiles().empty())
1923 {
1924 m_output.openList("files");
1925 for (const auto &fd : mod->getUsedFiles())
1926 m_output.openHash()
1927 .addFieldQuotedString("name", fd->name())
1928 .closeHash();
1929 m_output.closeList();
1930 }
1931
1932 m_output.closeHash();
1933}

References addPerlModDocBlock, Definition::briefDescription, Definition::documentation, LinkedRefMap< T, Hash, KeyEqual, Map >::empty, generatePerlModSection, generatePerlUserDefinedSection, ModuleDef::getClasses, ModuleDef::getConcepts, Definition::getDefFileName, Definition::getDefLine, ModuleDef::getMemberGroups, ModuleDef::getMemberList, ModuleDef::getUsedFiles, Definition::isReference, m_output and Definition::name.

Referenced by generatePerlModOutput.

generatePerlModForNamespace()

void PerlModGenerator::generatePerlModForNamespace (const NamespaceDef * nd)

Definition at line 1450 of file perlmodgen.cpp.

1936{
1937 // + contained class definitions
1938 // + contained namespace definitions
1939 // + member groups
1940 // + normal members
1941 // + brief desc
1942 // + detailed desc
1943 // + location
1944 // - files containing (parts of) the namespace definition
1945
1946 if (nd->isReference()) return; // skip external references
1947
1948 m_output.openHash()
1949 .addFieldQuotedString("name", nd->name());
1950
1951 if (!nd->getClasses().empty())
1952 {
1953 m_output.openList("classes");
1954 for (const auto &cd : nd->getClasses())
1955 m_output.openHash()
1956 .addFieldQuotedString("name", cd->name())
1957 .closeHash();
1958 m_output.closeList();
1959 }
1960
1961 if (!nd->getNamespaces().empty())
1962 {
1963 m_output.openList("namespaces");
1964 for (const auto &ind : nd->getNamespaces())
1965 m_output.openHash()
1966 .addFieldQuotedString("name", ind->name())
1967 .closeHash();
1968 m_output.closeList();
1969 }
1970
1972
1973 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecDefineMembers()),"defines");
1974 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecProtoMembers()),"prototypes");
1975 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecTypedefMembers()),"typedefs");
1976 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecEnumMembers()),"enums");
1977 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecFuncMembers()),"functions");
1978 generatePerlModSection(nd,nd->getMemberList(MemberListType::DecVarMembers()),"variables");
1979
1980 addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->briefDescription());
1981 addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),nullptr,nullptr,nd->documentation());
1982
1983 m_output.closeHash();
1984}

References addPerlModDocBlock, Definition::briefDescription, Definition::documentation, LinkedRefMap< T, Hash, KeyEqual, Map >::empty, generatePerlModSection, generatePerlUserDefinedSection, NamespaceDef::getClasses, Definition::getDefFileName, Definition::getDefLine, NamespaceDef::getMemberGroups, NamespaceDef::getMemberList, NamespaceDef::getNamespaces, Definition::isReference, m_output and Definition::name.

Referenced by generatePerlModOutput.

generatePerlModForPage()

void PerlModGenerator::generatePerlModForPage (PageDef * pi)

Definition at line 1453 of file perlmodgen.cpp.

2154{
2155 // + name
2156 // + title
2157 // + documentation
2158
2159 if (pd->isReference()) return;
2160
2161 m_output.openHash()
2162 .addFieldQuotedString("name", pd->name());
2163
2164 const SectionInfo *si = SectionManager::instance().find(pd->name());
2165 if (si)
2166 m_output.addFieldQuotedString("title4", filterTitle(si->title()));
2167
2168 addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),nullptr,nullptr,pd->documentation());
2169 m_output.closeHash();
2170}

References addPerlModDocBlock, Definition::docFile, Definition::docLine, Definition::documentation, filterTitle, LinkedMap< T, Hash, KeyEqual, Map >::find, SectionManager::instance, Definition::isReference, m_output, Definition::name and SectionInfo::title.

Referenced by generatePerlModOutput.

generatePerlModOutput()

bool PerlModGenerator::generatePerlModOutput ()

Definition at line 1464 of file perlmodgen.cpp.

2173{
2174 std::ofstream outputFileStream;
2175 if (!createOutputFile(outputFileStream, pathDoxyDocsPM))
2176 return false;
2177
2178 PerlModOutputStream outputStream(outputFileStream);
2179 m_output.setPerlModOutputStream(&outputStream);
2180 m_output.add("$doxydocs=").openHash();
2181
2182 m_output.openList("classes");
2183 for (const auto &cd : *Doxygen::classLinkedMap)
2184 generatePerlModForClass(cd.get());
2185 m_output.closeList();
2186
2187 m_output.openList("concepts");
2188 for (const auto &cd : *Doxygen::conceptLinkedMap)
2190 m_output.closeList();
2191
2192 m_output.openList("modules");
2193 for (const auto &mod : ModuleManager::instance().modules())
2194 generatePerlModForModule(mod.get());
2195 m_output.closeList();
2196
2197 m_output.openList("namespaces");
2198 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2200 m_output.closeList();
2201
2202 m_output.openList("files");
2203 for (const auto &fn : *Doxygen::inputNameLinkedMap)
2204 {
2205 for (const auto &fd : *fn)
2206 {
2207 generatePerlModForFile(fd.get());
2208 }
2209 }
2210 m_output.closeList();
2211
2212 m_output.openList("groups");
2213 for (const auto &gd : *Doxygen::groupLinkedMap)
2214 {
2215 generatePerlModForGroup(gd.get());
2216 }
2217 m_output.closeList();
2218
2219 m_output.openList("pages");
2220 for (const auto &pd : *Doxygen::pageLinkedMap)
2221 {
2222 generatePerlModForPage(pd.get());
2223 }
2225 {
2227 }
2228 m_output.closeList();
2229
2230 m_output.closeHash().add(";\n1;\n");
2231 m_output.reset();
2232 return true;
2233}

References Doxygen::classLinkedMap, Doxygen::conceptLinkedMap, createOutputFile, generatePerlModForClass, generatePerlModForConcept, generatePerlModForFile, generatePerlModForGroup, generatePerlModForModule, generatePerlModForNamespace, generatePerlModForPage, Doxygen::groupLinkedMap, Doxygen::inputNameLinkedMap, ModuleManager::instance, m_output, Doxygen::mainPage, Doxygen::namespaceLinkedMap, Doxygen::pageLinkedMap and pathDoxyDocsPM.

Referenced by generate.

generatePerlModSection()

void PerlModGenerator::generatePerlModSection (const Definition * d, MemberList * ml, const QCString & name, const QCString & header=QCString())

Definition at line 1443 of file perlmodgen.cpp.

1646 MemberList *ml,const QCString &name,const QCString &header)
1647{
1648 if (ml==nullptr) return; // empty list
1649
1650 m_output.openHash(name);
1651
1652 if (!header.isEmpty())
1653 m_output.addFieldQuotedString("header", header);
1654
1655 m_output.openList("members");
1656 for (const auto &md : *ml)
1657 {
1659 }
1660 m_output.closeList()
1661 .closeHash();
1662}

References generatePerlModForMember, QCString::isEmpty and m_output.

Referenced by generatePerlModForClass, generatePerlModForFile, generatePerlModForGroup, generatePerlModForModule and generatePerlModForNamespace.

generatePerlUserDefinedSection()

void PerlModGenerator::generatePerlUserDefinedSection (const Definition * d, const MemberGroupList & mgl)

Definition at line 1442 of file perlmodgen.cpp.

1690{
1691 if (!mgl.empty())
1692 {
1693 m_output.openList("user_defined");
1694 for (const auto &mg : mgl)
1695 {
1696 m_output.openHash();
1697 if (!mg->header().isEmpty())
1698 {
1699 m_output.addFieldQuotedString("header", mg->header());
1700 }
1701
1702 if (!mg->members().empty())
1703 {
1704 m_output.openList("members");
1705 for (const auto &md : mg->members())
1706 {
1708 }
1709 m_output.closeList();
1710 }
1711 m_output.closeHash();
1712 }
1713 m_output.closeList();
1714 }
1715}

References generatePerlModForMember and m_output.

Referenced by generatePerlModForClass, generatePerlModForFile, generatePerlModForGroup, generatePerlModForModule and generatePerlModForNamespace.

Public Member Attributes

m_output

pathDoxyDocsPM

QCString PerlModGenerator::pathDoxyDocsPM

Definition at line 1433 of file perlmodgen.cpp.

Referenced by generate, generateDoxyRules and generatePerlModOutput.

pathDoxyDocsTex

QCString PerlModGenerator::pathDoxyDocsTex

Definition at line 1427 of file perlmodgen.cpp.

Referenced by generate, generateDoxyLatexTex and generateDoxyRules.

pathDoxyFormatTex

QCString PerlModGenerator::pathDoxyFormatTex

Definition at line 1428 of file perlmodgen.cpp.

Referenced by generate, generateDoxyFormatTex and generateDoxyRules.

pathDoxyLatexDVI

QCString PerlModGenerator::pathDoxyLatexDVI

Definition at line 1430 of file perlmodgen.cpp.

Referenced by generate and generateDoxyRules.

pathDoxyLatexPDF

QCString PerlModGenerator::pathDoxyLatexPDF

Definition at line 1431 of file perlmodgen.cpp.

Referenced by generate and generateDoxyRules.

pathDoxyLatexPL

QCString PerlModGenerator::pathDoxyLatexPL

Definition at line 1434 of file perlmodgen.cpp.

Referenced by generate, generateDoxyLatexPL and generateDoxyRules.

pathDoxyLatexStructurePL

QCString PerlModGenerator::pathDoxyLatexStructurePL

pathDoxyLatexTex

QCString PerlModGenerator::pathDoxyLatexTex

Definition at line 1429 of file perlmodgen.cpp.

Referenced by generate, generateDoxyLatexTex and generateDoxyRules.

pathDoxyRules

QCString PerlModGenerator::pathDoxyRules

Definition at line 1436 of file perlmodgen.cpp.

Referenced by generate, generateDoxyRules and generateMakefile.

pathDoxyStructurePM

QCString PerlModGenerator::pathDoxyStructurePM

Definition at line 1426 of file perlmodgen.cpp.

Referenced by generate, generateDoxyRules and generateDoxyStructurePM.

pathDoxyStructureTex

QCString PerlModGenerator::pathDoxyStructureTex

Definition at line 1432 of file perlmodgen.cpp.

Referenced by generate, generateDoxyFormatTex and generateDoxyRules.

pathMakefile

QCString PerlModGenerator::pathMakefile

Definition at line 1437 of file perlmodgen.cpp.

Referenced by generate and generateMakefile.


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


Generated via doxygen2docusaurus by Doxygen 1.14.0.