Public Member Functions | Public Attributes | List of all members
PerlModGenerator Class Reference

Public Member Functions

 PerlModGenerator (bool pretty)
 
void generatePerlModForMember (MemberDef *md, Definition *)
 
void generatePerlModSection (Definition *d, MemberList *ml, const char *name, const char *header=0)
 
void addListOfAllMembers (ClassDef *cd)
 
void generatePerlModForClass (ClassDef *cd)
 
void generatePerlModForNamespace (NamespaceDef *nd)
 
void generatePerlModForFile (FileDef *fd)
 
void generatePerlModForGroup (GroupDef *gd)
 
void generatePerlModForPage (PageDef *pi)
 
bool createOutputFile (QFile &f, const char *s)
 
bool createOutputDir (QDir &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 1464 of file perlmodgen.cpp.

Constructor & Destructor Documentation

PerlModGenerator::PerlModGenerator ( bool  pretty)
inline

Definition at line 1483 of file perlmodgen.cpp.

1483 : m_output(pretty) { }
PerlModOutput m_output

Member Function Documentation

void PerlModGenerator::addListOfAllMembers ( ClassDef cd)

Definition at line 1694 of file perlmodgen.cpp.

1695 {
1696  m_output.openList("all_members");
1697  if (cd->memberNameInfoSDict())
1698  {
1700  MemberNameInfo *mni;
1701  for (mnii.toFirst();(mni=mnii.current());++mnii)
1702  {
1703  MemberNameInfoIterator mii(*mni);
1704  MemberInfo *mi;
1705  for (mii.toFirst();(mi=mii.current());++mii)
1706  {
1707  MemberDef *md=mi->memberDef;
1708  ClassDef *cd=md->getClassDef();
1709  Definition *d=md->getGroupDef();
1710  if (d==0) d = cd;
1711 
1712  m_output.openHash()
1713  .addFieldQuotedString("name", md->name())
1714  .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1715  .addFieldQuotedString("protection", getProtectionName(mi->prot));
1716 
1717  if (!mi->ambiguityResolutionScope.isEmpty())
1718  m_output.addFieldQuotedString("ambiguity_scope", mi->ambiguityResolutionScope);
1719 
1720  m_output.addFieldQuotedString("scope", cd->name())
1721  .closeHash();
1722  }
1723  }
1724  }
1725  m_output.closeList();
1726 }
bool isEmpty() const
Definition: qcstring.h:189
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
MemberNameInfoSDict * memberNameInfoSDict() const
Definition: classdef.cpp:4409
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
Protection prot
Definition: membername.h:63
MemberDef * memberDef
Definition: membername.h:62
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
QCString ambiguityResolutionScope
Definition: membername.h:67
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
const QCString & name() const
Definition: definition.h:114
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
static const char * getProtectionName(Protection prot)
friend class Iterator
Definition: sortdict.h:289
static const char * getVirtualnessName(Specifier virt)
bool PerlModGenerator::createOutputDir ( QDir perlModDir)

Definition at line 2209 of file perlmodgen.cpp.

2210 {
2211  QCString outputDirectory = Config_getString("OUTPUT_DIRECTORY");
2212  if (outputDirectory.isEmpty())
2213  {
2214  outputDirectory=QDir::currentDirPath().utf8();
2215  }
2216  else
2217  {
2218  QDir dir(outputDirectory);
2219  if (!dir.exists())
2220  {
2221  dir.setPath(QDir::currentDirPath());
2222  if (!dir.mkdir(outputDirectory))
2223  {
2224  err("tag OUTPUT_DIRECTORY: Output directory `%s' does not "
2225  "exist and cannot be created\n",outputDirectory.data());
2226  exit(1);
2227  }
2228  else
2229  {
2230  msg("Notice: Output directory `%s' does not exist. "
2231  "I have created it for you.\n", outputDirectory.data());
2232  }
2233  dir.cd(outputDirectory);
2234  }
2235  outputDirectory=dir.absPath().utf8();
2236  }
2237 
2238  QDir dir(outputDirectory);
2239  if (!dir.exists())
2240  {
2241  dir.setPath(QDir::currentDirPath());
2242  if (!dir.mkdir(outputDirectory))
2243  {
2244  err("Cannot create directory %s\n",outputDirectory.data());
2245  return false;
2246  }
2247  }
2248 
2249  perlModDir.setPath(outputDirectory+"/perlmod");
2250  if (!perlModDir.exists() && !perlModDir.mkdir(outputDirectory+"/perlmod"))
2251  {
2252  err("Could not create perlmod directory in %s\n",outputDirectory.data());
2253  return false;
2254  }
2255  return true;
2256 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
bool isEmpty() const
Definition: qcstring.h:189
void msg(const char *fmt,...)
Definition: message.cpp:107
virtual void setPath(const QString &path)
Definition: qdir.cpp:248
string dir
virtual bool mkdir(const QString &dirName, bool acceptAbsPath=TRUE) const
Definition: qdir_unix.cpp:98
static QString currentDirPath()
Definition: qdir_unix.cpp:141
const char * data() const
Definition: qcstring.h:207
#define Config_getString(val)
Definition: config.cpp:660
void err(const char *fmt,...)
Definition: message.cpp:226
QCString utf8() const
Definition: qstring.cpp:14507
virtual bool exists() const
Definition: qdir.cpp:820
bool PerlModGenerator::createOutputFile ( QFile f,
const char *  s 
)

Definition at line 2198 of file perlmodgen.cpp.

2199 {
2200  f.setName(s);
2201  if (!f.open(IO_WriteOnly))
2202  {
2203  err("Cannot open file %s for writing!\n", s);
2204  return false;
2205  }
2206  return true;
2207 }
#define IO_WriteOnly
Definition: qiodevice.h:62
void setName(const QString &name)
Definition: qfile.cpp:167
bool open(int)
Definition: qfile_unix.cpp:134
void err(const char *fmt,...)
Definition: message.cpp:226
static QCString * s
Definition: config.cpp:1042
void PerlModGenerator::generate ( )

Definition at line 2912 of file perlmodgen.cpp.

2913 {
2914  // + classes
2915  // + namespaces
2916  // + files
2917  // - packages
2918  // + groups
2919  // + related pages
2920  // - examples
2921 
2922  QDir perlModDir;
2923  if (!createOutputDir(perlModDir))
2924  return;
2925 
2926  bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
2927 
2928  QCString perlModAbsPath = perlModDir.absPath().utf8();
2929  pathDoxyDocsPM = perlModAbsPath + "/DoxyDocs.pm";
2930  pathDoxyStructurePM = perlModAbsPath + "/DoxyStructure.pm";
2931  pathMakefile = perlModAbsPath + "/Makefile";
2932  pathDoxyRules = perlModAbsPath + "/doxyrules.make";
2933 
2934  if (perlmodLatex) {
2935  pathDoxyStructureTex = perlModAbsPath + "/doxystructure.tex";
2936  pathDoxyFormatTex = perlModAbsPath + "/doxyformat.tex";
2937  pathDoxyLatexTex = perlModAbsPath + "/doxylatex.tex";
2938  pathDoxyLatexDVI = perlModAbsPath + "/doxylatex.dvi";
2939  pathDoxyLatexPDF = perlModAbsPath + "/doxylatex.pdf";
2940  pathDoxyDocsTex = perlModAbsPath + "/doxydocs.tex";
2941  pathDoxyLatexPL = perlModAbsPath + "/doxylatex.pl";
2942  pathDoxyLatexStructurePL = perlModAbsPath + "/doxylatex-structure.pl";
2943  }
2944 
2945  if (!(generatePerlModOutput()
2947  && generateMakefile()
2948  && generateDoxyRules()))
2949  return;
2950 
2951  if (perlmodLatex) {
2953  && generateDoxyLatexPL()
2955  && generateDoxyFormatTex()))
2956  return;
2957  }
2958 }
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
QCString pathDoxyLatexStructurePL
QCString pathDoxyStructurePM
QCString pathDoxyStructureTex
bool generateDoxyLatexPL()
bool generateDoxyFormatTex()
virtual QString absPath() const
Definition: qdir.cpp:276
QCString pathDoxyLatexPDF
bool generateDoxyStructurePM()
QCString pathMakefile
QCString pathDoxyDocsPM
bool createOutputDir(QDir &perlModDir)
bool generateDoxyLatexTex()
#define Config_getBool(val)
Definition: config.cpp:664
QCString pathDoxyLatexTex
bool generateDoxyRules()
bool generatePerlModOutput()
QCString pathDoxyFormatTex
QCString pathDoxyLatexDVI
QCString pathDoxyRules
QCString utf8() const
Definition: qstring.cpp:14507
QCString pathDoxyLatexPL
QCString pathDoxyDocsTex
bool generateDoxyLatexStructurePL()
bool PerlModGenerator::generateDoxyFormatTex ( )

Definition at line 2723 of file perlmodgen.cpp.

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

Definition at line 2600 of file perlmodgen.cpp.

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

Definition at line 2566 of file perlmodgen.cpp.

2567 {
2568  QFile doxyLatexStructurePL;
2569  if (!createOutputFile(doxyLatexStructurePL, pathDoxyLatexStructurePL))
2570  return false;
2571 
2572  FTextStream doxyLatexStructurePLStream(&doxyLatexStructurePL);
2573  doxyLatexStructurePLStream <<
2574  "use DoxyStructure;\n"
2575  "\n"
2576  "sub process($) {\n"
2577  "\tmy $node = $_[0];\n"
2578  "\tmy ($type, $name) = @$node[0, 1];\n"
2579  "\tmy $command;\n"
2580  "\tif ($type eq \"string\") { $command = \"String\" }\n"
2581  "\telsif ($type eq \"doc\") { $command = \"Doc\" }\n"
2582  "\telsif ($type eq \"hash\") {\n"
2583  "\t\t$command = \"Hash\";\n"
2584  "\t\tfor my $subnode (values %{$$node[2]}) {\n"
2585  "\t\t\tprocess($subnode);\n"
2586  "\t\t}\n"
2587  "\t}\n"
2588  "\telsif ($type eq \"list\") {\n"
2589  "\t\t$command = \"List\";\n"
2590  "\t\tprocess($$node[2]);\n"
2591  "\t}\n"
2592  "\tprint \"\\\\\" . $command . \"Node{\" . $name . \"}%\\n\";\n"
2593  "}\n"
2594  "\n"
2595  "process($doxystructure);\n";
2596 
2597  return true;
2598 }
QCString pathDoxyLatexStructurePL
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
bool createOutputFile(QFile &f, const char *s)
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
bool PerlModGenerator::generateDoxyLatexTex ( )

Definition at line 2886 of file perlmodgen.cpp.

2887 {
2888  QFile doxyLatexTex;
2889  if (!createOutputFile(doxyLatexTex, pathDoxyLatexTex))
2890  return false;
2891 
2892  FTextStream doxyLatexTexStream(&doxyLatexTex);
2893  doxyLatexTexStream <<
2894  "\\documentclass[a4paper,12pt]{article}\n"
2895  "\\usepackage[latin1]{inputenc}\n"
2896  "\\usepackage[none]{hyphenat}\n"
2897  "\\usepackage[T1]{fontenc}\n"
2898  "\\usepackage{hyperref}\n"
2899  "\\usepackage{times}\n"
2900  "\n"
2901  "\\input{doxyformat}\n"
2902  "\n"
2903  "\\begin{document}\n"
2904  "\\input{" << pathDoxyDocsTex << "}\n"
2905  "\\sloppy\n"
2906  "\\EmitDoxyDocs\n"
2907  "\\end{document}\n";
2908 
2909  return true;
2910 }
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
bool createOutputFile(QFile &f, const char *s)
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString pathDoxyLatexTex
QCString pathDoxyDocsTex
bool PerlModGenerator::generateDoxyRules ( )

Definition at line 2442 of file perlmodgen.cpp.

2443 {
2444  QFile doxyRules;
2445  if (!createOutputFile(doxyRules, pathDoxyRules))
2446  return false;
2447 
2448  bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
2449  QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
2450 
2451  FTextStream doxyRulesStream(&doxyRules);
2452  doxyRulesStream <<
2453  prefix << "DOXY_EXEC_PATH = " << pathDoxyExec << "\n" <<
2454  prefix << "DOXYFILE = " << pathDoxyfile << "\n" <<
2455  prefix << "DOXYDOCS_PM = " << pathDoxyDocsPM << "\n" <<
2456  prefix << "DOXYSTRUCTURE_PM = " << pathDoxyStructurePM << "\n" <<
2457  prefix << "DOXYRULES = " << pathDoxyRules << "\n";
2458  if (perlmodLatex)
2459  doxyRulesStream <<
2460  prefix << "DOXYLATEX_PL = " << pathDoxyLatexPL << "\n" <<
2461  prefix << "DOXYLATEXSTRUCTURE_PL = " << pathDoxyLatexStructurePL << "\n" <<
2462  prefix << "DOXYSTRUCTURE_TEX = " << pathDoxyStructureTex << "\n" <<
2463  prefix << "DOXYDOCS_TEX = " << pathDoxyDocsTex << "\n" <<
2464  prefix << "DOXYFORMAT_TEX = " << pathDoxyFormatTex << "\n" <<
2465  prefix << "DOXYLATEX_TEX = " << pathDoxyLatexTex << "\n" <<
2466  prefix << "DOXYLATEX_DVI = " << pathDoxyLatexDVI << "\n" <<
2467  prefix << "DOXYLATEX_PDF = " << pathDoxyLatexPDF << "\n";
2468 
2469  doxyRulesStream <<
2470  "\n"
2471  ".PHONY: clean-perlmod\n"
2472  "clean-perlmod::\n"
2473  "\trm -f $(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2474  "\t$(" << prefix << "DOXYDOCS_PM)";
2475  if (perlmodLatex)
2476  doxyRulesStream <<
2477  " \\\n"
2478  "\t$(" << prefix << "DOXYLATEX_PL) \\\n"
2479  "\t$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2480  "\t$(" << prefix << "DOXYDOCS_TEX) \\\n"
2481  "\t$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2482  "\t$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2483  "\t$(" << prefix << "DOXYLATEX_TEX) \\\n"
2484  "\t$(" << prefix << "DOXYLATEX_PDF) \\\n"
2485  "\t$(" << prefix << "DOXYLATEX_DVI) \\\n"
2486  "\t$(addprefix $(" << prefix << "DOXYLATEX_TEX:tex=),out aux log)";
2487  doxyRulesStream << "\n\n";
2488 
2489  doxyRulesStream <<
2490  "$(" << prefix << "DOXYRULES) \\\n"
2491  "$(" << prefix << "DOXYMAKEFILE) \\\n"
2492  "$(" << prefix << "DOXYSTRUCTURE_PM) \\\n"
2493  "$(" << prefix << "DOXYDOCS_PM)";
2494  if (perlmodLatex) {
2495  doxyRulesStream <<
2496  " \\\n"
2497  "$(" << prefix << "DOXYLATEX_PL) \\\n"
2498  "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2499  "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2500  "$(" << prefix << "DOXYLATEX_TEX)";
2501  }
2502  doxyRulesStream <<
2503  ": \\\n"
2504  "\t$(" << prefix << "DOXYFILE)\n"
2505  "\tcd $(" << prefix << "DOXY_EXEC_PATH) ; doxygen \"$<\"\n";
2506 
2507  if (perlmodLatex) {
2508  doxyRulesStream <<
2509  "\n"
2510  "$(" << prefix << "DOXYDOCS_TEX): \\\n"
2511  "$(" << prefix << "DOXYLATEX_PL) \\\n"
2512  "$(" << prefix << "DOXYDOCS_PM)\n"
2513  "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2514  "\n"
2515  "$(" << prefix << "DOXYSTRUCTURE_TEX): \\\n"
2516  "$(" << prefix << "DOXYLATEXSTRUCTURE_PL) \\\n"
2517  "$(" << prefix << "DOXYSTRUCTURE_PM)\n"
2518  "\tperl -I\"$(<D)\" \"$<\" >\"$@\"\n"
2519  "\n"
2520  "$(" << prefix << "DOXYLATEX_PDF) \\\n"
2521  "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2522  "$(" << prefix << "DOXYLATEX_TEX) \\\n"
2523  "$(" << prefix << "DOXYFORMAT_TEX) \\\n"
2524  "$(" << prefix << "DOXYSTRUCTURE_TEX) \\\n"
2525  "$(" << prefix << "DOXYDOCS_TEX)\n"
2526  "\n"
2527  "$(" << prefix << "DOXYLATEX_PDF): \\\n"
2528  "$(" << prefix << "DOXYLATEX_TEX)\n"
2529  "\tpdflatex -interaction=nonstopmode \"$<\"\n"
2530  "\n"
2531  "$(" << prefix << "DOXYLATEX_DVI): \\\n"
2532  "$(" << prefix << "DOXYLATEX_TEX)\n"
2533  "\tlatex -interaction=nonstopmode \"$<\"\n";
2534  }
2535 
2536  return true;
2537 }
QCString pathDoxyLatexStructurePL
QCString pathDoxyStructurePM
static QCString pathDoxyfile
QCString pathDoxyStructureTex
static QCString pathDoxyExec
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString pathDoxyLatexPDF
bool createOutputFile(QFile &f, const char *s)
QCString pathDoxyDocsPM
#define Config_getString(val)
Definition: config.cpp:660
#define Config_getBool(val)
Definition: config.cpp:664
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString pathDoxyLatexTex
QCString pathDoxyFormatTex
QCString pathDoxyLatexDVI
QCString pathDoxyRules
QCString pathDoxyLatexPL
QCString pathDoxyDocsTex
bool PerlModGenerator::generateDoxyStructurePM ( )

Definition at line 2258 of file perlmodgen.cpp.

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

Definition at line 2539 of file perlmodgen.cpp.

2540 {
2541  QFile makefile;
2542  if (!createOutputFile(makefile, pathMakefile))
2543  return false;
2544 
2545  bool perlmodLatex = Config_getBool("PERLMOD_LATEX");
2546  QCString prefix = Config_getString("PERLMOD_MAKEVAR_PREFIX");
2547 
2548  FTextStream makefileStream(&makefile);
2549  makefileStream <<
2550  ".PHONY: default clean" << (perlmodLatex ? " pdf" : "") << "\n"
2551  "default: " << (perlmodLatex ? "pdf" : "clean") << "\n"
2552  "\n"
2553  "include " << pathDoxyRules << "\n"
2554  "\n"
2555  "clean: clean-perlmod\n";
2556 
2557  if (perlmodLatex) {
2558  makefileStream <<
2559  "pdf: $(" << prefix << "DOXYLATEX_PDF)\n"
2560  "dvi: $(" << prefix << "DOXYLATEX_DVI)\n";
2561  }
2562 
2563  return true;
2564 }
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
QCString pathMakefile
bool createOutputFile(QFile &f, const char *s)
#define Config_getString(val)
Definition: config.cpp:660
#define Config_getBool(val)
Definition: config.cpp:664
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
QCString pathDoxyRules
void PerlModGenerator::generatePerlModForClass ( ClassDef cd)

