Skip to main content

The perlmodgen.cpp File Reference

Included Headers

#include <stdlib.h> #include <stack> #include "perlmodgen.h" #include "docparser.h" #include "docnode.h" #include "message.h" #include "doxygen.h" #include "pagedef.h" #include "memberlist.h" #include "arguments.h" #include "config.h" #include "groupdef.h" #include "classdef.h" #include "classlist.h" #include "filename.h" #include "membername.h" #include "namespacedef.h" #include "membergroup.h" #include "section.h" #include "util.h" #include "htmlentity.h" #include "emoji.h" #include "dir.h" #include "portable.h" #include "moduledef.h" #include "construct.h" #include "cite.h"

Classes Index

classPerlModOutputStream
classPerlModOutput
classPerlModDocVisitor

Concrete visitor implementation for PerlMod output. More...

classPerlModGenerator

Functions Index

static voidaddTemplateArgumentList (const ArgumentList &al, PerlModOutput &output, const QCString &)
static voidaddTemplateList (const ClassDef *cd, PerlModOutput &output)
static voidaddTemplateList (const ConceptDef *cd, PerlModOutput &output)
static voidaddPerlModDocBlock (PerlModOutput &output, const QCString &name, const QCString &fileName, int lineNr, const Definition *scope, const MemberDef *md, const QCString &text)
static const char *getProtectionName (Protection prot)
static const char *getVirtualnessName (Specifier virt)
voidsetPerlModDoxyfile (const QCString &qs)
voidgeneratePerlMod ()

Variables Index

static QCStringpathDoxyfile
static QCStringpathDoxyExec

Macro Definitions Index

#definePERLOUTPUT_MAX_INDENTATION   40

Functions

addPerlModDocBlock()

void addPerlModDocBlock (PerlModOutput & output, const QCString & name, const QCString & fileName, int lineNr, const Definition * scope, const MemberDef * md, const QCString & text)
static

Definition at line 1370 of file perlmodgen.cpp.

1371 const QCString &name,
1372 const QCString &fileName,
1373 int lineNr,
1374 const Definition *scope,
1375 const MemberDef *md,
1376 const QCString &text)
1377{
1378 QCString stext = text.stripWhiteSpace();
1379 if (stext.isEmpty())
1380 {
1381 output.addField(name).add("{}");
1382 }
1383 else
1384 {
1385 auto parser { createDocParser() };
1386 auto ast { validatingParseDoc(*parser.get(),
1387 fileName,lineNr,scope,md,stext,FALSE,FALSE,
1388 QCString(),FALSE,FALSE) };
1389 output.openHash(name);
1390 auto astImpl = dynamic_cast<const DocNodeAST*>(ast.get());
1391 if (astImpl)
1392 {
1393 PerlModDocVisitor visitor(output);
1394 std::visit(visitor,astImpl->root);
1395 visitor.finish();
1396 }
1397 output.closeHash();
1398 }
1399}

References PerlModOutput::add, PerlModOutput::addField, PerlModOutput::closeHash, createDocParser, FALSE, PerlModDocVisitor::finish, QCString::isEmpty, PerlModOutput::openHash, QCString::stripWhiteSpace and validatingParseDoc.

Referenced by PerlModGenerator::generatePerlModForClass, PerlModGenerator::generatePerlModForConcept, PerlModGenerator::generatePerlModForFile, PerlModGenerator::generatePerlModForGroup, PerlModGenerator::generatePerlModForMember, PerlModGenerator::generatePerlModForModule, PerlModGenerator::generatePerlModForNamespace and PerlModGenerator::generatePerlModForPage.

addTemplateArgumentList()

void addTemplateArgumentList (const ArgumentList & al, PerlModOutput & output, const QCString &)
static

Definition at line 1341 of file perlmodgen.cpp.

1341static void addTemplateArgumentList(const ArgumentList &al,PerlModOutput &output,const QCString &)
1342{
1343 if (!al.hasParameters()) return;
1344 output.openList("template_parameters");
1345 for (const Argument &a : al)
1346 {
1347 output.openHash();
1348 if (!a.type.isEmpty())
1349 output.addFieldQuotedString("type", a.type);
1350 if (!a.name.isEmpty())
1351 output.addFieldQuotedString("declaration_name", a.name)
1352 .addFieldQuotedString("definition_name", a.name);
1353 if (!a.defval.isEmpty())
1354 output.addFieldQuotedString("default", a.defval);
1355 output.closeHash();
1356 }
1357 output.closeList();
1358}

References PerlModOutput::addFieldQuotedString, PerlModOutput::closeHash, PerlModOutput::closeList, ArgumentList::hasParameters, PerlModOutput::openHash and PerlModOutput::openList.

Referenced by addTemplateList and addTemplateList.

addTemplateList()

void addTemplateList (const ClassDef * cd, PerlModOutput & output)
static

addTemplateList()

void addTemplateList (const ConceptDef * cd, PerlModOutput & output)
static

Definition at line 1365 of file perlmodgen.cpp.

1365static void addTemplateList(const ConceptDef *cd,PerlModOutput &output)
1366{
1368}

References addTemplateArgumentList, ConceptDef::getTemplateParameterList and Definition::name.

generatePerlMod()

void generatePerlMod ()

Definition at line 2953 of file perlmodgen.cpp.

2954{
2955 PerlModGenerator pmg(Config_getBool(PERLMOD_PRETTY));
2956 pmg.generate();
2957}

References Config_getBool and PerlModGenerator::generate.

Referenced by generateOutput.

getProtectionName()

const char * getProtectionName (Protection prot)
static

getVirtualnessName()

const char * getVirtualnessName (Specifier virt)
static

setPerlModDoxyfile()

void setPerlModDoxyfile (const QCString & qs)

Definition at line 1414 of file perlmodgen.cpp.

1415{
1416 pathDoxyfile = qs;
1418}

References Dir::currentDirPath, pathDoxyExec and pathDoxyfile.

Referenced by readConfiguration.

Variables

pathDoxyExec

QCString pathDoxyExec
static

Definition at line 1412 of file perlmodgen.cpp.

Referenced by PerlModGenerator::generateDoxyRules and setPerlModDoxyfile.

pathDoxyfile

QCString pathDoxyfile
static

Definition at line 1411 of file perlmodgen.cpp.

Referenced by PerlModGenerator::generateDoxyRules and setPerlModDoxyfile.

Macro Definitions

PERLOUTPUT_MAX_INDENTATION

#define PERLOUTPUT_MAX_INDENTATION   40

Definition at line 46 of file perlmodgen.cpp.

46#define PERLOUTPUT_MAX_INDENTATION 40

Referenced by PerlModOutput::decIndent and PerlModOutput::incIndent.


Generated via doxygen2docusaurus by Doxygen 1.14.0.