Classes | Macros | Functions | Variables
perlmodgen.cpp File Reference
#include <stdlib.h>
#include <qdir.h>
#include <qstack.h>
#include <qdict.h>
#include <qfile.h>
#include "perlmodgen.h"
#include "docparser.h"
#include "message.h"
#include "doxygen.h"
#include "pagedef.h"
#include "memberlist.h"
#include "ftextstream.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"

Go to the source code of this file.

Classes

class  PerlModOutputStream
 
class  PerlModOutput
 
class  PerlModDocVisitor
 Concrete visitor implementation for PerlMod output. More...
 
class  PerlModGenerator
 

Macros

#define PERLOUTPUT_MAX_INDENTATION   40
 

Functions

static void addTemplateArgumentList (ArgumentList *al, PerlModOutput &output, const char *)
 
static void addTemplateList (ClassDef *cd, PerlModOutput &output)
 
static void addPerlModDocBlock (PerlModOutput &output, const char *name, const QCString &fileName, int lineNr, Definition *scope, MemberDef *md, const QCString &text)
 
static const char * getProtectionName (Protection prot)
 
static const char * getVirtualnessName (Specifier virt)
 
void setPerlModDoxyfile (const QCString &qs)
 
void generatePerlMod ()
 

Variables

static QCString pathDoxyfile
 
static QCString pathDoxyExec
 

Macro Definition Documentation

#define PERLOUTPUT_MAX_INDENTATION   40

Definition at line 47 of file perlmodgen.cpp.

Function Documentation

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

Definition at line 1409 of file perlmodgen.cpp.

1416 {
1417  QCString stext = text.stripWhiteSpace();
1418  if (stext.isEmpty())
1419  output.addField(name).add("{}");
1420  else {
1421  DocNode *root = validatingParseDoc(fileName,lineNr,scope,md,stext,FALSE,0);
1422  output.openHash(name);
1423  PerlModDocVisitor *visitor = new PerlModDocVisitor(output);
1424  root->accept(visitor);
1425  visitor->finish();
1426  output.closeHash();
1427  delete visitor;
1428  delete root;
1429  }
1430 }
static QCString name
Definition: declinfo.cpp:673
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isEmpty() const
Definition: qcstring.h:189
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
const bool FALSE
Definition: qglobal.h:370
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
Concrete visitor implementation for PerlMod output.
Definition: perlmodgen.cpp:286
PerlModOutput & addField(const char *s)
Definition: perlmodgen.cpp:154
PerlModOutput & add(char c)
Definition: perlmodgen.cpp:134
virtual void accept(DocVisitor *v)=0
static void addTemplateArgumentList ( ArgumentList al,
PerlModOutput output,
const char *   
)
static

Definition at line 1372 of file perlmodgen.cpp.

1373 {
1374  if (!al)
1375  return;
1376  output.openList("template_parameters");
1377  ArgumentListIterator ali(*al);
1378  Argument *a;
1379  for (ali.toFirst();(a=ali.current());++ali)
1380  {
1381  output.openHash();
1382  if (!a->type.isEmpty())
1383  output.addFieldQuotedString("type", a->type);
1384  if (!a->name.isEmpty())
1385  output.addFieldQuotedString("declaration_name", a->name)
1386  .addFieldQuotedString("definition_name", a->name);
1387  if (!a->defval.isEmpty())
1388  output.addFieldQuotedString("default", a->defval);
1389  output.closeHash();
1390  }
1391  output.closeList();
1392 }
QCString type
Definition: arguments.h:67
bool isEmpty() const
Definition: qcstring.h:189
PerlModOutput & openHash(const char *s=0)
Definition: perlmodgen.cpp:169
QCString defval
Definition: arguments.h:71
PerlModOutput & openList(const char *s=0)
Definition: perlmodgen.cpp:167
PerlModOutput & closeHash()
Definition: perlmodgen.cpp:170
PerlModOutput & closeList()
Definition: perlmodgen.cpp:168
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
const double a
PerlModOutput & addFieldQuotedString(const char *field, const char *content)
Definition: perlmodgen.cpp:159
QCString name
Definition: arguments.h:69
static void addTemplateList ( ClassDef cd,
PerlModOutput output 
)
static

Definition at line 1404 of file perlmodgen.cpp.

1405 {
1407 }
ArgumentList * templateArguments() const
Definition: classdef.cpp:4419
const QCString & name() const
Definition: definition.h:114
static void addTemplateArgumentList(ArgumentList *al, PerlModOutput &output, const char *)
void generatePerlMod ( )

Definition at line 2960 of file perlmodgen.cpp.

2961 {
2962  PerlModGenerator pmg(Config_getBool("PERLMOD_PRETTY"));
2963  pmg.generate();
2964 }
#define Config_getBool(val)
Definition: config.cpp:664
static const char* getProtectionName ( Protection  prot)
static

Definition at line 1432 of file perlmodgen.cpp.

1433 {
1434  switch (prot)
1435  {
1436  case Public: return "public";
1437  case Protected: return "protected";
1438  case Private: return "private";
1439  case Package: return "package";
1440  }
1441  return 0;
1442 }
Definition: types.h:26
Definition: types.h:26
Definition: types.h:26
static const char* getVirtualnessName ( Specifier  virt)
static

Definition at line 1444 of file perlmodgen.cpp.

1445 {
1446  switch(virt)
1447  {
1448  case Normal: return "non_virtual";
1449  case Virtual: return "virtual";
1450  case Pure: return "pure_virtual";
1451  }
1452  return 0;
1453 }
Definition: types.h:29
Definition: types.h:29
Definition: types.h:29
static Specifier virt
void setPerlModDoxyfile ( const QCString qs)

Definition at line 1458 of file perlmodgen.cpp.

1459 {
1460  pathDoxyfile = qs;
1462 }
static QCString pathDoxyfile
static QCString pathDoxyExec
static QString currentDirPath()
Definition: qdir_unix.cpp:141
QCString utf8() const
Definition: qstring.cpp:14507

Variable Documentation

QCString pathDoxyExec
static

Definition at line 1456 of file perlmodgen.cpp.

QCString pathDoxyfile
static

Definition at line 1455 of file perlmodgen.cpp.