Definition at line 1728 of file perlmodgen.cpp.

1729 {
1730  // + brief description
1731  // + detailed description
1732  // + template argument list(s)
1733  // - include file
1734  // + member groups
1735  // + inheritance diagram
1736  // + list of direct super classes
1737  // + list of direct sub classes
1738  // + list of inner classes
1739  // + collaboration diagram
1740  // + list of all members
1741  // + user defined member sections
1742  // + standard member sections
1743  // + detailed member documentation
1744  // - examples using the class
1745 
1746  if (cd->isReference()) return; // skip external references.
1747  if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
1748  if (cd->templateMaster()!=0) return; // skip generated template instances.
1749 
1750  m_output.openHash()
1751  .addFieldQuotedString("name", cd->name());
1752 
1753  if (cd->baseClasses())
1754  {
1755  m_output.openList("base");
1756  BaseClassListIterator bcli(*cd->baseClasses());
1757  BaseClassDef *bcd;
1758  for (bcli.toFirst();(bcd=bcli.current());++bcli)
1759  m_output.openHash()
1760  .addFieldQuotedString("name", bcd->classDef->displayName())
1761  .addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
1762  .addFieldQuotedString("protection", getProtectionName(bcd->prot))
1763  .closeHash();
1764  m_output.closeList();
1765  }
1766 
1767  if (cd->subClasses())
1768  {
1769  m_output.openList("derived");
1770  BaseClassListIterator bcli(*cd->subClasses());
1771  BaseClassDef *bcd;
1772  for (bcli.toFirst();(bcd=bcli.current());++bcli)
1773  m_output.openHash()
1774  .addFieldQuotedString("name", bcd->classDef->displayName())
1775  .addFieldQuotedString("virtualness", getVirtualnessName(bcd->virt))
1776  .addFieldQuotedString("protection", getProtectionName(bcd->prot))
1777  .closeHash();
1778  m_output.closeList();
1779  }
1780 
1781  ClassSDict *cl = cd->getClassSDict();
1782  if (cl)
1783  {
1784  m_output.openList("inner");
1786  ClassDef *cd;
1787  for (cli.toFirst();(cd=cli.current());++cli)
1788  m_output.openHash()
1789  .addFieldQuotedString("name", cd->name())
1790  .closeHash();
1791  m_output.closeList();
1792  }
1793 
1794  IncludeInfo *ii=cd->includeInfo();
1795  if (ii)
1796  {
1797  QCString nm = ii->includeName;
1798  if (nm.isEmpty() && ii->fileDef) nm = ii->fileDef->docName();
1799  if (!nm.isEmpty())
1800  {
1801  m_output.openHash("includes");
1802 #if 0
1803  if (ii->fileDef && !ii->fileDef->isReference()) // TODO: support external references
1804  t << " id=\"" << ii->fileDef->getOutputFileBase() << "\"";
1805 #endif
1806  m_output.addFieldBoolean("local", ii->local)
1807  .addFieldQuotedString("name", nm)
1808  .closeHash();
1809  }
1810  }
1811 
1813  addListOfAllMembers(cd);
1814  if (cd->getMemberGroupSDict())
1815  {
1817  MemberGroup *mg;
1818  for (;(mg=mgli.current());++mgli)
1819  generatePerlModSection(cd,mg->members(),"user_defined",mg->header());
1820  }
1821 
1829  generatePerlModSection(cd,cd->getMemberList(MemberListType_pubStaticMethods),"public_static_methods");
1830  generatePerlModSection(cd,cd->getMemberList(MemberListType_pubStaticAttribs),"public_static_members");
1831  generatePerlModSection(cd,cd->getMemberList(MemberListType_proTypes),"protected_typedefs");
1832  generatePerlModSection(cd,cd->getMemberList(MemberListType_proMethods),"protected_methods");
1833  generatePerlModSection(cd,cd->getMemberList(MemberListType_proAttribs),"protected_members");
1835  generatePerlModSection(cd,cd->getMemberList(MemberListType_proStaticMethods),"protected_static_methods");
1836  generatePerlModSection(cd,cd->getMemberList(MemberListType_proStaticAttribs),"protected_static_members");
1837  generatePerlModSection(cd,cd->getMemberList(MemberListType_priTypes),"private_typedefs");
1841  generatePerlModSection(cd,cd->getMemberList(MemberListType_priStaticMethods),"private_static_methods");
1842  generatePerlModSection(cd,cd->getMemberList(MemberListType_priStaticAttribs),"private_static_members");
1844  generatePerlModSection(cd,cd->getMemberList(MemberListType_related),"related_methods");
1845 
1846  addPerlModDocBlock(m_output,"brief",cd->getDefFileName(),cd->getDefLine(),cd,0,cd->briefDescription());
1847  addPerlModDocBlock(m_output,"detailed",cd->getDefFileName(),cd->getDefLine(),cd,0,cd->documentation());
1848 
1849 #if 0
1850  DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance);
1851  if (!inheritanceGraph.isTrivial())
1852  {
1853  t << " <inheritancegraph>" << endl;
1854  inheritanceGraph.writePerlMod(t);
1855  t << " </inheritancegraph>" << endl;
1856  }
1857  DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation);
1858  if (!collaborationGraph.isTrivial())
1859  {
1860  t << " <collaborationgraph>" << endl;
1861  collaborationGraph.writePerlMod(t);
1862  t << " </collaborationgraph>" << endl;
1863  }
1864  t << " <location file=\""
1865  << cd->getDefFileName() << "\" line=\""
1866  << cd->getDefLine() << "\"";
1867  if (cd->getStartBodyLine()!=-1)
1868  {
1869  t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
1870  << cd->getEndBodyLine() << "\"";
1871  }
1872  t << "/>" << endl;
1873 #endif
1874 
1875  m_output.closeHash();
1876 }
PerlModOutput & addFieldBoolean(const char *field, bool content)
Definition: perlmodgen.cpp:163
BaseClassList * subClasses() const
Definition: classdef.cpp:4404
IncludeInfo * includeInfo() const
Definition: classdef.cpp:4449
bool isEmpty() const
Definition: qcstring.h:189
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
void addListOfAllMembers(ClassDef *cd)
friend class Iterator
Definition: sortdict.h:598
bool isReference() const
Definition: classdef.cpp:3826
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
virtual bool isReference() const
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
static constexpr double mg
Definition: Units.h:145
QAsciiDict< Entry > cl
ClassSDict * getClassSDict()
Definition: classdef.cpp:4389
QCString getDefFileName() const
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
def cli(ctx)
Definition: main.py:7
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
QCString includeName
Definition: filedef.h:50
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString getOutputFileBase() const
Definition: filedef.h:83
MemberGroupSDict * getMemberGroupSDict() const
Definition: classdef.cpp:4524
bool local
Definition: filedef.h:51
int getEndBodyLine() const
FileDef * fileDef
Definition: filedef.h:49
int getStartBodyLine() const
static const char * getProtectionName(Protection prot)
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
friend class Iterator
Definition: sortdict.h:289
void generatePerlModSection(Definition *d, MemberList *ml, const char *name, const char *header=0)
static void addTemplateList(ClassDef *cd, PerlModOutput &output)
virtual QCString documentation() const
const QCString & docName() const
Definition: filedef.h:99
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
QTextStream & endl(QTextStream &s)
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
static const char * getVirtualnessName(Specifier virt)
void PerlModGenerator::generatePerlModForFile ( FileDef fd)

