Commit 9e1745a1 authored by dimitri's avatar dimitri

Release-1.3-20030524

parent 64200b5e
DOXYGEN Version 1.3-20030514
DOXYGEN Version 1.3-20030524
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (14 May 2003)
Dimitri van Heesch (24 May 2003)
DOXYGEN Version 1.3_20030514
DOXYGEN Version 1.3_20030524
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (14 May 2003)
Dimitri van Heesch (dimitri@stack.nl) (24 May 2003)
1.3-20030514
1.3-20030524
......@@ -1439,10 +1439,14 @@ ALIASES = "english=\if english" \
duplicated or it can be used to extend the documentation of an inherited
member.
The link object can point to a member, a class, a namespace, a group,
a page, or a file (checked in that order). To copy the
documentation for a member of a class for instance one can put the
following in the documentation
The link object can point to a member (of a class, file or group),
a class, a namespace, a group, a page, or a file (checked in that order).
Note that if the object pointed to is a member (function, variable,
typedef, etc), the compound (class, file, or group) containing it
should also be documented for the copying to work.
To copy the documentation for a member of a
class for instance one can put the following in the documentation
\verbatim
/*! @copydoc MyClass::myfunction()
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.14-20020317), 28 languages
Currently (version 1.3-20030430), 28 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Catalan, Chinese, Chinese Traditional, Croatian,
Czech, Danish, Dutch, English, Finnish,
......@@ -55,7 +55,7 @@ when the translator was updated.
<TD>Brazilian Portuguese</TD>
<TD>Fabio "FJTC" Jun Takada Chino</TD>
<TD>chino@NOSPAM.icmc.sc.usp.br</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Catalan</TD>
......@@ -79,13 +79,13 @@ when the translator was updated.
<TD>Croatian</TD>
<TD>Boris Bralo</TD>
<TD>boris.bralo@NOSPAM.zg.tel.hr</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Czech</TD>
<TD>Petr P&#x0159;ikryl</TD>
<TD>prikrylp@NOSPAM.skil.cz</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Danish</TD>
......@@ -115,13 +115,13 @@ when the translator was updated.
<TD>French</TD>
<TD>Xavier Outhier</TD>
<TD>xouthier@NOSPAM.yahoo.fr</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>German</TD>
<TD>Jens Seidel</TD>
<TD>jensseidel@NOSPAM.users.sf.net</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Greek</TD>
......@@ -139,7 +139,7 @@ when the translator was updated.
<TD>Italian</TD>
<TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD>
<TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD>
<TD>strange</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Japanese</TD>
......@@ -230,7 +230,7 @@ when the translator was updated.
{\bf Language} & {\bf Maintainer} & {\bf Contact address} & {\bf Status} \\
\hline
\hline
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & strange \\
Brazilian Portuguese & Fabio "FJTC" Jun Takada Chino & {\tt chino@icmc.sc.usp.br} & up-to-date \\
\hline
Catalan & Albert Mora & {\tt amora@iua.upf.es} & 1.2.17 \\
\hline
......@@ -239,9 +239,9 @@ when the translator was updated.
\hline
Chinese Traditional & Gary Lee & {\tt garylee@ecosine.com.tw} & 1.2.16 \\
\hline
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & strange \\
Croatian & Boris Bralo & {\tt boris.bralo@zg.tel.hr} & up-to-date \\
\hline
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & strange \\
Czech & Petr P\v{r}ikryl & {\tt prikrylp@skil.cz} & up-to-date \\
\hline
Danish & Erik S\o{}e S\o{}rensen & {\tt erik@mail.nu} & strange \\
\hline
......@@ -251,15 +251,15 @@ when the translator was updated.
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & strange \\
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & strange \\
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
\hline
Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
\hline
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & strange \\
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\
& Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\
\hline
Japanese & Ryunosuke Satoh & {\tt sun594@hotmail.com} & strange \\
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.3_20030514
Version: 1.3_20030524
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -1057,7 +1057,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("CLASS_GRAPH"))
// write class diagram using dot
{
DotClassGraph inheritanceGraph(this,DotClassGraph::Inheritance,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
DotClassGraph inheritanceGraph(this,DotNode::Inheritance,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
ol.pushGeneratorState();
......@@ -1092,7 +1092,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (Config_getBool("HAVE_DOT") && Config_getBool("COLLABORATION_GRAPH"))
{
DotClassGraph usageImplGraph(this,DotClassGraph::Implementation,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
DotClassGraph usageImplGraph(this,DotNode::Collaboration,Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!usageImplGraph.isTrivial())
{
ol.pushGeneratorState();
......
......@@ -2474,7 +2474,7 @@ void Config::create()
"TEMPLATE_RELATIONS",
"If set to YES, the inheritance and collaboration graphs will show the \n"
"relations between templates and their instances. \n",
TRUE
FALSE
);
cb->addDependency("HAVE_DOT");
cb = addBool(
......
......@@ -453,7 +453,7 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
t << " cp-documentation = <<_EnD_oF_dEf_TeXt_" << endl
<< cd->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
DotClassGraph inheritanceGraph(cd,DotNode::Inheritance,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
......@@ -461,7 +461,7 @@ void generateDEFForClass(ClassDef *cd,QTextStream &t)
inheritanceGraph.writeDEF(t);
t << endl << "_EnD_oF_dEf_TeXt_;" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
DotClassGraph collaborationGraph(cd,DotNode::Collaboration,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial())
{
......
......@@ -279,7 +279,7 @@ OPNEW {BLANK}+"new"({BLANK}*"[]")?
OPDEL {BLANK}+"delete"({BLANK}*"[]")?
OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"
OPCAST {BLANK}+[^(\r\n.,]+
OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
OPMASK ({BLANK}*{OPNORM}{FUNCARG})|({OPCAST}{FUNCARG})
LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
......
......@@ -294,22 +294,22 @@ static void deleteNodes(DotNode *node,SDict<DotNode> *skipNodes=0)
deletedNodes.clear(); // actually remove the nodes.
}
DotNode::DotNode(int n,const char *lab,const char *url,int distance,bool isRoot)
: m_number(n), m_label(lab), m_url(url), m_isRoot(isRoot)
DotNode::DotNode(int n,const char *lab,const char *url,int distance,
bool isRoot,ClassDef *cd)
: m_number(n), m_label(lab), m_url(url), m_isRoot(isRoot), m_classDef(cd)
{
m_children = 0;
m_edgeInfo = 0;
m_parents = 0;
m_subgraphId=-1;
m_deleted=FALSE;
m_written=FALSE;
m_hasDoc=FALSE;
m_subgraphId =-1;
m_deleted = FALSE;
m_written = FALSE;
m_hasDoc = FALSE;
m_distance = distance;
}
DotNode::~DotNode()
{
//printf("DotNode::~DotNode() %s\n",m_label.data());
delete m_children;
delete m_parents;
delete m_edgeInfo;
......@@ -419,6 +419,7 @@ static QCString convertLabel(const QCString &l)
}
void DotNode::writeBox(QTextStream &t,
GraphType /* gt */,
GraphOutputFormat /*format*/,
bool hasNonReachableChildren)
{
......@@ -444,6 +445,7 @@ void DotNode::writeBox(QTextStream &t,
}
void DotNode::writeArrow(QTextStream &t,
GraphType /* gt */,
GraphOutputFormat format,
DotNode *cn,
EdgeInfo *ei,
......@@ -472,6 +474,7 @@ void DotNode::writeArrow(QTextStream &t,
}
void DotNode::write(QTextStream &t,
GraphType gt,
GraphOutputFormat format,
bool topDown,
bool toChildren,
......@@ -493,7 +496,7 @@ void DotNode::write(QTextStream &t,
if (cn->m_distance>distance) hasNonReachableChildren=TRUE;
}
}
writeBox(t,format,hasNonReachableChildren);
writeBox(t,gt,format,hasNonReachableChildren);
m_written=TRUE;
if (nl)
{
......@@ -506,9 +509,9 @@ void DotNode::write(QTextStream &t,
{
if (cn->m_distance<=distance)
{
writeArrow(t,format,cn,dnli2.current(),topDown,backArrows);
writeArrow(t,gt,format,cn,dnli2.current(),topDown,backArrows);
}
cn->write(t,format,topDown,toChildren,distance,backArrows);
cn->write(t,gt,format,topDown,toChildren,distance,backArrows);
}
}
else // render parents
......@@ -520,6 +523,7 @@ void DotNode::write(QTextStream &t,
if (pn->m_distance<=distance)
{
writeArrow(t,
gt,
format,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(this)),
......@@ -527,7 +531,7 @@ void DotNode::write(QTextStream &t,
backArrows
);
}
pn->write(t,format,TRUE,FALSE,distance,backArrows);
pn->write(t,gt,format,TRUE,FALSE,distance,backArrows);
}
}
}
......@@ -809,7 +813,7 @@ void DotGfxHierarchyTable::writeGraph(QTextStream &out,const char *path)
for (;(node=dnli2.current());++dnli2)
{
if (node->m_subgraphId==n->m_subgraphId)
node->write(t,BITMAP,FALSE,TRUE,1000,TRUE);
node->write(t,DotNode::Hierarchy,BITMAP,FALSE,TRUE,1000,TRUE);
}
writeGraphFooter(t);
f.close();
......@@ -1062,7 +1066,9 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
bn = new DotNode(m_curNodeNumber++,
displayName,
tmp_url.data(),
distance
distance,
FALSE, // rootNode
cd
);
if (distance>m_maxDistance) m_maxDistance=distance;
if (base)
......@@ -1090,7 +1096,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
// cd->name().data(),distance,base);
// ---- Add inheritance relations
if (m_graphType == Inheritance)
if (m_graphType == DotNode::Inheritance)
{
BaseClassListIterator bcli(base ? *cd->baseClasses() : *cd->subClasses());
BaseClassDef *bcd;
......@@ -1104,7 +1110,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
}
else // m_graphType != Inheritance
{
ASSERT(m_graphType==Implementation);
ASSERT(m_graphType==DotNode::Collaboration);
// ---- Add usage relations
......@@ -1187,7 +1193,7 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
}
}
DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
DotClassGraph::DotClassGraph(ClassDef *cd,DotNode::GraphType t,int maxRecursionDepth)
{
//printf("--------------- DotClassGraph::DotClassGraph `%s'\n",cd->displayName().data());
m_graphType = t;
......@@ -1204,7 +1210,8 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
className,
tmp_url.data(),
0, // distance
TRUE // is a root node
TRUE, // is a root node
cd
);
m_usedNodes = new QDict<DotNode>(1009);
m_usedNodes->insert(className,m_startNode);
......@@ -1217,14 +1224,14 @@ DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
if (m_recDepth>0)
{
buildGraph(cd,m_startNode,1,TRUE);
if (t==Inheritance) buildGraph(cd,m_startNode,1,FALSE);
if (t==DotNode::Inheritance) buildGraph(cd,m_startNode,1,FALSE);
}
m_diskName = cd->getFileBase().copy();
}
bool DotClassGraph::isTrivial() const
{
if (m_graphType==Inheritance)
if (m_graphType==DotNode::Inheritance)
return m_startNode->m_children==0 && m_startNode->m_parents==0;
else
return m_startNode->m_children==0;
......@@ -1237,6 +1244,7 @@ DotClassGraph::~DotClassGraph()
}
void writeDotGraph(DotNode *root,
DotNode::GraphType gt,
GraphOutputFormat format,
const QCString &baseName,
bool lrRank,
......@@ -1258,7 +1266,7 @@ void writeDotGraph(DotNode *root,
t << " rankdir=LR;" << endl;
}
root->clearWriteFlag();
root->write(t,format,TRUE,TRUE,distance,backArrows);
root->write(t,gt,format,TRUE,TRUE,distance,backArrows);
if (renderParents && root->m_parents)
{
//printf("rendering parents!\n");
......@@ -1269,6 +1277,7 @@ void writeDotGraph(DotNode *root,
if (pn->m_distance<=distance)
{
root->writeArrow(t,
gt,
format,
pn,
pn->m_edgeInfo->at(pn->m_children->findRef(root)),
......@@ -1276,7 +1285,7 @@ void writeDotGraph(DotNode *root,
backArrows
);
}
pn->write(t,format,TRUE,FALSE,distance,backArrows);
pn->write(t,gt,format,TRUE,FALSE,distance,backArrows);
}
}
writeGraphFooter(t);
......@@ -1288,6 +1297,7 @@ static void findMaximalDotGraph(DotNode *root,
int maxDist,
const QCString &baseName,
QDir &thisDir,
DotNode::GraphType gt,
GraphOutputFormat format,
bool lrRank=FALSE,
bool renderParents=FALSE,
......@@ -1309,7 +1319,7 @@ static void findMaximalDotGraph(DotNode *root,
{
curDistance = (minDistance+maxDistance)/2;
writeDotGraph(root,format,baseName,lrRank,renderParents,
writeDotGraph(root,gt,format,baseName,lrRank,renderParents,
curDistance,backArrows);
QCString dotArgs(maxCmdLine);
......@@ -1347,6 +1357,7 @@ static void findMaximalDotGraph(DotNode *root,
//printf("lastFit=%d\n",lastFit);
writeDotGraph(root,
gt,
format,
baseName,
lrRank || (minDistance==1 && width>Config_getInt("MAX_DOT_GRAPH_WIDTH")),
......@@ -1361,15 +1372,18 @@ QCString DotClassGraph::diskName() const
QCString result=m_diskName.copy();
switch (m_graphType)
{
case Implementation:
case DotNode::Collaboration:
result+="_coll_graph";
break;
case Interface:
result+="_intf_graph";
break;
case Inheritance:
//case Interface:
// result+="_intf_graph";
// break;
case DotNode::Inheritance:
result+="_inherit_graph";
break;
default:
ASSERT(0);
break;
}
return result;
}
......@@ -1395,20 +1409,23 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
QCString mapName;
switch (m_graphType)
{
case Implementation:
case DotNode::Collaboration:
mapName="coll_map";
break;
case Interface:
mapName="intf_map";
break;
case Inheritance:
//case Interface:
// mapName="intf_map";
// break;
case DotNode::Inheritance:
mapName="inherit_map";
break;
default:
ASSERT(0);
break;
}
baseName = convertNameToFile(diskName());
findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,
thisDir,format,!isTBRank,m_graphType==Inheritance);
thisDir,m_graphType,format,!isTBRank,m_graphType==DotNode::Inheritance);
if (format==BITMAP) // run dot to create a bitmap image
{
......@@ -1440,15 +1457,18 @@ QCString DotClassGraph::writeGraph(QTextStream &out,
<< mapLabel << "\" alt=\"";
switch (m_graphType)
{
case Implementation:
case DotNode::Collaboration:
out << "Collaboration graph";
break;
case Interface:
out << "Interface dependency graph";
break;
case Inheritance:
//case Interface:
// out << "Interface dependency graph";
// break;
case DotNode::Inheritance:
out << "Inheritance graph";
break;
default:
ASSERT(0);
break;
}
out << "\"></center>" << endl;
QString tmpstr;
......@@ -1647,7 +1667,8 @@ QCString DotInclDepGraph::writeGraph(QTextStream &out,
QCString mapName=m_startNode->m_label.copy();
if (m_inverse) mapName+="dep";
findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),baseName,thisDir,format,
findMaximalDotGraph(m_startNode,QMIN(m_recDepth,m_maxDistance),
baseName,thisDir,DotNode::Dependency,format,
FALSE,FALSE,!m_inverse);
if (format==BITMAP)
......
......@@ -47,21 +47,9 @@ struct EdgeInfo
class DotNode
{
friend class DotGfxHierarchyTable;
friend class DotClassGraph;
friend class DotInclDepGraph;
friend class DotNodeList;
friend void writeDotGraph(
DotNode *root,
GraphOutputFormat f,
const QCString &baseName,
bool lrRank,
bool renderParents,
int distance,
bool backArrow
);
public:
DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE);
enum GraphType { Dependency, Inheritance, Collaboration, Hierarchy };
DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE,ClassDef *cd=0);
~DotNode();
void addChild(DotNode *n,
int edgeColor=EdgeInfo::Purple,
......@@ -75,8 +63,8 @@ class DotNode
void deleteNode(DotNodeList &deletedList,SDict<DotNode> *skipNodes=0);
void removeChild(DotNode *n);
void removeParent(DotNode *n);
void write(QTextStream &t,GraphOutputFormat f,bool topDown,bool toChildren,
int maxDistance,bool backArrows);
void write(QTextStream &t,GraphType gt,GraphOutputFormat f,
bool topDown,bool toChildren,int maxDistance,bool backArrows);
int m_subgraphId;
void clearWriteFlag();
void writeXML(QTextStream &t,bool isClassGraph);
......@@ -86,9 +74,9 @@ class DotNode
private:
void colorConnectedNodes(int curColor);
void writeBox(QTextStream &t,GraphOutputFormat f,
void writeBox(QTextStream &t,GraphType gt,GraphOutputFormat f,
bool hasNonReachableChildren);
void writeArrow(QTextStream &t,GraphOutputFormat f,DotNode *cn,
void writeArrow(QTextStream &t,GraphType gt,GraphOutputFormat f,DotNode *cn,
EdgeInfo *ei,bool topDown, bool pointBack=TRUE);
const DotNode *findDocNode() const; // only works for acyclic graphs!
int m_number;
......@@ -102,6 +90,22 @@ class DotNode
bool m_hasDoc; //!< used to mark a node as documented
int m_distance; //!< distance to the root node
bool m_isRoot; //!< indicates if this is a root node
ClassDef * m_classDef; //!< class representing this node (can be 0)
friend class DotGfxHierarchyTable;
friend class DotClassGraph;
friend class DotInclDepGraph;
friend class DotNodeList;
friend void writeDotGraph(
DotNode *root,
GraphType gt,
GraphOutputFormat f,
const QCString &baseName,
bool lrRank,
bool renderParents,
int distance,
bool backArrow
);
};
class DotGfxHierarchyTable
......@@ -124,8 +128,8 @@ class DotGfxHierarchyTable
class DotClassGraph
{
public:
enum GraphType { Interface, Implementation, Inheritance };
DotClassGraph(ClassDef *cd,GraphType t,int maxRecusionDepth);
//enum GraphType { Interface, Implementation, Inheritance };
DotClassGraph(ClassDef *cd,DotNode::GraphType t,int maxRecusionDepth);
~DotClassGraph();
bool isTrivial() const;
QCString writeGraph(QTextStream &t,GraphOutputFormat f,const char *path,
......@@ -140,10 +144,10 @@ class DotClassGraph
void addClass(ClassDef *cd,DotNode *n,int prot,const char *label,
int level,const char *usedName,const char *templSpec,
bool base);
DotNode *m_startNode;
QDict<DotNode> *m_usedNodes;
DotNode * m_startNode;
QDict<DotNode> * m_usedNodes;
static int m_curNodeNumber;
GraphType m_graphType;
DotNode::GraphType m_graphType;
int m_recDepth;
QCString m_diskName;
int m_maxDistance;
......
......@@ -2133,9 +2133,16 @@ static void buildFunctionList(Entry *root)
//printf("root->parent=`%s' cd=%p root->type.find(re,0)=%d\n",
// root->parent->name.data(),getClass(root->parent->name),
// root->type.find(re,0));
QCString scope=stripAnonymousNamespaceScope(root->parent->name.copy());
QCString scope=stripAnonymousNamespaceScope(root->parent->name);
scope=stripTemplateSpecifiersFromScope(scope,FALSE);
cd=getClass(scope);
if (cd && scope+"::"==rname.left(scope.length()+2)) // found A::f inside A
{
// strip scope from name
rname=rname.right(rname.length()-root->parent->name.length()-2);
}
bool isMember=FALSE;
int memIndex=rname.find("::");
if (memIndex!=-1)
......@@ -2154,7 +2161,7 @@ static void buildFunctionList(Entry *root)
if (root->parent &&
!root->parent->name.isEmpty() &&
(root->parent->section & Entry::COMPOUND_MASK) &&
(cd=getClass(scope)) &&
cd &&
// do some fuzzy things to exclude function pointers
(root->type.isEmpty() || root->type.find(re,0)==-1 ||
root->type.find(")(")!=-1 || root->type.find("operator")!=-1
......@@ -4379,7 +4386,7 @@ static void findMember(Entry *root,
{
Debug::print(Debug::FindMembers,0,
"1. funcName=`%s'\n",funcName.data());
if (funcName.left(9)=="operator ")
if (funcName.left(9)=="operator ") // strip class scope from cast operator
{
funcName = substitute(funcName,className+"::","");
}
......
......@@ -38,14 +38,14 @@
//#define DBG_HTML(x) x;
#define DBG_HTML(x)
/*
changed default stylesheet, startIndexKey(), startIndexValue()
02 jan 2002, jh
*/
static const char *defaultStyleSheet =
"H1 { text-align: center; }\n"
"H1 {\n"
" text-align: center;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
"}\n"
"H2 {\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
"}\n"
"CAPTION { font-weight: bold }\n"
"A.qindex {}\n"
"A.qindexRef {}\n"
......@@ -55,15 +55,25 @@ static const char *defaultStyleSheet =
"A.codeRef { font-weight: normal; color: #4444ee }\n"
"A:hover { text-decoration: none; background-color: #f2f2ff }\n"
"DL.el { margin-left: -1cm }\n"
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.fragment {\n"
" width: 98%;\n"
" border: 1px solid #CCCCCC;\n"
" background-color: #f5f5f5;\n"
" padding: 0px;\n"
" margin: 4px;\n"
"}\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\n"
"TD.md { background-color: #f2f2ff; font-weight: bold; }\n"
"TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n"
"TD.mdname { background-color: #f2f2ff; font-weight: bold; color: #602020; width: 600px; }\n"
"DIV.groupHeader { margin-left: 16px; margin-top: 12px; margin-bottom: 6px; font-weight: bold }\n"
"DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"BODY { background: white; color: black }\n"
"EM.mdesc { font-size: smaller }\n"
"BODY {\n"
" background: white;\n"
" color: black;\n"
" margin-right: 20px;\n"
" margin-left: 20px;\n"
"}\n"
"TD.indexkey { \n"
" background-color: #eeeeff; \n"
" font-weight: bold; \n"
......@@ -91,17 +101,86 @@ static const char *defaultStyleSheet =
"TR.memlist {\n"
" background-color: #f0f0f0; \n"
"}\n"
"p.formulaDsp { text-align: center; }\n"
"img.formulaDsp { }\n"
"img.formulaInl { vertical-align: middle; }\n"
"span.keyword { color: #008000 }\n"
"span.keywordtype { color: #604020 }\n"
"span.keywordflow { color: #e08000 }\n"
"span.comment { color: #800000 }\n"
"span.preprocessor { color: #806020 }\n"
"span.stringliteral { color: #002080 }\n"
"span.charliteral { color: #008080 }\n";
"P.formulaDsp { text-align: center; }\n"
"IMG.formulaDsp { }\n"
"IMG.formulaInl { vertical-align: middle; }\n"
"SPAN.keyword { color: #008000 }\n"
"SPAN.keywordtype { color: #604020 }\n"
"SPAN.keywordflow { color: #e08000 }\n"
"SPAN.comment { color: #800000 }\n"
"SPAN.preprocessor { color: #806020 }\n"
"SPAN.stringliteral { color: #002080 }\n"
"SPAN.charliteral { color: #008080 }\n"
".mdTable {\n"
" border: 1px solid #868686;\n"
" background-color: #f2f2ff;\n"
"}\n"
".mdRow {\n"
" padding: 8px 20px;\n"
"}\n"
".mdescLeft {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" background-color: #FAFAFA;\n"
" padding-left: 8px;\n"
" border-top: 1px none #E0E0E0;\n"
" border-right: 1px none #E0E0E0;\n"
" border-bottom: 1px none #E0E0E0;\n"
" border-left: 1px none #E0E0E0;\n"
" margin: 0px;\n"
"}\n"
".mdescRight {\n"
" font-size: smaller;\n"
" font-family: Arial, Helvetica, sans-serif;\n"
" font-style: italic;\n"
" background-color: #FAFAFA;\n"
" padding-left: 4px;\n"
" border-top: 1px none #E0E0E0;\n"
" border-right: 1px none #E0E0E0;\n"
" border-bottom: 1px none #E0E0E0;\n"
" border-left: 1px none #E0E0E0;\n"
" margin: 0px;\n"
" padding-bottom: 0px;\n"
" padding-right: 8px;\n"
"}\n"
".memItemLeft {\n"
" padding: 1px 0px 0px 8px;\n"
" margin: 4px;\n"
" border-top-width: 1px;\n"
" border-right-width: 1px;\n"
" border-bottom-width: 1px;\n"
" border-left-width: 1px;\n"
" border-top-style: solid;\n"
" border-top-color: #E0E0E0;\n"
" border-right-color: #E0E0E0;\n"
" border-bottom-color: #E0E0E0;\n"
" border-left-color: #E0E0E0;\n"
" border-right-style: none;\n"
" border-bottom-style: none;\n"
" border-left-style: none;\n"
" background-color: #FAFAFA;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
" font-size: 12px;\n"
"}\n"
".memItemRight {\n"
" padding: 1px 0px 0px 8px;\n"
" margin: 4px;\n"
" border-top-width: 1px;\n"
" border-right-width: 1px;\n"
" border-bottom-width: 1px;\n"
" border-left-width: 1px;\n"
" border-top-style: solid;\n"
" border-top-color: #E0E0E0;\n"
" border-right-color: #E0E0E0;\n"
" border-bottom-color: #E0E0E0;\n"
" border-left-color: #E0E0E0;\n"
" border-right-style: none;\n"
" border-bottom-style: none;\n"
" border-left-style: none;\n"
" background-color: #FAFAFA;\n"
" font-family: Geneva, Arial, Helvetica, sans-serif;\n"
" font-size: 13px;\n"
"}\n";
static QCString g_header;
static QCString g_footer;
......@@ -117,12 +196,6 @@ HtmlGenerator::~HtmlGenerator()
//printf("HtmlGenerator::~HtmlGenerator()\n");
}
//void HtmlGenerator::append(const OutputGenerator *g)
//{
// t << g->getContents();
// col+=((HtmlGenerator *)g)->col;
//}
void HtmlGenerator::init()
{
QCString dname=Config_getString("HTML_OUTPUT");
......@@ -190,15 +263,12 @@ void HtmlGenerator::writeHeaderFile(QFile &file)
void HtmlGenerator::writeFooterFile(QFile &file)
{
QTextStream t(&file);
t << "<hr><address style=\"align: right;\"><small>\n";
t << "<hr size=\"1\"><address style=\"align: right;\"><small>\n";
t << theTranslator->trGeneratedAt( "$datetime", "$projectname" );
t << " <a href=\"http://www.doxygen.org/index.html\">\n"
<< "<img src=\"doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 width=110 height=53>\n"
<< "align=\"middle\" border=0>\n"
<< "</a> $doxygenversion";
// << " " << theTranslator->trWrittenBy()
// << " <a href=\"mailto:dimitri@stack.nl\">Dimitri van Heesch</a>,\n"
// << " &copy;&nbsp;1997-2003"
t << "</small></address>\n"
<< "</body>\n"
<< "</html>\n";
......@@ -220,6 +290,7 @@ void HtmlGenerator::startFile(const char *name,const char *,
{
HtmlHelp::getInstance()->addIndexFile(fileName);
}
QCString dispTitle = title;
QCString projName = Config_getString("PROJECT_NAME");
if (!projName.isEmpty())
......@@ -275,7 +346,7 @@ void HtmlGenerator::writeFooter(int part,bool external)
{
case 0:
if (g_footer.isEmpty())
t << "<hr><address style=\"align: right;\"><small>";
t << "<hr size=\"1\"><address style=\"align: right;\"><small>";
else
t << substituteKeywords(g_footer,convertToHtml(lastTitle));
break;
......@@ -294,8 +365,8 @@ void HtmlGenerator::writeFooter(int part,bool external)
t << "src=\"";
}
t << "doxygen.png\" alt=\"doxygen\" "
<< "align=\"middle\" border=0 " << endl <<
"width=110 height=53></a>" << versionString <<" ";
<< "align=\"middle\" border=0 > " << endl <<
"</a>" << versionString <<" ";
}
break;
default:
......@@ -523,13 +594,6 @@ void HtmlGenerator::endHtmlLink()
t << "</a>";
}
//void HtmlGenerator::writeMailLink(const char *url)
//{
// t << "<a href=\"mailto:" << url << "\">";
// docify(url);
// t << "</a>";
//}
void HtmlGenerator::startGroupHeader()
{
t << "<h2>";
......@@ -568,46 +632,6 @@ void HtmlGenerator::endSection(const char *,SectionInfo::SectionType type)
}
}
//void HtmlGenerator::writeSectionRef(const char *ref,const char *name,
// const char *anchor,const char *title)
//{
// QCString *dest;
// //printf("writeSectionRef(%s,%s,%s,%s)\n",ref,name,anchor,title);
// QCString refName=name;
// if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
// {
// refName+=Doxygen::htmlFileExtension;
// }
// t << "<a ";
// if (ref)
// {
// t << "doxygen=\"" << ref << ":";
// if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
// t << "\" ";
// }
// t << "href=\"";
// if (ref)
// {
// if ((dest=Doxygen::tagDestinationDict[ref])) t << *dest << "/";
// }
// t << refName << "#" << anchor << "\">";
// docify(title);
// t << "</a>";
//}
//
//void HtmlGenerator::writeSectionRefItem(const char *name,const char *lab,
// const char *title)
//{
// QCString refName=name;
// if (refName.right(Doxygen::htmlFileExtension.length())!=Doxygen::htmlFileExtension)
// {
// refName+=Doxygen::htmlFileExtension;
// }
// t << "<li><a href=\"" << refName << "#" << lab << "\">";
// docify(title);
// t << "</a>";
//}
//
void HtmlGenerator::docify(const char *str)
{
if (str)
......@@ -705,32 +729,6 @@ void HtmlGenerator::endClassDiagram(ClassDiagram &d,
d.writeImage(t,dir,fileName);
}
//void HtmlGenerator::startColorFont(uchar red,uchar green,uchar blue)
//{
// QCString colorString;
// colorString.sprintf("%02x%02x%02x",red,green,blue);
// t << "<font color=\"#" << colorString << "\">";
//}
//
//void HtmlGenerator::endColorFont()
//{
// t << "</font>";
//}
//void HtmlGenerator::writeFormula(const char *n,const char *text)
//{
// if (text && text[0]=='\\') t << "<p><center>" << endl;
// t << "<img align=";
//#if !defined(_WIN32)
// t << "\"top\""; // assume Unix users use Netscape 4.x which does
// // not seem to support align == "middle" :-((
//#else
// t << "\"middle\""; // assume Windows users use IE or HtmlHelp which only
// // displays formulas nicely with align == "middle"
//#endif
// t << " src=\"" << n << ".png\">" << endl;
// if (text && text[0]=='\\') t << "</center><p>" << endl;
//}
void HtmlGenerator::startMemberList()
{
......@@ -768,9 +766,9 @@ void HtmlGenerator::startMemberItem(int annoType)
t << "<tr>";
switch(annoType)
{
case 0: t << "<td nowrap align=right valign=top>"; break;
case 1: t << "<td nowrap>"; break;
default: t << "<td nowrap valign=top>"; break;
case 0: t << "<td class=\"memItemLeft\" nowrap align=right valign=top>"; break;
case 1: t << "<td class=\"memItemLeft\" nowrap>"; break;
default: t << "<td class=\"memItemLeft\" nowrap valign=top>"; break;
}
}
else
......@@ -784,7 +782,7 @@ void HtmlGenerator::endMemberItem()
//DBG_HTML(t << "<!-- endMemberItem(" << (int)inGroup << "," << fileName << "," << headerName << " -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "</td></tr>";
t << "</td></tr>\n";
}
t << endl;
}
......@@ -795,7 +793,7 @@ void HtmlGenerator::insertMemberAlign()
DBG_HTML(t << "<!-- insertMemberAlign -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "&nbsp;</td><td valign=bottom>";
t << "&nbsp;</td><td class=\"memItemRight\" valign=bottom>";
}
}
......@@ -804,11 +802,11 @@ void HtmlGenerator::startMemberDescription()
DBG_HTML(t << "<!-- startMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "<tr><td>&nbsp;</td><td><em class=\"mdesc\">";
t << "<tr><td class=\"mdescLeft\">&nbsp;</td><td class=\"mdescRight\">";
}
else
{
t << "<dl class=\"el\"><dd><em class=\"mdesc\">";
t << "<dl class=\"el\"><dd class=\"mdescRight\">";
}
}
......@@ -817,11 +815,11 @@ void HtmlGenerator::endMemberDescription()
DBG_HTML(t << "<!-- endMemberDescription -->" << endl)
if (Config_getBool("HTML_ALIGN_MEMBERS"))
{
t << "</em><br><br></td></tr>" << endl;
t << "<br><br></td></tr>" << endl;
}
else
{
t << "<br><br></em></dl>";
t << "<br><br></dl>";
}
}
......@@ -915,83 +913,13 @@ void HtmlGenerator::endIndexValue(const char *,bool)
t << "</td></tr>" << endl;
}
//void HtmlGenerator::startAlphabeticalIndexList()
//{
// t << "<table align=center width=\"95%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" << endl;
//}
//void HtmlGenerator::endAlphabeticalIndexList()
//{
// t << "</table>" << endl;
//}
//void HtmlGenerator::writeIndexHeading(const char *s)
//{
// t << "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\"><tr><td><div class=\"ah\">&nbsp;&nbsp;" << s
// << "&nbsp;&nbsp;</td></tr></table>";
//}
//void HtmlGenerator::startImage(const char *name,const char *,bool hasCaption)
//{
// QCString baseName=name;
// int i;
// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
// {
// baseName=baseName.right(baseName.length()-i-1);
// }
// t << "<div align=\"center\">" << endl;
// t << "<img src=\"" << name << "\" alt=\"" << baseName << "\">" << endl;
// if (hasCaption)
// {
// t << "<p><strong>";
// }
//}
//void HtmlGenerator::endImage(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "</strong></p>" << endl;
// }
// t << "</div>" << endl;
//}
//void HtmlGenerator::startDotFile(const char *name,bool hasCaption)
//{
// QCString baseName=name;
// int i;
// if ((i=baseName.findRev('/'))!=-1 || (i=baseName.findRev('\\'))!=-1)
// {
// baseName=baseName.right(baseName.length()-i-1);
// }
// QCString outDir = Config_getString("HTML_OUTPUT");
// writeDotGraphFromFile(name,outDir,baseName,BITMAP);
// t << "<div align=\"center\">" << endl;
// t << "<img src=\"" << baseName << "."
// << Config_getEnum("DOT_IMAGE_FORMAT") << "\" alt=\""
// << baseName << "\">" << endl;
// if (hasCaption)
// {
// t << "<p><strong>";
// }
//}
//
//void HtmlGenerator::endDotFile(bool hasCaption)
//{
// if (hasCaption)
// {
// t << "</strong></p>" << endl;
// }
// t << "</div>" << endl;
//}
//
void HtmlGenerator::startMemberDoc(const char *,const char *,const char *,const char *)
{
DBG_HTML(t << "<!-- startMemberDoc -->" << endl;)
t << "<p>" << endl;
t << "<table width=\"100%\" cellpadding=\"2\" cellspacing=\"0\" border=\"0\">" << endl;
t << "<table class=\"mdTable\" width=\"100%\" cellpadding=\"2\" cellspacing=\"0\">" << endl;
t << " <tr>" << endl;
t << " <td class=\"md\">" << endl;
t << " <td class=\"mdRow\">" << endl;
t << " <table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">" << endl;
}
......@@ -1250,19 +1178,6 @@ void HtmlGenerator::endParamList()
t << "</dl>";
}
//void HtmlGenerator::startSectionRefList()
//{
// t << "<multicol cols=3>" << endl;
// t << "<ul>" << endl;
//}
//void HtmlGenerator::endSectionRefList()
//{
// t << "</ul>" << endl;
// t << "</multicol>" << endl;
//}
void HtmlGenerator::printDoc(DocNode *n)
{
HtmlDocVisitor *visitor = new HtmlDocVisitor(t,*this);
......
......@@ -75,7 +75,7 @@ static QCString addTemplateNames(const QCString &s,const QCString &n,const QCStr
}
static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
const QCString &scopeName,MemberDef *md)
const QCString & /*scopeName*/,MemberDef *md)
{
ArgumentList *defArgList=md->isDocsForDefinition() ?
md->argumentList() : md->declArgumentList();
......@@ -96,10 +96,6 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
Argument *a=defArgList->first();
QCString cName;
//if (md->scopeDefTemplateArguments())
//{
// cName=tempArgListToString(md->scopeDefTemplateArguments());
//}
if (cd)
{
cName=cd->name();
......@@ -138,13 +134,13 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
//printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
QCString n=a->type.left(vp);
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n);
linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
}
else // non-function pointer type
{
QCString n=a->type;
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n);
linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
}
if (!md->isDefine())
{
......@@ -169,7 +165,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
if (vp!=-1) // write the part of the argument type
// that comes after the name
{
linkifyText(TextGeneratorOLImpl(ol),scopeName,
linkifyText(TextGeneratorOLImpl(ol),cd,
md->name(),a->type.right(a->type.length()-vp));
}
if (!a->defval.isEmpty()) // write the default value
......@@ -177,7 +173,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
QCString n=a->defval;
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
ol.docify(" = ");
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n);
linkifyText(TextGeneratorOLImpl(ol),cd,md->name(),n);
}
a=defArgList->next();
if (a)
......@@ -799,21 +795,21 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (getAnonymousEnumType()) // type is an anonymous enum
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.left(i),TRUE);
linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype.left(i),TRUE);
getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
//ol+=*getAnonymousEnumType()->enumDecl();
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype.right(ltype.length()-i-l),TRUE);
linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype.right(ltype.length()-i-l),TRUE);
}
else
{
ltype = ltype.left(i) + " { ... } " + ltype.right(ltype.length()-i-l);
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE);
linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype,TRUE);
}
}
}
else
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),ltype,TRUE);
linkifyText(TextGeneratorOLImpl(ol),d,name(),ltype,TRUE);
}
bool htmlOn = ol.isEnabled(OutputGenerator::Html);
if (htmlOn && Config_getBool("HTML_ALIGN_MEMBERS") && !ltype.isEmpty())
......@@ -884,7 +880,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
if (!isDefine()) ol.writeString(" ");
//ol.docify(argsString());
linkifyText(TextGeneratorOLImpl(ol),cname,name(),argsString());
linkifyText(TextGeneratorOLImpl(ol),d,name(),argsString());
}
if (excpString())
......@@ -895,7 +891,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!bitfields.isEmpty()) // add bitfields
{
linkifyText(TextGeneratorOLImpl(ol),cname,name(),bitfields.simplifyWhiteSpace());
linkifyText(TextGeneratorOLImpl(ol),d,name(),bitfields.simplifyWhiteSpace());
}
else if (hasOneLineInitializer()
//!init.isEmpty() && initLines==0 && // one line initializer
......@@ -905,12 +901,12 @@ void MemberDef::writeDeclaration(OutputList &ol,
if (!isDefine())
{
ol.writeString(" = ");
linkifyText(TextGeneratorOLImpl(ol),cname,name(),init.simplifyWhiteSpace());
linkifyText(TextGeneratorOLImpl(ol),d,name(),init.simplifyWhiteSpace());
}
else
{
ol.writeNonBreakableSpace(3);
linkifyText(TextGeneratorOLImpl(ol),cname,name(),init);
linkifyText(TextGeneratorOLImpl(ol),d,name(),init);
}
}
......@@ -1087,10 +1083,10 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
htmlHelp->addIndexItem(cname,name(),cfname,anchor());
}
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.left(i));
linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.left(i));
//ol+=*vmd->enumDecl();
vmd->writeEnumDeclaration(ol,getClassDef(),getNamespaceDef(),getFileDef(),getGroupDef());
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-i-l));
linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.right(ldef.length()-i-l));
found=TRUE;
}
......@@ -1115,7 +1111,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// last ei characters of ldef contain pointer/reference specifiers
int ni=ldef.find("::",si);
if (ni>=ei) ei=ni+2;
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef.right(ldef.length()-ei));
linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef.right(ldef.length()-ei));
}
}
else // not an enum value
......@@ -1177,25 +1173,25 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
ol.startMemberDocName();
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),ldef);
linkifyText(TextGeneratorOLImpl(ol),container,name(),ldef);
writeDefArgumentList(ol,cd,scopeName,this);
if (hasOneLineInitializer()) // add initializer
{
if (!isDefine())
{
ol.docify(" = ");
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),init.simplifyWhiteSpace());
linkifyText(TextGeneratorOLImpl(ol),container,name(),init.simplifyWhiteSpace());
}
else
{
ol.writeNonBreakableSpace(3);
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),init);
linkifyText(TextGeneratorOLImpl(ol),container,name(),init);
}
}
if (excpString()) // add exception list
{
ol.docify(" ");
linkifyText(TextGeneratorOLImpl(ol),scopeName,name(),excpString());
linkifyText(TextGeneratorOLImpl(ol),container,name(),excpString());
}
}
......@@ -1808,10 +1804,17 @@ void MemberDef::addListReference(Definition *d)
{
Definition *pd=getOuterScope();
if (pd && pd!=Doxygen::globalScope)
{
if (Config_getBool("OPTIMIZE_OUTPUT_JAVA"))
{
memName.prepend(pd->name()+".");
}
else
{
memName.prepend(pd->name()+"::");
}
}
}
//printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId());
addRefItem(xrefListItems(),memLabel,
d->getOutputFileBase()+"#"+anchor(),memName,argsString());
......
......@@ -1659,7 +1659,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
<SkipCComment>"/*" {
outputChar('/');outputChar('*');
g_commentCount++;
//g_commentCount++;
}
<SkipCComment>[^*\n\/]+ {
outputArray(yytext,yyleng);
......
......@@ -1731,6 +1731,7 @@ PHPKW ("require"|"require_once"|"include"|"include_once"|"echo")[^a-zA-Z0-9_;]
<CopyCurly>[^"'{}\/\n]+ {
*pCopyCurlyString+=yytext;
}
<CopyCurly>"/" { *pCopyCurlyString+=yytext; }
<CopyCurly>\n {
yyLineNr++;
*pCopyCurlyString+=*yytext;
......
......@@ -49,11 +49,14 @@
//
// 2003/02/26
// - Added strings for 1.2.18
//
// 2003/04/29
// - Added strings for 1.3.0
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
class TranslatorCroatian : public TranslatorAdapter_1_3
class TranslatorCroatian : public Translator
{
private:
/*! to avoid macro redefinition from translator_cz.h */
......@@ -887,12 +890,12 @@ class TranslatorCroatian : public TranslatorAdapter_1_3
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return decode("Greka");
return decode("Greka");
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
return decode("Popis greaka");
return decode("Popis greaka");
}
//////////////////////////////////////////////////////////////////////////
......@@ -1089,6 +1092,45 @@ class TranslatorCroatian : public TranslatorAdapter_1_3
{
return decode("Dokumentacija dogaaja");
}
//////////////////////////////////////////////////////////////////////////
// new since 1.3
//////////////////////////////////////////////////////////////////////////
/*! Used as a heading for a list of Java class types with package scope.
*/
virtual QCString trPackageTypes()
{
return "Tipovi u paketu";
}
/*! Used as a heading for a list of Java class functions with package
* scope.
*/
virtual QCString trPackageMembers()
{
return "Funkcije u paketu";
}
/*! Used as a heading for a list of static Java class functions with
* package scope.
*/
virtual QCString trStaticPackageMembers()
{
return decode("Statike funkcije u paketu");
}
/*! Used as a heading for a list of Java class variables with package
* scope.
*/
virtual QCString trPackageAttribs()
{
return "Atributi u paketu";
}
/*! Used as a heading for a list of static Java class variables with
* package scope.
*/
virtual QCString trStaticPackageAttribs()
{
return decode("Statiki atributi u paketu");
}
};
#endif
......@@ -416,10 +416,6 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
{
resName=qualifiedName.right(qualifiedName.length()-scopeIndex-2);
}
else
{
resName=qualifiedName;
}
MemberDef *md=0;
while (mContext && md==0)
{
......@@ -445,6 +441,7 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
ps=is+l;
}
}
//printf("resScope=%s\n",resScope?resScope->name().data():"<none>");
// step 2: get the member
if (resScope) // no scope or scope found in the current context
......@@ -471,13 +468,18 @@ QCString resolveTypeDef(Definition *context,const QCString &qualifiedName,
// tmd->name().data(), resScope->name().data(),
// tmd->getOuterScope()->name().data(), mContext);
if (tmd->isTypedef() /*&& tmd->getOuterScope()==resScope*/)
/*! TODO: look if resScope is visible within tmd->getOuterScope() */
{
// look if resScope is visible within tmd->getOuterScope()
Definition *d = tmd->getOuterScope();
while (d && d!=resScope) d=d->getOuterScope();
if (d)
{
md=tmd;
}
}
}
}
}
mContext=mContext->getOuterScope();
}
......@@ -544,13 +546,13 @@ ClassDef *getResolvedClass(
QCString name = n;
if (scope==0) scope=Doxygen::globalScope;
if (name.isEmpty()) return 0;
//int index = name.findRev("::");
ClassDef *cd=0;
//printf("===================\n");
do
{
Definition *typedefScope = 0;
//printf("-----------------------------------------------------\n");
QCString subst = resolveTypeDef(scope,name,&typedefScope);
//printf("trying getResolvedClass(%s,%s) => subst=%s\n",
// scope ? scope->name().data() : "<none>", name.data(),subst.data());
......@@ -753,11 +755,12 @@ bool leftScopeMatch(const QCString &scope, const QCString &name)
}
void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *name,const char *text,bool autoBreak,bool external)
void linkifyText(const TextGeneratorIntf &out,Definition *scope,const char * /*name*/,const char *text,bool autoBreak,bool external)
{
//printf("scope=`%s' name=`%s' Text: `%s'\n",scName,name,text);
static QRegExp regExp("[a-z_A-Z][a-z_A-Z0-9:]*");
QCString txtStr=text;
QCString scopeName;
int strLen = txtStr.length();
//printf("linkifyText strtxt=%s strlen=%d\n",txtStr.data(),strLen);
int matchLen;
......@@ -803,39 +806,38 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
NamespaceDef *nd=0;
GroupDef *gd=0;
QCString scopeName=scName;
QCString searchName=name;
//printf("word=`%s' scopeName=`%s' searchName=`%s'\n",
// word.data(),scopeName.data(),searchName.data()
//QCString searchName=name;
//printf("word=`%s' scope=`%s'\n",
// word.data(),scope ? scope->name().data() : "<none>"
// );
Definition *curScope = scope;
// check if `word' is a documented class name
if (//!word.isEmpty() &&
//!(isdigit(word.at(0)) || word.at(0)=='-') &&
// // do not try to link digits
// // (saves a lot of time for large arrays)
!rightScopeMatch(word,searchName) &&
!rightScopeMatch(scopeName,word)
if (
1
/* !rightScopeMatch(word,searchName) &&
!rightScopeMatch(scopeName,word) */
)
{
//printf("Searching...\n");
int scopeOffset=scopeName.length();
//int scopeOffset=scopeName.length();
bool found=FALSE;
do // for each scope (starting with full scope and going to empty scope)
{
QCString fullName = word;
QCString prefix;
replaceNamespaceAliases(fullName,fullName.length());
if (scopeOffset>0)
//if (scopeOffset>0)
if (curScope)
{
prefix = scopeName.left(scopeOffset);
replaceNamespaceAliases(prefix,scopeOffset);
//prefix = scopeName.left(scopeOffset);
prefix = curScope->name();
replaceNamespaceAliases(prefix,prefix.length());
fullName.prepend(prefix+"::");
}
//printf("Trying class %s\n",fullName.data());
bool isTypeDef=FALSE;
if ((cd=getResolvedClass(Doxygen::globalScope,fullName,&isTypeDef)))
if ((cd=getResolvedClass(scope,fullName,&isTypeDef)))
{
// add link to the result
if (external ? cd->isLinkable() : cd->isLinkableInProject())
......@@ -850,20 +852,30 @@ void linkifyText(const TextGeneratorIntf &out,const char *scName,const char *nam
goto endloop;
}
if (scopeOffset==0)
{
scopeOffset=-1;
}
else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
{
scopeOffset=0;
}
} while (!found && scopeOffset>=0);
//if (scopeOffset==0)
//{
// scopeOffset=-1;
//}
//else if ((scopeOffset=scopeName.findRev("::",scopeOffset-1))==-1)
//{
// scopeOffset=0;
//}
if (curScope) curScope = curScope->getOuterScope();
} //while (!found && scopeOffset>=0);
while (!found && curScope);
endloop:
if (scope &&
(scope->definitionType()==Definition::TypeClass ||
scope->definitionType()==Definition::TypeNamespace
)
)
{
scopeName=scope->name();
}
//if (!found) printf("Trying to link %s in %s\n",word.data(),scName);
if (!found &&
getDefs(scName,word,0,md,cd,fd,nd,gd) &&
getDefs(scopeName,word,0,md,cd,fd,nd,gd) &&
(md->isTypedef() || md->isEnumerate() ||
md->isReference() || md->isVariable()
) &&
......@@ -2265,7 +2277,7 @@ bool getDefs(const QCString &scName,const QCString &memberName,
{
fd=md->getFileDef();
gd=md->getGroupDef();
//printf("md->name()=`%s' md->args=`%s' fd=%p gd=%p\n",
//printf(" md->name()=`%s' md->args=`%s' fd=%p gd=%p\n",
// md->name().data(),args,fd,gd);
if (
(gd && gd->isLinkable()) || (fd && fd->isLinkable())
......@@ -3416,14 +3428,14 @@ QCString substituteTemplateArgumentsInString(
if (formArg->name==n && actArg && !actArg->type.isEmpty()) // base class is a template argument
{
// replace formal argument with the actual argument of the instance
result += actArg->type;
result += actArg->type+" ";
found=TRUE;
}
else if (formArg->name==n && actArg==0 && !formArg->defval.isEmpty() &&
formArg->defval!=name /* to prevent recursion */
)
{
result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs);
result += substituteTemplateArgumentsInString(formArg->defval,formalArgs,actualArgs)+" ";
found=TRUE;
}
}
......
......@@ -76,7 +76,7 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
//--------------------------------------------------------------------
void linkifyText(const TextGeneratorIntf &ol,const char *clName,const char *name,
void linkifyText(const TextGeneratorIntf &ol,Definition *scope,const char *name,
const char *text,bool autoBreak=FALSE,bool external=TRUE);
void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1);
QCString fileToString(const char *name,bool filter=FALSE);
......
......@@ -320,7 +320,7 @@ class XMLCodeGenerator : public BaseCodeDocInterface
};
static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char *name,int indent)
static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,Definition *scope,int indent)
{
QCString indentStr;
indentStr.fill(' ',indent);
......@@ -335,7 +335,7 @@ static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char
if (!a->type.isEmpty())
{
t << indentStr << " <type>";
linkifyText(TextGeneratorXMLImpl(t),name,0,a->type);
linkifyText(TextGeneratorXMLImpl(t),scope,0,a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
......@@ -346,7 +346,7 @@ static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char
if (!a->defval.isEmpty())
{
t << indentStr << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),name,0,a->defval);
linkifyText(TextGeneratorXMLImpl(t),scope,0,a->defval);
t << "</defval>" << endl;
}
t << indentStr << " </param>" << endl;
......@@ -357,17 +357,15 @@ static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char
static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
{
ClassDef *cd = md->getClassDef();
const char *cname = cd ? cd->name().data() : 0;
if (md->templateArguments()) // function template prefix
{
writeTemplateArgumentList(md->templateArguments(),t,cname,8);
writeTemplateArgumentList(md->templateArguments(),t,md->getClassDef(),8);
}
}
static void writeTemplateList(ClassDef *cd,QTextStream &t)
{
writeTemplateArgumentList(cd->templateArguments(),t,cd->name(),4);
writeTemplateArgumentList(cd->templateArguments(),t,cd,4);
}
static void writeXMLDocBlock(QTextStream &t,
......@@ -556,7 +554,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
}
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
linkifyText(TextGeneratorXMLImpl(t),def,md->name(),typeStr);
t << "</type>" << endl;
t << " <definition>" << convertToXML(md->definition()) << "</definition>" << endl;
t << " <argsstring>" << convertToXML(md->argsString()) << "</argsstring>" << endl;
......@@ -604,7 +602,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!a->type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->type);
linkifyText(TextGeneratorXMLImpl(t),def,md->name(),a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
......@@ -628,7 +626,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!a->defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),a->defval);
linkifyText(TextGeneratorXMLImpl(t),def,md->name(),a->defval);
t << "</defval>" << endl;
}
if (defArg && defArg->hasDocumentation())
......@@ -656,14 +654,14 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
if (!md->initializer().isEmpty())
{
t << " <initializer>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),md->initializer());
linkifyText(TextGeneratorXMLImpl(t),def,md->name(),md->initializer());
t << "</initializer>" << endl;
}
if (md->excpString())
{
t << " <exceptions>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),md->excpString());
linkifyText(TextGeneratorXMLImpl(t),def,md->name(),md->excpString());
t << "</exceptions>" << endl;
}
......@@ -983,7 +981,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,cd->docFile(),cd->docLine(),cd->name(),0,cd->documentation());
t << " </detaileddescription>" << endl;
DotClassGraph inheritanceGraph(cd,DotClassGraph::Inheritance,
DotClassGraph inheritanceGraph(cd,DotNode::Inheritance,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!inheritanceGraph.isTrivial())
{
......@@ -991,7 +989,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
inheritanceGraph.writeXML(t);
t << " </inheritancegraph>" << endl;
}
DotClassGraph collaborationGraph(cd,DotClassGraph::Implementation,
DotClassGraph collaborationGraph(cd,DotNode::Collaboration,
Config_getInt("MAX_DOT_GRAPH_DEPTH"));
if (!collaborationGraph.isTrivial())
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment