Doxygen
Loading...
Searching...
No Matches
PerlModGenerator Class Reference
+ Collaboration diagram for PerlModGenerator:

Public Member Functions

 PerlModGenerator (bool pretty)
 
void generatePerlModForMember (const MemberDef *md, const Definition *)
 
void generatePerlUserDefinedSection (const Definition *d, const MemberGroupList &mgl)
 
void generatePerlModSection (const Definition *d, MemberList *ml, const QCString &name, const QCString &header=QCString())
 
void addListOfAllMembers (const ClassDef *cd)
 
void addIncludeInfo (const IncludeInfo *ii)
 
void generatePerlModForClass (const ClassDef *cd)
 
void generatePerlModForConcept (const ConceptDef *cd)
 
void generatePerlModForModule (const ModuleDef *mod)
 
void generatePerlModForNamespace (const NamespaceDef *nd)
 
void generatePerlModForFile (const FileDef *fd)
 
void generatePerlModForGroup (const GroupDef *gd)
 
void generatePerlModForPage (PageDef *pi)
 
bool createOutputFile (std::ofstream &f, const QCString &s)
 
bool createOutputDir (Dir &perlModDir)
 
bool generateDoxyLatexTex ()
 
bool generateDoxyFormatTex ()
 
bool generateDoxyStructurePM ()
 
bool generateDoxyLatexPL ()
 
bool generateDoxyLatexStructurePL ()
 
bool generateDoxyRules ()
 
bool generateMakefile ()
 
bool generatePerlModOutput ()
 
void generate ()
 

Public Attributes

PerlModOutput m_output
 
QCString pathDoxyStructurePM
 
QCString pathDoxyDocsTex
 
QCString pathDoxyFormatTex
 
QCString pathDoxyLatexTex
 
QCString pathDoxyLatexDVI
 
QCString pathDoxyLatexPDF
 
QCString pathDoxyStructureTex
 
QCString pathDoxyDocsPM
 
QCString pathDoxyLatexPL
 
QCString pathDoxyLatexStructurePL
 
QCString pathDoxyRules
 
QCString pathMakefile
 

Detailed Description

Definition at line 1419 of file perlmodgen.cpp.

Constructor & Destructor Documentation

◆ PerlModGenerator()

PerlModGenerator::PerlModGenerator ( bool pretty)
inline

Definition at line 1438 of file perlmodgen.cpp.

1438: m_output(pretty) { }
PerlModOutput m_output

References m_output.

Member Function Documentation

◆ addIncludeInfo()

void PerlModGenerator::addIncludeInfo ( const IncludeInfo * ii)

Definition at line 1716 of file perlmodgen.cpp.

1717{
1718 if (ii)
1719 {
1720 QCString nm = ii->includeName;
1721 if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1722 if (!nm.isEmpty())
1723 {
1724 m_output.openHash("includes");
1725 m_output.addFieldBoolean("local", ii->kind==IncludeKind::IncludeLocal || ii->kind==IncludeKind::ImportLocal)
1726 .addFieldQuotedString("name", nm)
1727 .closeHash();
1728 }
1729 }
1730}
virtual const QCString & docName() const =0
bool isEmpty() const
Returns TRUE iff the string is empty.
Definition qcstring.h:150
@ ImportLocal
Definition filedef.h:54
@ IncludeLocal
Definition filedef.h:50
QCString includeName
Definition filedef.h:80
IncludeKind kind
Definition filedef.h:81
const FileDef * fileDef
Definition filedef.h:79

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 1663 of file perlmodgen.cpp.

1664{
1665 m_output.openList("all_members");
1666 for (auto &mni : cd->memberNameInfoLinkedMap())
1667 {
1668 for (auto &mi : *mni)
1669 {
1670 const MemberDef *md=mi->memberDef();
1671 const ClassDef *mcd=md->getClassDef();
1672
1673 m_output.openHash()
1674 .addFieldQuotedString("name", md->name())
1675 .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1676 .addFieldQuotedString("protection", getProtectionName(mi->prot()));
1677
1678 if (!mi->ambiguityResolutionScope().isEmpty())
1679 m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope());
1680
1681 m_output.addFieldQuotedString("scope", mcd->name())
1682 .closeHash();
1683 }
1684 }
1685 m_output.closeList();
1686}
virtual const MemberNameInfoLinkedMap & memberNameInfoLinkedMap() const =0
Returns a dictionary of all members.
virtual const QCString & name() const =0
virtual const ClassDef * getClassDef() const =0
virtual Specifier virtualness(int count=0) const =0
static const char * getVirtualnessName(Specifier virt)
static const char * getProtectionName(Protection prot)

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 2245 of file perlmodgen.cpp.

2246{
2247 std::string outputDirectory = Config_getString(OUTPUT_DIRECTORY).str();
2248 perlModDir.setPath(outputDirectory+"/perlmod");
2249 if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
2250 {
2251 err("Could not create perlmod directory in %s\n",outputDirectory.data());
2252 return false;
2253 }
2254 return true;
2255}
bool mkdir(const std::string &path, bool acceptsAbsPath=true) const
Definition dir.cpp:295
void setPath(const std::string &path)
Definition dir.cpp:229
bool exists() const
Definition dir.cpp:257
#define Config_getString(name)
Definition config.h:32
#define err(fmt,...)
Definition message.h:84

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 2234 of file perlmodgen.cpp.

2235{
2237 if (!f.is_open())
2238 {
2239 err("Cannot open file %s for writing!\n", qPrint(s));
2240 return false;
2241 }
2242 return true;
2243}
std::ofstream openOutputStream(const QCString &name, bool append=false)
Definition portable.cpp:665
const char * qPrint(const char *s)
Definition qcstring.h:661

References err, Portable::openOutputStream(), and qPrint().

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

◆ generate()

void PerlModGenerator::generate ( )

Definition at line 2904 of file perlmodgen.cpp.

2905{
2906 // + classes
2907 // + namespaces
2908 // + files
2909 // - packages
2910 // + groups
2911 // + related pages
2912 // - examples
2913
2914 Dir perlModDir;
2915 if (!createOutputDir(perlModDir))
2916 return;
2917
2918 bool perlmodLatex = Config_getBool(PERLMOD_LATEX);
2919
2920 QCString perlModAbsPath = perlModDir.absPath();
2921 pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
2922 pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
2923 pathMakefile = perlModAbsPath + "/Makefile";
2924 pathDoxyRules = perlModAbsPath + "/doxyrules.make";
2925
2926 if (perlmodLatex) {
2927 pathDoxyStructureTex = perlModAbsPath + "/doxystructure.tex";
2928 pathDoxyFormatTex = perlModAbsPath + "/doxyformat.tex";
2929 pathDoxyLatexTex = perlModAbsPath + "/doxylatex.tex";
2930 pathDoxyLatexDVI = perlModAbsPath + "/doxylatex.dvi";
2931 pathDoxyLatexPDF = perlModAbsPath + "/doxylatex.pdf";
2932 pathDoxyDocsTex = perlModAbsPath + "/doxydocs.tex";
2933 pathDoxyLatexPL = perlModAbsPath + "/doxylatex.pl";
2934 pathDoxyLatexStructurePL = perlModAbsPath + "/doxylatex-structure.pl";
2935 }
2936
2937 if (!(generatePerlModOutput()
2939 && generateMakefile()
2940 && generateDoxyRules()))
2941 return;
2942
2943 if (perlmodLatex) {
2948 return;
2949 }
2950}
std::string absPath() const
Definition dir.cpp:363
bool generateDoxyFormatTex()
QCString pathDoxyLatexPL
QCString pathDoxyStructureTex
bool generateDoxyLatexTex()
bool createOutputDir(Dir &perlModDir)
QCString pathDoxyDocsPM
QCString pathDoxyStructurePM
QCString pathDoxyLatexDVI
bool generatePerlModOutput()
QCString pathDoxyDocsTex
QCString pathDoxyLatexStructurePL
bool generateDoxyStructurePM()
QCString pathDoxyFormatTex
QCString pathDoxyLatexPDF
bool generateDoxyLatexStructurePL()
QCString pathDoxyLatexTex
#define Config_getBool(name)
Definition config.h:33

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 2717 of file perlmodgen.cpp.

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

References createOutputFile(), pathDoxyFormatTex, and pathDoxyStructureTex.

Referenced by generate().

◆ generateDoxyLatexPL()

bool PerlModGenerator::generateDoxyLatexPL ( )

Definition at line 2595 of file perlmodgen.cpp.

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