Definition at line 1941 of file perlmodgen.cpp.

1942 {
1943  // + includes files
1944  // + includedby files
1945  // - include graph
1946  // - included by graph
1947  // - contained class definitions
1948  // - contained namespace definitions
1949  // - member groups
1950  // + normal members
1951  // + brief desc
1952  // + detailed desc
1953  // - source code
1954  // - location
1955  // - number of lines
1956 
1957  if (fd->isReference()) return;
1958 
1959  m_output.openHash()
1960  .addFieldQuotedString("name", fd->name());
1961 
1962  IncludeInfo *inc;
1963  m_output.openList("includes");
1964  if (fd->includeFileList())
1965  {
1967  for (ili1.toFirst();(inc=ili1.current());++ili1)
1968  {
1969  m_output.openHash()
1970  .addFieldQuotedString("name", inc->includeName);
1971  if (inc->fileDef && !inc->fileDef->isReference())
1972  {
1974  }
1975  m_output.closeHash();
1976  }
1977  }
1978  m_output.closeList();
1979 
1980  m_output.openList("included_by");
1981  if (fd->includedByFileList())
1982  {
1984  for (ili2.toFirst();(inc=ili2.current());++ili2)
1985  {
1986  m_output.openHash()
1987  .addFieldQuotedString("name", inc->includeName);
1988  if (inc->fileDef && !inc->fileDef->isReference())
1989  {
1991  }
1992  m_output.closeHash();
1993  }
1994  }
1995  m_output.closeList();
1996 
2003 
2004  addPerlModDocBlock(m_output,"brief",fd->getDefFileName(),fd->getDefLine(),0,0,fd->briefDescription());
2005  addPerlModDocBlock(m_output,"detailed",fd->getDefFileName(),fd->getDefLine(),0,0,fd->documentation());
2006 
2007  m_output.closeHash();
2008 }
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
virtual bool isReference() const
QCString getDefFileName() const
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
int getDefLine() const
Definition: definition.h:188
QCString name() const
Definition: filedef.cpp:1193
PerlModOutput m_output
QList< IncludeInfo > * includeFileList() const
Definition: filedef.h:124
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
QCString includeName
Definition: filedef.h:50
MemberList * getMemberList(MemberListType lt) const
Definition: filedef.cpp:1839
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString getOutputFileBase() const
Definition: filedef.h:83
FileDef * fileDef
Definition: filedef.h:49
QList< IncludeInfo > * includedByFileList() const
Definition: filedef.h:125
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
void generatePerlModSection(Definition *d, MemberList *ml, const char *name, const char *header=0)
virtual QCString documentation() const
void PerlModGenerator::generatePerlModForGroup ( GroupDef gd)

Definition at line 2010 of file perlmodgen.cpp.

2011 {
2012  // + members
2013  // + member groups
2014  // + files
2015  // + classes
2016  // + namespaces
2017  // - packages
2018  // + pages
2019  // + child groups
2020  // - examples
2021  // + brief description
2022  // + detailed description
2023 
2024  if (gd->isReference()) return; // skip external references
2025 
2026  m_output.openHash()
2027  .addFieldQuotedString("name", gd->name())
2028  .addFieldQuotedString("title", gd->groupTitle());
2029 
2030  FileList *fl = gd->getFiles();
2031  if (fl)
2032  {
2033  m_output.openList("files");
2034  QListIterator<FileDef> fli(*fl);
2035  FileDef *fd;
2036  for (fli.toFirst();(fd=fli.current());++fli)
2037  m_output.openHash()
2038  .addFieldQuotedString("name", fd->name())
2039  .closeHash();
2040  m_output.closeList();
2041  }
2042 
2043  ClassSDict *cl = gd->getClasses();
2044  if (cl)
2045  {
2046  m_output.openList("classes");
2048  ClassDef *cd;
2049  for (cli.toFirst();(cd=cli.current());++cli)
2050  m_output.openHash()
2051  .addFieldQuotedString("name", cd->name())
2052  .closeHash();
2053  m_output.closeList();
2054  }
2055 
2056  NamespaceSDict *nl = gd->getNamespaces();
2057  if (nl)
2058  {
2059  m_output.openList("namespaces");
2060  NamespaceSDict::Iterator nli(*nl);
2061  NamespaceDef *nd;
2062  for (nli.toFirst();(nd=nli.current());++nli)
2063  m_output.openHash()
2064  .addFieldQuotedString("name", nd->name())
2065  .closeHash();
2066  m_output.closeList();
2067  }
2068 
2069  PageSDict *pl = gd->getPages();
2070  if (pl)
2071  {
2072  m_output.openList("pages");
2073  PageSDict::Iterator pli(*pl);
2074  PageDef *pd;
2075  for (pli.toFirst();(pd=pli.current());++pli)
2076  m_output.openHash()
2077  .addFieldQuotedString("title", pd->title())
2078  .closeHash();
2079  m_output.closeList();
2080  }
2081 
2082  GroupList *gl = gd->getSubGroups();
2083  if (gl)
2084  {
2085  m_output.openList("groups");
2086  GroupListIterator gli(*gl);
2087  GroupDef *sgd;
2088  for (gli.toFirst();(sgd=gli.current());++gli)
2089  m_output.openHash()
2090  .addFieldQuotedString("title", sgd->groupTitle())
2091  .closeHash();
2092  m_output.closeList();
2093  }
2094 
2095  if (gd->getMemberGroupSDict())
2096  {
2098  MemberGroup *mg;
2099  for (;(mg=mgli.current());++mgli)
2100  generatePerlModSection(gd,mg->members(),"user-defined",mg->header());
2101  }
2102 
2109 
2110  addPerlModDocBlock(m_output,"brief",gd->getDefFileName(),gd->getDefLine(),0,0,gd->briefDescription());
2111  addPerlModDocBlock(m_output,"detailed",gd->getDefFileName(),gd->getDefLine(),0,0,gd->documentation());
2112 
2113  m_output.closeHash();
2114 }
MemberGroupSDict * getMemberGroupSDict() const
Definition: groupdef.h:98
QCString title() const
Definition: pagedef.h:54
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
friend class Iterator
Definition: sortdict.h:598
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
virtual bool isReference() const
const char * groupTitle() const
Definition: groupdef.h:54
static constexpr double mg
Definition: Units.h:145
ClassSDict * getClasses() const
Definition: groupdef.h:101
QAsciiDict< Entry > cl
GroupList * getSubGroups() const
Definition: groupdef.h:103
QCString getDefFileName() const
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
def cli(ctx)
Definition: main.py:7
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
PageSDict * getPages() const
Definition: groupdef.h:104
QCString name() const
Definition: filedef.cpp:1193
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
NamespaceSDict * getNamespaces() const
Definition: groupdef.h:102
virtual QCString briefDescription(bool abbreviate=FALSE) const
MemberList * getMemberList(MemberListType lt) const
Definition: groupdef.cpp:1593
A model of a page symbol.
Definition: pagedef.h:29
FileList * getFiles() const
Definition: groupdef.h:100
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
friend class Iterator
Definition: sortdict.h:289
void generatePerlModSection(Definition *d, MemberList *ml, const char *name, const char *header=0)
virtual QCString documentation() const
std::string nl(std::size_t i=1)
void PerlModGenerator::generatePerlModForMember ( MemberDef md,
Definition  
)

Definition at line 1509 of file perlmodgen.cpp.