References createOutputFile(), and pathDoxyLatexPL.

Referenced by generate().

◆ generateDoxyLatexStructurePL()

bool PerlModGenerator::generateDoxyLatexStructurePL ( )

Definition at line 2562 of file perlmodgen.cpp.

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

References createOutputFile(), and pathDoxyLatexStructurePL.

Referenced by generate().

◆ generateDoxyLatexTex()

bool PerlModGenerator::generateDoxyLatexTex ( )

Definition at line 2879 of file perlmodgen.cpp.

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

References createOutputFile(), pathDoxyDocsTex, and pathDoxyLatexTex.

Referenced by generate().

◆ generateDoxyRules()

bool PerlModGenerator::generateDoxyRules ( )

Definition at line 2440 of file perlmodgen.cpp.

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

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 2257 of file perlmodgen.cpp.

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

References createOutputFile(), and pathDoxyStructurePM.

Referenced by generate().

◆ generateMakefile()

bool PerlModGenerator::generateMakefile ( )

Definition at line 2536 of file perlmodgen.cpp.

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

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

Referenced by generate().

◆ generatePerlModForClass()

void PerlModGenerator::generatePerlModForClass ( const ClassDef * cd)

Definition at line 1732 of file perlmodgen.cpp.

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

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(), Definition::isReference(), DotClassGraph::isTrivial(), m_output, Definition::name(), ClassDef::subClasses(), and ClassDef::templateMaster().

Referenced by generatePerlModOutput().

◆ generatePerlModForConcept()

void PerlModGenerator::generatePerlModForConcept ( const ConceptDef * cd)

Definition at line 1858 of file perlmodgen.cpp.

1859{
1860 if (cd->isReference()) return; // skip external references
1861
1862 m_output.openHash()
1863 .addFieldQuotedString("name", cd->name());
1864
1867 m_output.addFieldQuotedString("initializer", cd->initializer());
1868 addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->briefDescription());
1869 addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),nullptr,nullptr,cd->documentation());
1870
1871 m_output.closeHash();
1872}
virtual QCString initializer() const =0
virtual const IncludeInfo * includeInfo() const =0

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 1985 of file perlmodgen.cpp.

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

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 2047 of file perlmodgen.cpp.

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

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 1468 of file perlmodgen.cpp.

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

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, Fortran, 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 1874 of file perlmodgen.cpp.

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

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 1934 of file perlmodgen.cpp.

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

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 2152 of file perlmodgen.cpp.

2153{
2154 // + name
2155 // + title
2156 // + documentation
2157
2158 if (pd->isReference()) return;
2159
2160 m_output.openHash()
2161 .addFieldQuotedString("name", pd->name());
2162
2163 const SectionInfo *si = SectionManager::instance().find(pd->name());
2164 if (si)
2165 m_output.addFieldQuotedString("title4", filterTitle(si->title()));
2166
2167 addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),nullptr,nullptr,pd->documentation());
2168 m_output.closeHash();
2169}
const T * find(const std::string &key) const
Find an object given the key.
Definition linkedmap.h:47
QCString title() const
Definition section.h:69
static SectionManager & instance()
returns a reference to the singleton
Definition section.h:175
QCString filterTitle(const QCString &title)
Definition util.cpp:5920

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 2171 of file perlmodgen.cpp.