1510 {
1511  // + declaration/definition arg lists
1512  // + reimplements
1513  // + reimplementedBy
1514  // + exceptions
1515  // + const/volatile specifiers
1516  // - examples
1517  // - source definition
1518  // - source references
1519  // - source referenced by
1520  // - body code
1521  // - template arguments
1522  // (templateArguments(), definitionTemplateParameterLists())
1523 
1524  QCString memType;
1525  bool isFunc=FALSE;
1526  switch (md->memberType())
1527  {
1528  case MemberType_Define: memType="define"; break;
1529  case MemberType_EnumValue: memType="enumvalue"; break;
1530  case MemberType_Property: memType="property"; break;
1531  case MemberType_Variable: memType="variable"; break;
1532  case MemberType_Typedef: memType="typedef"; break;
1533  case MemberType_Enumeration: memType="enum"; break;
1534  case MemberType_Function: memType="function"; isFunc=TRUE; break;
1535  case MemberType_Signal: memType="signal"; isFunc=TRUE; break;
1536  //case MemberType_Prototype: memType="prototype"; isFunc=TRUE; break;
1537  case MemberType_Friend: memType="friend"; isFunc=TRUE; break;
1538  case MemberType_DCOP: memType="dcop"; isFunc=TRUE; break;
1539  case MemberType_Slot: memType="slot"; isFunc=TRUE; break;
1540  case MemberType_Event: memType="event"; break;
1541  case MemberType_Interface: memType="interface"; break;
1542  case MemberType_Service: memType="service"; break;
1543  }
1544 
1545  m_output.openHash()
1546  .addFieldQuotedString("kind", memType)
1547  .addFieldQuotedString("name", md->name())
1548  .addFieldQuotedString("virtualness", getVirtualnessName(md->virtualness()))
1549  .addFieldQuotedString("protection", getProtectionName(md->protection()))
1550  .addFieldBoolean("static", md->isStatic());
1551 
1554  if (md->memberType()!=MemberType_Define &&
1556  m_output.addFieldQuotedString("type", md->typeString());
1557 
1558  ArgumentList *al = md->argumentList();
1559  if (isFunc) //function
1560  {
1561  m_output.addFieldBoolean("const", al!=0 && al->constSpecifier)
1562  .addFieldBoolean("volatile", al!=0 && al->volatileSpecifier);
1563 
1564  m_output.openList("parameters");
1565  ArgumentList *declAl = md->declArgumentList();
1566  ArgumentList *defAl = md->argumentList();
1567  if (declAl && declAl->count()>0)
1568  {
1569  ArgumentListIterator declAli(*declAl);
1570  ArgumentListIterator defAli(*defAl);
1571  Argument *a;
1572  for (declAli.toFirst();(a=declAli.current());++declAli)
1573  {
1574  Argument *defArg = defAli.current();
1575  m_output.openHash();
1576 
1577  if (!a->name.isEmpty())
1578  m_output.addFieldQuotedString("declaration_name", a->name);
1579 
1580  if (defArg && !defArg->name.isEmpty() && defArg->name!=a->name)
1581  m_output.addFieldQuotedString("definition_name", defArg->name);
1582 
1583  if (!a->type.isEmpty())
1584  m_output.addFieldQuotedString("type", a->type);
1585 
1586  if (!a->array.isEmpty())
1587  m_output.addFieldQuotedString("array", a->array);
1588 
1589  if (!a->defval.isEmpty())
1590  m_output.addFieldQuotedString("default_value", a->defval);
1591 
1592  if (!a->attrib.isEmpty())
1593  m_output.addFieldQuotedString("attributes", a->attrib);
1594 
1595  m_output.closeHash();
1596  if (defArg) ++defAli;
1597  }
1598  }
1599  m_output.closeList();
1600  }
1601  else if (md->memberType()==MemberType_Define &&
1602  md->argsString()!=0) // define
1603  {
1604  m_output.openList("parameters");
1605  ArgumentListIterator ali(*al);
1606  Argument *a;
1607  for (ali.toFirst();(a=ali.current());++ali)
1608  {
1609  m_output.openHash()
1610  .addFieldQuotedString("name", a->type)
1611  .closeHash();
1612  }
1613  m_output.closeList();
1614  }
1615  else if (md->argsString()!=0)
1616  {
1617  m_output.addFieldQuotedString("arguments", md->argsString());
1618  }
1619 
1620  if (!md->initializer().isEmpty())
1621  m_output.addFieldQuotedString("initializer", md->initializer());
1622 
1623  if (md->excpString())
1624  m_output.addFieldQuotedString("exceptions", md->excpString());
1625 
1626  if (md->memberType()==MemberType_Enumeration) // enum
1627  {
1628  MemberList *enumFields = md->enumFieldList();
1629  if (enumFields)
1630  {
1631  m_output.openList("values");
1632  MemberListIterator emli(*enumFields);
1633  MemberDef *emd;
1634  for (emli.toFirst();(emd=emli.current());++emli)
1635  {
1636  m_output.openHash()
1637  .addFieldQuotedString("name", emd->name());
1638 
1639  if (!emd->initializer().isEmpty())
1640  m_output.addFieldQuotedString("initializer", emd->initializer());
1641 
1642  addPerlModDocBlock(m_output,"brief",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->briefDescription());
1643 
1644  addPerlModDocBlock(m_output,"detailed",emd->getDefFileName(),emd->getDefLine(),emd->getOuterScope(),emd,emd->documentation());
1645 
1646  m_output.closeHash();
1647  }
1648  m_output.closeList();
1649  }
1650  }
1651 
1652  MemberDef *rmd = md->reimplements();
1653  if (rmd)
1654  m_output.openHash("reimplements")
1655  .addFieldQuotedString("name", rmd->name())
1656  .closeHash();
1657 
1658  MemberList *rbml = md->reimplementedBy();
1659  if (rbml)
1660  {
1661  MemberListIterator mli(*rbml);
1662  m_output.openList("reimplemented_by");
1663  for (mli.toFirst();(rmd=mli.current());++mli)
1664  m_output.openHash()
1665  .addFieldQuotedString("name", rmd->name())
1666  .closeHash();
1667  m_output.closeList();
1668  }
1669 
1670  m_output.closeHash();
1671 }
QCString type
Definition: arguments.h:67
PerlModOutput & addFieldBoolean(const char *field, bool content)
Definition: perlmodgen.cpp:163
This class represents an function or template argument list.
Definition: arguments.h:82
MemberDef * reimplements() const
Definition: memberdef.cpp:878
MemberList * reimplementedBy() const
Definition: memberdef.cpp:883
bool isEmpty() const
Definition: qcstring.h:189
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
Protection protection() const
Definition: memberdef.cpp:4120
QCString defval
Definition: arguments.h:71
const bool FALSE
Definition: qglobal.h:370
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
MemberList * enumFieldList() const
Definition: memberdef.cpp:4497
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
ArgumentList * declArgumentList() const
Definition: memberdef.cpp:4517
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
QCString getDefFileName() const
bool constSpecifier
Definition: arguments.h:99
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const char * typeString() const
Definition: memberdef.cpp:4035
uint count() const
Definition: qlist.h:66
bool volatileSpecifier
Definition: arguments.h:101
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
PerlModOutput m_output
const double a
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
MemberType memberType() const
Definition: memberdef.cpp:4125
virtual Definition * getOuterScope() const
QCString documentation() const
Definition: memberdef.cpp:5085
QCString attrib
Definition: arguments.h:66
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
const QCString & initializer() const
Definition: memberdef.cpp:4055
const char * excpString() const
Definition: memberdef.cpp:4045
QCString name
Definition: arguments.h:69
static const char * getProtectionName(Protection prot)
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
const char * argsString() const
Definition: memberdef.cpp:4040
bool isStatic() const
Definition: memberdef.cpp:4205
const bool TRUE
Definition: qglobal.h:371
QCString array
Definition: arguments.h:70
static const char * getVirtualnessName(Specifier virt)
void PerlModGenerator::generatePerlModForNamespace ( NamespaceDef nd)

Definition at line 1878 of file perlmodgen.cpp.

1879 {
1880  // + contained class definitions
1881  // + contained namespace definitions
1882  // + member groups
1883  // + normal members
1884  // + brief desc
1885  // + detailed desc
1886  // + location
1887  // - files containing (parts of) the namespace definition
1888 
1889  if (nd->isReference()) return; // skip external references
1890 
1891  m_output.openHash()
1892  .addFieldQuotedString("name", nd->name());
1893 
1894  ClassSDict *cl = nd->getClassSDict();
1895  if (cl)
1896  {
1897  m_output.openList("classes");
1899  ClassDef *cd;
1900  for (cli.toFirst();(cd=cli.current());++cli)
1901  m_output.openHash()
1902  .addFieldQuotedString("name", cd->name())
1903  .closeHash();
1904  m_output.closeList();
1905  }
1906 
1908  if (nl)
1909  {
1910  m_output.openList("namespaces");
1911  NamespaceSDict::Iterator nli(*nl);
1912  NamespaceDef *nd;
1913  for (nli.toFirst();(nd=nli.current());++nli)
1914  m_output.openHash()
1915  .addFieldQuotedString("name", nd->name())
1916  .closeHash();
1917  m_output.closeList();
1918  }
1919 
1920  if (nd->getMemberGroupSDict())
1921  {
1923  MemberGroup *mg;
1924  for (;(mg=mgli.current());++mgli)
1925  generatePerlModSection(nd,mg->members(),"user-defined",mg->header());
1926  }
1927 
1934 
1935  addPerlModDocBlock(m_output,"brief",nd->getDefFileName(),nd->getDefLine(),0,0,nd->briefDescription());
1936  addPerlModDocBlock(m_output,"detailed",nd->getDefFileName(),nd->getDefLine(),0,0,nd->documentation());
1937 
1938  m_output.closeHash();
1939 }
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
friend class Iterator
Definition: sortdict.h:598
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
virtual bool isReference() const
static constexpr double mg
Definition: Units.h:145
QAsciiDict< Entry > cl
QCString getDefFileName() const
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
def cli(ctx)
Definition: main.py:7
const QCString & name() const
Definition: definition.h:114
int getDefLine() const
Definition: definition.h:188
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
MemberList * getMemberList(MemberListType lt) const
virtual QCString briefDescription(bool abbreviate=FALSE) const
NamespaceSDict * getNamespaceSDict() const
Definition: namespacedef.h:101
MemberGroupSDict * getMemberGroupSDict() const
Definition: namespacedef.h:95
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
friend class Iterator
Definition: sortdict.h:289
void generatePerlModSection(Definition *d, MemberList *ml, const char *name, const char *header=0)
ClassSDict * getClassSDict() const
Definition: namespacedef.h:98
virtual QCString documentation() const
std::string nl(std::size_t i=1)
void PerlModGenerator::generatePerlModForPage ( PageDef pi)

Definition at line 2116 of file perlmodgen.cpp.

2117 {
2118  // + name
2119  // + title
2120  // + documentation
2121 
2122  if (pd->isReference()) return;
2123 
2124  m_output.openHash()
2125  .addFieldQuotedString("name", pd->name());
2126 
2127  SectionInfo *si = Doxygen::sectionDict->find(pd->name());
2128  if (si)
2130 
2131  addPerlModDocBlock(m_output,"detailed",pd->docFile(),pd->docLine(),0,0,pd->documentation());
2132  m_output.closeHash();
2133 }
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
static SectionDict * sectionDict
Definition: doxygen.h:117
QCString title
Definition: section.h:57
static void addPerlModDocBlock(PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
T * find(const char *key)
Definition: sortdict.h:232
QCString filterTitle(const QCString &title)
Definition: util.cpp:7765
bool PerlModGenerator::generatePerlModOutput ( )

Definition at line 2135 of file perlmodgen.cpp.

2136 {
2137  QFile outputFile;
2138  if (!createOutputFile(outputFile, pathDoxyDocsPM))
2139  return false;
2140 
2141  FTextStream outputTextStream(&outputFile);
2142  PerlModOutputStream outputStream(&outputTextStream);
2143  m_output.setPerlModOutputStream(&outputStream);
2144  m_output.add("$doxydocs=").openHash();
2145 
2146  m_output.openList("classes");
2148  ClassDef *cd;
2149  for (cli.toFirst();(cd=cli.current());++cli)
2151  m_output.closeList();
2152 
2153  m_output.openList("namespaces");
2155  NamespaceDef *nd;
2156  for (nli.toFirst();(nd=nli.current());++nli)
2158  m_output.closeList();
2159 
2160  m_output.openList("files");
2162  FileName *fn;
2163  for (;(fn=fnli.current());++fnli)
2164  {
2165  FileNameIterator fni(*fn);
2166  FileDef *fd;
2167  for (;(fd=fni.current());++fni)
2169  }
2170  m_output.closeList();
2171 
2172  m_output.openList("groups");
2174  GroupDef *gd;
2175  for (;(gd=gli.current());++gli)
2176  {
2178  }
2179  m_output.closeList();
2180 
2181  m_output.openList("pages");
2183  PageDef *pd=0;
2184  for (pdi.toFirst();(pd=pdi.current());++pdi)
2185  {
2187  }
2188  if (Doxygen::mainPage)
2189  {
2191  }
2192  m_output.closeList();
2193 
2194  m_output.closeHash().add(";\n1;\n");
2195  return true;
2196 }
static GroupSDict * groupSDict
Definition: doxygen.h:119
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
void generatePerlModForClass(ClassDef *cd)
static FileNameList * inputNameList
Definition: doxygen.h:109
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
void generatePerlModForFile(FileDef *fd)
void generatePerlModForPage(PageDef *pi)
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
def cli(ctx)
Definition: main.py:7
QAsciiDict< Entry > fn
bool createOutputFile(QFile &f, const char *s)
PerlModOutput m_output
static PageSDict * pageSDict
Definition: doxygen.h:102
QCString pathDoxyDocsPM
void setPerlModOutputStream(PerlModOutputStream *os)
Definition: perlmodgen.cpp:119
The QFile class is an I/O device that operates on files.
Definition: qfile.h:50
A model of a page symbol.
Definition: pagedef.h:29
PerlModOutput & add(char c)
Definition: perlmodgen.cpp:134
void generatePerlModForNamespace(NamespaceDef *nd)
friend class Iterator
Definition: sortdict.h:289
static ClassSDict * classSDict
Definition: doxygen.h:99
static PageDef * mainPage
Definition: doxygen.h:103
void generatePerlModForGroup(GroupDef *gd)
void PerlModGenerator::generatePerlModSection ( Definition d,
MemberList ml,
const char *  name,
const char *  header = 0 
)

Definition at line 1673 of file perlmodgen.cpp.

1675 {
1676  if (ml==0) return; // empty list
1677 
1679 
1680  if (header)
1681  m_output.addFieldQuotedString("header", header);
1682 
1683  m_output.openList("members");
1684  MemberListIterator mli(*ml);
1685  MemberDef *md;
1686  for (mli.toFirst();(md=mli.current());++mli)
1687  {
1689  }
1691  .closeHash();
1692 }
static QCString name
Definition: declinfo.cpp:673
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
void generatePerlModForMember(MemberDef *md, Definition *)
PerlModOutput m_output
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159

Member Data Documentation

PerlModOutput PerlModGenerator::m_output

Definition at line 1468 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyDocsPM

Definition at line 1477 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyDocsTex

Definition at line 1471 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyFormatTex

Definition at line 1472 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyLatexDVI

Definition at line 1474 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyLatexPDF

Definition at line 1475 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyLatexPL

Definition at line 1478 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyLatexStructurePL

Definition at line 1479 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyLatexTex

Definition at line 1473 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyRules

Definition at line 1480 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyStructurePM

Definition at line 1470 of file perlmodgen.cpp.

QCString PerlModGenerator::pathDoxyStructureTex

Definition at line 1476 of file perlmodgen.cpp.

QCString PerlModGenerator::pathMakefile

Definition at line 1481 of file perlmodgen.cpp.


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