2172{
2173 std::ofstream outputFileStream;
2174 if (!createOutputFile(outputFileStream, pathDoxyDocsPM))
2175 return false;
2176
2177 PerlModOutputStream outputStream(outputFileStream);
2178 m_output.setPerlModOutputStream(&outputStream);
2179 m_output.add("$doxydocs=").openHash();
2180
2181 m_output.openList("classes");
2182 for (const auto &cd : *Doxygen::classLinkedMap)
2183 generatePerlModForClass(cd.get());
2184 m_output.closeList();
2185
2186 m_output.openList("concepts");
2187 for (const auto &cd : *Doxygen::conceptLinkedMap)
2188 generatePerlModForConcept(cd.get());
2189 m_output.closeList();
2190
2191 m_output.openList("modules");
2192 for (const auto &mod : ModuleManager::instance().modules())
2193 generatePerlModForModule(mod.get());
2194 m_output.closeList();
2195
2196 m_output.openList("namespaces");
2197 for (const auto &nd : *Doxygen::namespaceLinkedMap)
2199 m_output.closeList();
2200
2201 m_output.openList("files");
2202 for (const auto &fn : *Doxygen::inputNameLinkedMap)
2203 {
2204 for (const auto &fd : *fn)
2205 {
2206 generatePerlModForFile(fd.get());
2207 }
2208 }
2209 m_output.closeList();
2210
2211 m_output.openList("groups");
2212 for (const auto &gd : *Doxygen::groupLinkedMap)
2213 {
2214 generatePerlModForGroup(gd.get());
2215 }
2216 m_output.closeList();
2217
2218 m_output.openList("pages");
2219 for (const auto &pd : *Doxygen::pageLinkedMap)
2220 {
2221 generatePerlModForPage(pd.get());
2222 }
2224 {
2226 }
2227 m_output.closeList();
2228
2229 m_output.closeHash().add(";\n1;\n");
2230 m_output.reset();
2231 return true;
2232}
static NamespaceLinkedMap * namespaceLinkedMap
Definition doxygen.h:115
static ConceptLinkedMap * conceptLinkedMap
Definition doxygen.h:98
static std::unique_ptr< PageDef > mainPage
Definition doxygen.h:101
static FileNameLinkedMap * inputNameLinkedMap
Definition doxygen.h:105
static ClassLinkedMap * classLinkedMap
Definition doxygen.h:96
static PageLinkedMap * pageLinkedMap
Definition doxygen.h:100
static GroupLinkedMap * groupLinkedMap
Definition doxygen.h:114
static ModuleManager & instance()
void generatePerlModForPage(PageDef *pi)
void generatePerlModForClass(const ClassDef *cd)
void generatePerlModForModule(const ModuleDef *mod)
void generatePerlModForNamespace(const NamespaceDef *nd)
void generatePerlModForGroup(const GroupDef *gd)
void generatePerlModForFile(const FileDef *fd)
void generatePerlModForConcept(const ConceptDef *cd)

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 1644 of file perlmodgen.cpp.

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

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 1688 of file perlmodgen.cpp.

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

References generatePerlModForMember(), and m_output.

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

Member Data Documentation

◆ m_output

◆ pathDoxyDocsPM

QCString PerlModGenerator::pathDoxyDocsPM

Definition at line 1432 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyRules(), and generatePerlModOutput().

◆ pathDoxyDocsTex

QCString PerlModGenerator::pathDoxyDocsTex

Definition at line 1426 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyLatexTex(), and generateDoxyRules().

◆ pathDoxyFormatTex

QCString PerlModGenerator::pathDoxyFormatTex

Definition at line 1427 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyFormatTex(), and generateDoxyRules().

◆ pathDoxyLatexDVI

QCString PerlModGenerator::pathDoxyLatexDVI

Definition at line 1429 of file perlmodgen.cpp.

Referenced by generate(), and generateDoxyRules().

◆ pathDoxyLatexPDF

QCString PerlModGenerator::pathDoxyLatexPDF

Definition at line 1430 of file perlmodgen.cpp.

Referenced by generate(), and generateDoxyRules().

◆ pathDoxyLatexPL

QCString PerlModGenerator::pathDoxyLatexPL

Definition at line 1433 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyLatexPL(), and generateDoxyRules().

◆ pathDoxyLatexStructurePL

QCString PerlModGenerator::pathDoxyLatexStructurePL

Definition at line 1434 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyLatexStructurePL(), and generateDoxyRules().

◆ pathDoxyLatexTex

QCString PerlModGenerator::pathDoxyLatexTex

Definition at line 1428 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyLatexTex(), and generateDoxyRules().

◆ pathDoxyRules

QCString PerlModGenerator::pathDoxyRules

Definition at line 1435 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyRules(), and generateMakefile().

◆ pathDoxyStructurePM

QCString PerlModGenerator::pathDoxyStructurePM

Definition at line 1425 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyRules(), and generateDoxyStructurePM().

◆ pathDoxyStructureTex

QCString PerlModGenerator::pathDoxyStructureTex

Definition at line 1431 of file perlmodgen.cpp.

Referenced by generate(), generateDoxyFormatTex(), and generateDoxyRules().

◆ pathMakefile

QCString PerlModGenerator::pathMakefile

Definition at line 1436 of file perlmodgen.cpp.

Referenced by generate(), and generateMakefile().


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