summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-11-18 14:52:40 (GMT)
committerdimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7>2001-11-18 14:52:40 (GMT)
commitc736b03f16a88b6654ff9c1ae680e46b86e50218 (patch)
tree066b0bffed86445dbe3d494eaf31515f5b743e8c
parentfba77445463c412e6b514174df590fdce58838cf (diff)
downloadDoxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.zip
Doxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.tar.gz
Doxygen-c736b03f16a88b6654ff9c1ae680e46b86e50218.tar.bz2
Release-1.2.12
-rw-r--r--INSTALL4
-rw-r--r--README4
-rw-r--r--VERSION2
-rw-r--r--addon/xmlparse/compoundhandler.cpp10
-rw-r--r--addon/xmlparse/compoundhandler.h24
-rw-r--r--addon/xmlparse/dochandler.cpp186
-rw-r--r--addon/xmlparse/dochandler.h102
-rw-r--r--addon/xmlparse/doxmlintf.h14
-rw-r--r--addon/xmlparse/mainhandler.cpp49
-rw-r--r--addon/xmlparse/mainhandler.h24
-rw-r--r--addon/xmlparse/memberhandler.cpp34
-rw-r--r--addon/xmlparse/memberhandler.h13
-rw-r--r--addon/xmlparse/sectionhandler.cpp12
-rw-r--r--addon/xmlparse/sectionhandler.h4
-rw-r--r--packages/rpm/doxygen.spec2
-rw-r--r--src/classdef.cpp1
-rw-r--r--src/code.l51
-rw-r--r--src/config.l28
-rw-r--r--src/definition.cpp2
-rw-r--r--src/definition.h6
-rw-r--r--src/doc.l6
-rw-r--r--src/dot.cpp2
-rw-r--r--src/doxygen.cpp5
-rw-r--r--src/htmlgen.cpp20
-rw-r--r--src/htmlgen.h3
-rw-r--r--src/latexgen.h3
-rw-r--r--src/mangen.h3
-rw-r--r--src/outputgen.h4
-rw-r--r--src/outputlist.cpp1
-rw-r--r--src/outputlist.h12
-rw-r--r--src/rtfgen.h3
-rw-r--r--src/scanner.l20
-rw-r--r--src/translator_hr.h72
-rw-r--r--src/xmlgen.cpp144
34 files changed, 678 insertions, 192 deletions
diff --git a/INSTALL b/INSTALL
index 34cab88..cb5c405 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,6 +1,6 @@
-DOXYGEN Version 1.2.11-20011111
+DOXYGEN Version 1.2.12
Please read the installation section of the manual for instructions.
--------
-Dimitri van Heesch (11 November 2001)
+Dimitri van Heesch (18 November 2001)
diff --git a/README b/README
index 6daabac..eed4d06 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-DOXYGEN Version 1.2.11_20011111
+DOXYGEN Version 1.2.12
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) (11 November 2001)
+Dimitri van Heesch (dimitri@stack.nl) (18 November 2001)
diff --git a/VERSION b/VERSION
index e21db4c..f2ae0b4 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-1.2.11-20011111
+1.2.12
diff --git a/addon/xmlparse/compoundhandler.cpp b/addon/xmlparse/compoundhandler.cpp
index 0b22ef2..0b420bf 100644
--- a/addon/xmlparse/compoundhandler.cpp
+++ b/addon/xmlparse/compoundhandler.cpp
@@ -136,3 +136,13 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
m_subClasses.append(sc);
}
+void CompoundHandler::initialize(MainHandler *m)
+{
+ QListIterator<ISection> msi(m_sections);
+ SectionHandler *sec;
+ for (;(sec=(SectionHandler *)msi.current());++msi)
+ {
+ sec->initialize(m);
+ }
+}
+
diff --git a/addon/xmlparse/compoundhandler.h b/addon/xmlparse/compoundhandler.h
index 5191a2f..51508aa 100644
--- a/addon/xmlparse/compoundhandler.h
+++ b/addon/xmlparse/compoundhandler.h
@@ -23,6 +23,7 @@
#include "sectionhandler.h"
#include "doxmlintf.h"
+class MainHandler;
class DocHandler;
class ProgramListingHandler;
@@ -48,6 +49,7 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
QString id() const { return m_id; }
QString kind() const { return m_kind; }
QListIterator<ISection> getSectionIterator() const { return m_sections; }
+ void initialize(MainHandler *m);
private:
struct SuperClass
@@ -68,18 +70,18 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
QString m_protection;
QString m_virtualness;
};
- QList<SuperClass> m_superClasses;
- QList<SubClass> m_subClasses;
- QList<ISection> m_sections;
- IBaseHandler *m_parent;
- DocHandler *m_brief;
- DocHandler *m_detailed;
+ QList<SuperClass> m_superClasses;
+ QList<SubClass> m_subClasses;
+ QList<ISection> m_sections;
+ IBaseHandler *m_parent;
+ DocHandler *m_brief;
+ DocHandler *m_detailed;
ProgramListingHandler *m_programListing;
- QString m_id;
- QString m_kind;
- QString m_name;
- QString m_defFile;
- int m_defLine;
+ QString m_id;
+ QString m_kind;
+ QString m_name;
+ QString m_defFile;
+ int m_defLine;
};
#endif
diff --git a/addon/xmlparse/dochandler.cpp b/addon/xmlparse/dochandler.cpp
index 5dff81a..80df132 100644
--- a/addon/xmlparse/dochandler.cpp
+++ b/addon/xmlparse/dochandler.cpp
@@ -745,55 +745,6 @@ void VariableListHandler::startListItem(const QXmlAttributes& attrib)
}
//----------------------------------------------------------------------
-// AnchorHandler
-//----------------------------------------------------------------------
-
-AnchorHandler::AnchorHandler(IBaseHandler *parent)
- : DocNode(Anchor), m_parent(parent)
-{
- m_children.setAutoDelete(TRUE);
- addEndHandler("anchor",this,&AnchorHandler::endAnchor);
- addStartHandler("ref",this,&AnchorHandler::startRef);
-}
-
-AnchorHandler::~AnchorHandler()
-{
-}
-
-void AnchorHandler::startAnchor(const QXmlAttributes& attrib)
-{
- m_id = attrib.value("id");
- m_curString="";
- m_parent->setDelegate(this);
-}
-
-void AnchorHandler::endAnchor()
-{
- addTextNode();
- printf("anchor id=`%s'\n",m_id.data());
- m_parent->setDelegate(0);
-}
-
-void AnchorHandler::startRef(const QXmlAttributes& attrib)
-{
- addTextNode();
- RefHandler *rh = new RefHandler(this);
- m_children.append(rh);
- rh->startRef(attrib);
-}
-
-void AnchorHandler::addTextNode()
-{
- if (!m_curString.isEmpty())
- {
- m_children.append(new TextNode(m_curString,DocNode::Normal));
- printf("addTextNode() text=\"%s\"\n",
- m_curString.data());
- m_curString="";
- }
-}
-
-//----------------------------------------------------------------------
// HighlightHandler
//----------------------------------------------------------------------
@@ -833,7 +784,7 @@ CodeLineHandler::CodeLineHandler(IBaseHandler *parent)
addEndHandler("linenumber",this,&CodeLineHandler::endLineNumber);
addStartHandler("highlight",this,&CodeLineHandler::startHighlight);
addStartHandler("ref",this,&CodeLineHandler::startRef);
- addStartHandler("anchor",this,&CodeLineHandler::startAnchor);
+ m_lineNumber = 0;
}
CodeLineHandler::~CodeLineHandler()
@@ -853,16 +804,16 @@ void CodeLineHandler::endCodeLine()
m_parent->setDelegate(0);
}
-void CodeLineHandler::startLineNumber(const QXmlAttributes& /*attrib*/)
+void CodeLineHandler::startLineNumber(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
printf("start linenumber\n");
+ m_lineNumber = attrib.value("line").toInt();
+ m_refId = attrib.value("refid");
}
void CodeLineHandler::endLineNumber()
{
- addTextNode();
- printf("end linenumber\n");
m_parent->setDelegate(0);
}
@@ -874,14 +825,6 @@ void CodeLineHandler::startHighlight(const QXmlAttributes& attrib)
hlh->startHighlight(attrib);
}
-void CodeLineHandler::startAnchor(const QXmlAttributes& attrib)
-{
- addTextNode();
- AnchorHandler *ah = new AnchorHandler(this);
- m_children.append(ah);
- ah->startAnchor(attrib);
-}
-
void CodeLineHandler::startRef(const QXmlAttributes& attrib)
{
addTextNode();
@@ -1092,6 +1035,106 @@ void IndexEntryHandler::endSecondaryIE()
m_secondary = m_curString;
}
+//----------------------------------------------------------------------
+// EntryHandler
+//----------------------------------------------------------------------
+
+EntryHandler::EntryHandler(IBaseHandler *parent)
+ : DocNode(Entry), m_parent(parent)
+{
+ m_children.setAutoDelete(TRUE);
+ addEndHandler("entry",this,&EntryHandler::endEntry);
+ addStartHandler("para",this,&EntryHandler::startParagraph);
+}
+
+EntryHandler::~EntryHandler()
+{
+}
+
+void EntryHandler::startEntry(const QXmlAttributes&)
+{
+ m_parent->setDelegate(this);
+}
+
+void EntryHandler::endEntry()
+{
+ m_parent->setDelegate(0);
+}
+
+void EntryHandler::startParagraph(const QXmlAttributes& attrib)
+{
+ ParagraphHandler *ph = new ParagraphHandler(this);
+ ph->startParagraph(attrib);
+ m_children.append(ph);
+}
+
+//----------------------------------------------------------------------
+// RowHandler
+//----------------------------------------------------------------------
+
+RowHandler::RowHandler(IBaseHandler *parent)
+ : DocNode(Row), m_parent(parent)
+{
+ m_children.setAutoDelete(TRUE);
+ addEndHandler("row",this,&RowHandler::endRow);
+ addStartHandler("entry",this,&RowHandler::startEntry);
+}
+
+RowHandler::~RowHandler()
+{
+}
+
+void RowHandler::startRow(const QXmlAttributes&)
+{
+ m_parent->setDelegate(this);
+}
+
+void RowHandler::endRow()
+{
+ m_parent->setDelegate(0);
+}
+
+void RowHandler::startEntry(const QXmlAttributes& attrib)
+{
+ EntryHandler *eh = new EntryHandler(this);
+ eh->startEntry(attrib);
+ m_children.append(eh);
+}
+
+//----------------------------------------------------------------------
+// TableHandler
+//----------------------------------------------------------------------
+
+TableHandler::TableHandler(IBaseHandler *parent)
+ : DocNode(Table), m_parent(parent)
+{
+ m_children.setAutoDelete(TRUE);
+ addEndHandler("table",this,&TableHandler::endTable);
+ addStartHandler("row",this,&TableHandler::startRow);
+}
+
+TableHandler::~TableHandler()
+{
+}
+
+void TableHandler::startTable(const QXmlAttributes& attrib)
+{
+ m_parent->setDelegate(this);
+ m_numColumns = attrib.value("cols").toInt();
+ printf("table cols=%d\n",m_numColumns);
+}
+
+void TableHandler::endTable()
+{
+ m_parent->setDelegate(0);
+}
+
+void TableHandler::startRow(const QXmlAttributes& attrib)
+{
+ RowHandler *rh = new RowHandler(this);
+ rh->startRow(attrib);
+ m_children.append(rh);
+}
//----------------------------------------------------------------------
// ParagraphHandler
@@ -1123,6 +1166,7 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("image",this,&ParagraphHandler::startImage);
addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
+ addStartHandler("table",this,&ParagraphHandler::startTable);
}
ParagraphHandler::~ParagraphHandler()
@@ -1177,6 +1221,7 @@ void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib)
void ParagraphHandler::startRef(const QXmlAttributes& attrib)
{
+ addTextNode();
RefHandler *ref = new RefHandler(this);
ref->startRef(attrib);
m_children.append(ref);
@@ -1184,6 +1229,7 @@ void ParagraphHandler::startRef(const QXmlAttributes& attrib)
void ParagraphHandler::startVariableList(const QXmlAttributes& attrib)
{
+ addTextNode();
VariableListHandler *vl = new VariableListHandler(this);
vl->startVariableList(attrib);
m_children.append(vl);
@@ -1191,6 +1237,7 @@ void ParagraphHandler::startVariableList(const QXmlAttributes& attrib)
void ParagraphHandler::startHRuler(const QXmlAttributes& attrib)
{
+ addTextNode();
HRulerHandler *hr = new HRulerHandler(this);
hr->startHRuler(attrib);
m_children.append(hr);
@@ -1198,6 +1245,7 @@ void ParagraphHandler::startHRuler(const QXmlAttributes& attrib)
void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib)
{
+ addTextNode();
LineBreakHandler *lb = new LineBreakHandler(this);
lb->startLineBreak(attrib);
m_children.append(lb);
@@ -1205,6 +1253,7 @@ void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib)
void ParagraphHandler::startULink(const QXmlAttributes& attrib)
{
+ addTextNode();
ULinkHandler *uh = new ULinkHandler(this);
uh->startULink(attrib);
m_children.append(uh);
@@ -1212,6 +1261,7 @@ void ParagraphHandler::startULink(const QXmlAttributes& attrib)
void ParagraphHandler::startEMail(const QXmlAttributes& attrib)
{
+ addTextNode();
EMailHandler *eh = new EMailHandler(this);
eh->startEMail(attrib);
m_children.append(eh);
@@ -1219,6 +1269,7 @@ void ParagraphHandler::startEMail(const QXmlAttributes& attrib)
void ParagraphHandler::startLink(const QXmlAttributes& attrib)
{
+ addTextNode();
LinkHandler *lh = new LinkHandler(this);
lh->startLink(attrib);
m_children.append(lh);
@@ -1226,6 +1277,7 @@ void ParagraphHandler::startLink(const QXmlAttributes& attrib)
void ParagraphHandler::startProgramListing(const QXmlAttributes& attrib)
{
+ addTextNode();
ProgramListingHandler *pl = new ProgramListingHandler(this);
pl->startProgramListing(attrib);
m_children.append(pl);
@@ -1233,6 +1285,7 @@ void ParagraphHandler::startProgramListing(const QXmlAttributes& attrib)
void ParagraphHandler::startFormula(const QXmlAttributes& attrib)
{
+ addTextNode();
FormulaHandler *fh = new FormulaHandler(this);
fh->startFormula(attrib);
m_children.append(fh);
@@ -1240,6 +1293,7 @@ void ParagraphHandler::startFormula(const QXmlAttributes& attrib)
void ParagraphHandler::startImage(const QXmlAttributes& attrib)
{
+ addTextNode();
ImageHandler *ih = new ImageHandler(this);
ih->startImage(attrib);
m_children.append(ih);
@@ -1247,6 +1301,7 @@ void ParagraphHandler::startImage(const QXmlAttributes& attrib)
void ParagraphHandler::startDotFile(const QXmlAttributes& attrib)
{
+ addTextNode();
DotFileHandler *df = new DotFileHandler(this);
df->startDotFile(attrib);
m_children.append(df);
@@ -1254,11 +1309,20 @@ void ParagraphHandler::startDotFile(const QXmlAttributes& attrib)
void ParagraphHandler::startIndexEntry(const QXmlAttributes& attrib)
{
+ addTextNode();
IndexEntryHandler *df = new IndexEntryHandler(this);
df->startIndexEntry(attrib);
m_children.append(df);
}
+void ParagraphHandler::startTable(const QXmlAttributes& attrib)
+{
+ addTextNode();
+ TableHandler *th = new TableHandler(this);
+ th->startTable(attrib);
+ m_children.append(th);
+}
+
void ParagraphHandler::addTextNode()
{
if (!m_curString.isEmpty())
diff --git a/addon/xmlparse/dochandler.h b/addon/xmlparse/dochandler.h
index a5b7b8c..1c599ca 100644
--- a/addon/xmlparse/dochandler.h
+++ b/addon/xmlparse/dochandler.h
@@ -70,7 +70,10 @@ class DocNode
Formula,
Image,
DotFile,
- IndexEntry
+ IndexEntry,
+ Table,
+ Row,
+ Entry
};
DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {}
@@ -412,6 +415,9 @@ class SimpleSectHandler : public DocNode,
//-----------------------------------------------------------------------------
+/* \brief Node representing an named item of a VariableList.
+ *
+ */
class VariableListEntryHandler : public DocNode, public BaseHandler<VariableListEntryHandler>
{
public:
@@ -457,28 +463,6 @@ class VariableListHandler : public DocNode, public BaseHandler<VariableListHandl
//-----------------------------------------------------------------------------
-/*! \brief Node representing a text anchor
- *
- */
-// children: ref
-class AnchorHandler : public DocNode, public BaseHandler<AnchorHandler>
-{
- public:
- AnchorHandler(IBaseHandler *parent);
- virtual ~AnchorHandler();
- void startAnchor(const QXmlAttributes& attrib);
- void endAnchor();
- void startRef(const QXmlAttributes& attrib);
-
- private:
- void addTextNode();
- IBaseHandler *m_parent;
- QList<DocNode> m_children;
- QString m_id;
-};
-
-//-----------------------------------------------------------------------------
-
/*! \brief Node representing a highlighted text fragment.
*
*/
@@ -512,7 +496,6 @@ class CodeLineHandler : public DocNode, public BaseHandler<CodeLineHandler>
virtual void startLineNumber(const QXmlAttributes&);
virtual void endLineNumber();
virtual void startHighlight(const QXmlAttributes&);
- virtual void startAnchor(const QXmlAttributes&);
virtual void startRef(const QXmlAttributes&);
CodeLineHandler(IBaseHandler *parent);
@@ -523,8 +506,7 @@ class CodeLineHandler : public DocNode, public BaseHandler<CodeLineHandler>
IBaseHandler *m_parent;
int m_lineNumber;
- QString m_anchor;
- QString m_ref;
+ QString m_refId;
QList<DocNode> m_children;
};
@@ -636,18 +618,79 @@ class IndexEntryHandler : public DocNode, public BaseHandler<IndexEntryHandler>
//-----------------------------------------------------------------------------
+/*! \brief Node representing an entry in the table entry.
+ *
+ */
+// children: para
+class EntryHandler : public DocNode, public BaseHandler<EntryHandler>
+{
+ public:
+ EntryHandler(IBaseHandler *parent);
+ virtual ~EntryHandler();
+ void startEntry(const QXmlAttributes& attrib);
+ void endEntry();
+ void startParagraph(const QXmlAttributes& attrib);
+
+ private:
+ IBaseHandler *m_parent;
+ QList<DocNode> m_children;
+};
+
+//-----------------------------------------------------------------------------
+
+/*! \brief Node representing an entry in the table row.
+ *
+ */
+// children: entry
+class RowHandler : public DocNode, public BaseHandler<RowHandler>
+{
+ public:
+ RowHandler(IBaseHandler *parent);
+ virtual ~RowHandler();
+ void startRow(const QXmlAttributes& attrib);
+ void endRow();
+ void startEntry(const QXmlAttributes& attrib);
+
+ private:
+ IBaseHandler *m_parent;
+ QList<EntryHandler> m_children;
+};
+
+//-----------------------------------------------------------------------------
+
+/*! \brief Node representing an entry in the table.
+ *
+ */
+// children: row
+class TableHandler : public DocNode, public BaseHandler<TableHandler>
+{
+ public:
+ TableHandler(IBaseHandler *parent);
+ virtual ~TableHandler();
+ void startTable(const QXmlAttributes& attrib);
+ void endTable();
+ void startRow(const QXmlAttributes& attrib);
+
+ private:
+ IBaseHandler *m_parent;
+ QList<RowHandler> m_children;
+ int m_numColumns;
+};
+
+//-----------------------------------------------------------------------------
+
/*! \brief Node representing a paragraph of text and commands.
*
*/
// children: itemizedlist, orderedlist, parameterlist, simplesect, ref,
// variablelist, hruler, linebreak, ulink, email, link
-// programlisting, formula, image, dotfile, indexentry
+// programlisting, formula, image, dotfile, indexentry,
+// table
//
// children handled by MarkupHandler:
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
-// TODO:
-// table
+//
class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
{
public:
@@ -669,6 +712,7 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
virtual void startImage(const QXmlAttributes& attrib);
virtual void startDotFile(const QXmlAttributes& attrib);
virtual void startIndexEntry(const QXmlAttributes& attrib);
+ virtual void startTable(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler();
diff --git a/addon/xmlparse/doxmlintf.h b/addon/xmlparse/doxmlintf.h
index 50acb79..cfff948 100644
--- a/addon/xmlparse/doxmlintf.h
+++ b/addon/xmlparse/doxmlintf.h
@@ -51,6 +51,20 @@ class IDoxygen
* of compounds found in the project.
*/
virtual QListIterator<ICompound> getCompoundIterator() const = 0;
+
+ /*! Returns a compound given its unique \a id. If you have a
+ * compound id this function is much more efficient than iterating
+ * over the compound list. Returns 0 if the id is not valid.
+ */
+ virtual ICompound *getCompoundById(const QString &id) const = 0;
+
+ /*! Returns a compound given its name (including the scope).
+ * Returns 0 if the name is not found in the project.
+ */
+ virtual ICompound *getCompoundByName(const QString &name) const = 0;
+
+ virtual IMember *getMemberById(const QString &id) const = 0;
+ virtual QList<IMember> *getMemberByName(const QString &name) const = 0;
};
/*! Factory method that creates an object model given an XML file generated
diff --git a/addon/xmlparse/mainhandler.cpp b/addon/xmlparse/mainhandler.cpp
index 21185e6..cb92df2 100644
--- a/addon/xmlparse/mainhandler.cpp
+++ b/addon/xmlparse/mainhandler.cpp
@@ -16,15 +16,7 @@
#include <qxml.h>
#include "mainhandler.h"
-void MainHandler::startCompound(const QXmlAttributes& attrib)
-{
- CompoundHandler *compHandler = new CompoundHandler(this);
- compHandler->startCompound(attrib);
- m_compounds.append(compHandler);
- m_compoundDict.insert(compHandler->id(),compHandler);
-}
-
-MainHandler::MainHandler() : m_compoundDict(10007)
+MainHandler::MainHandler() : m_compoundDict(10007), m_compoundNameDict(10007)
{
m_compounds.setAutoDelete(TRUE);
addStartHandler("doxygen");
@@ -38,6 +30,44 @@ MainHandler::~MainHandler()
printf("MainHandler::~MainHandler()\n");
}
+void MainHandler::startCompound(const QXmlAttributes& attrib)
+{
+ CompoundHandler *compHandler = new CompoundHandler(this);
+ compHandler->startCompound(attrib);
+ m_compounds.append(compHandler);
+}
+
+void MainHandler::insertMemberById(const QString &id,IMember *h)
+{
+ m_memberDict.insert(id,h);
+}
+
+void MainHandler::insertMemberByName(const QString &name,IMember *h)
+{
+ QList<IMember> *ml = m_memberNameDict[name];
+ if (ml)
+ {
+ ml->append(h);
+ }
+ else
+ {
+ ml = new QList<IMember>;
+ ml->append(h);
+ m_memberNameDict.insert(name,ml);
+ }
+}
+
+void MainHandler::initialize()
+{
+ QListIterator<ICompound> mci(m_compounds);
+ CompoundHandler *compHandler;
+ for (;(compHandler=(CompoundHandler *)mci.current());++mci)
+ {
+ compHandler->initialize(this);
+ m_compoundNameDict.insert(compHandler->name(),compHandler);
+ m_compoundDict.insert(compHandler->id(),compHandler);
+ }
+}
class ErrorHandler : public QXmlErrorHandler
{
@@ -74,6 +104,7 @@ IDoxygen *createObjectModelFromXML(const char * xmlFileName)
reader.setContentHandler( handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
+ handler->initialize();
return handler;
}
diff --git a/addon/xmlparse/mainhandler.h b/addon/xmlparse/mainhandler.h
index 0d69f25..c5f945f 100644
--- a/addon/xmlparse/mainhandler.h
+++ b/addon/xmlparse/mainhandler.h
@@ -28,7 +28,6 @@ class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
MainHandler();
virtual ~MainHandler();
- // IDoxygen
QListIterator<ICompound> getCompoundIterator() const
{
return m_compounds;
@@ -37,10 +36,29 @@ class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
{
return m_compoundDict[id];
}
+ virtual ICompound *getCompoundByName(const QString &name) const
+ {
+ return name.isEmpty() ? 0 : m_compoundNameDict[name];
+ }
+ virtual IMember *getMemberById(const QString &id) const
+ {
+ return m_memberDict[id];
+ }
+ virtual QList<IMember> *getMemberByName(const QString &name) const
+ {
+ return m_memberNameDict[name];
+ }
+ void insertMemberById(const QString &id,IMember *h);
+ void insertMemberByName(const QString &name,IMember *h);
+
+ void initialize();
private:
- QList<ICompound> m_compounds;
- QDict<ICompound> m_compoundDict;
+ QList<ICompound> m_compounds;
+ QDict<ICompound> m_compoundDict;
+ QDict<ICompound> m_compoundNameDict;
+ QDict<IMember> m_memberDict;
+ QDict<QList<IMember> > m_memberNameDict;
};
#endif
diff --git a/addon/xmlparse/memberhandler.cpp b/addon/xmlparse/memberhandler.cpp
index cf29e05..54dd0f0 100644
--- a/addon/xmlparse/memberhandler.cpp
+++ b/addon/xmlparse/memberhandler.cpp
@@ -37,7 +37,15 @@ MemberHandler::MemberHandler(IBaseHandler *parent)
addStartHandler("location",this,&MemberHandler::startLocation);
addEndHandler("location");
+ addStartHandler("references",this,&MemberHandler::startReferences);
+ addEndHandler("references",this,&MemberHandler::endReferences);
+
+ addStartHandler("referencedby",this,&MemberHandler::startReferencedBy);
+ addEndHandler("referencedby",this,&MemberHandler::endReferencedBy);
+
m_params.setAutoDelete(TRUE);
+ m_references.setAutoDelete(TRUE);
+ m_referencedBy.setAutoDelete(TRUE);
}
@@ -78,6 +86,32 @@ void MemberHandler::startLocation(const QXmlAttributes& attrib)
m_defLine = attrib.value("line").toInt();
}
+void MemberHandler::startReferences(const QXmlAttributes& attrib)
+{
+ MemberReference *mr = new MemberReference;
+ mr->m_memId = attrib.value("id");
+ m_references.append(mr);
+ m_curString="";
+}
+
+void MemberHandler::endReferences()
+{
+ m_references.getLast()->m_name = m_curString;
+}
+
+void MemberHandler::startReferencedBy(const QXmlAttributes& attrib)
+{
+ MemberReference *mr = new MemberReference;
+ mr->m_memId = attrib.value("id");
+ m_referencedBy.append(mr);
+ m_curString="";
+}
+
+void MemberHandler::endReferencedBy()
+{
+ m_referencedBy.getLast()->m_name = m_curString;
+}
+
void MemberHandler::endMember()
{
m_parent->setDelegate(0);
diff --git a/addon/xmlparse/memberhandler.h b/addon/xmlparse/memberhandler.h
index 0b017e5..e79835f 100644
--- a/addon/xmlparse/memberhandler.h
+++ b/addon/xmlparse/memberhandler.h
@@ -37,6 +37,10 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
virtual void startLocation(const QXmlAttributes& attrib);
+ virtual void startReferences(const QXmlAttributes& attrib);
+ virtual void endReferences();
+ virtual void startReferencedBy(const QXmlAttributes& attrib);
+ virtual void endReferencedBy();
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
@@ -51,6 +55,13 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
virtual QListIterator<IParam> getParamIterator() const { return m_params; }
private:
+ struct MemberReference
+ {
+ QString m_memId;
+ QString m_name;
+ int line;
+ };
+
IBaseHandler *m_parent;
QString m_kind;
QString m_id;
@@ -61,6 +72,8 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
DocHandler *m_brief;
DocHandler *m_detailed;
QList<IParam> m_params;
+ QList<MemberReference> m_references;
+ QList<MemberReference> m_referencedBy;
QString m_defFile;
int m_defLine;
};
diff --git a/addon/xmlparse/sectionhandler.cpp b/addon/xmlparse/sectionhandler.cpp
index 80db178..0fc3446 100644
--- a/addon/xmlparse/sectionhandler.cpp
+++ b/addon/xmlparse/sectionhandler.cpp
@@ -13,6 +13,7 @@
*
*/
+#include "mainhandler.h"
#include "compoundhandler.h"
#include "sectionhandler.h"
@@ -46,4 +47,15 @@ void SectionHandler::startMember(const QXmlAttributes& attrib)
m_members.append(memHandler);
}
+void SectionHandler::initialize(MainHandler *m)
+{
+ QListIterator<IMember> mli(m_members);
+ MemberHandler *mh;
+ for (;(mh=(MemberHandler *)mli.current());++mli)
+ {
+ m->insertMemberById(mh->name(),mh);
+ m->insertMemberByName(mh->name(),mh);
+ }
+}
+
diff --git a/addon/xmlparse/sectionhandler.h b/addon/xmlparse/sectionhandler.h
index 1231214..46cb422 100644
--- a/addon/xmlparse/sectionhandler.h
+++ b/addon/xmlparse/sectionhandler.h
@@ -24,6 +24,8 @@
#include "memberhandler.h"
#include "doxmlintf.h"
+class MainHandler;
+
class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{
public:
@@ -38,6 +40,8 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
virtual QString kind() const { return m_kind; }
virtual QListIterator<IMember> getMemberIterator() const { return m_members; }
+ void initialize(MainHandler *m);
+
private:
IBaseHandler *m_parent;
QString m_kind;
diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec
index 1bd867c..e45bb1b 100644
--- a/packages/rpm/doxygen.spec
+++ b/packages/rpm/doxygen.spec
@@ -1,5 +1,5 @@
Name: doxygen
-Version: 1.2.11_20011111
+Version: 1.2.12
Summary: documentation system for C, C++ and IDL
Release: 4
Source: doxygen-%{version}.src.tar.gz
diff --git a/src/classdef.cpp b/src/classdef.cpp
index a9cf53b..4b1b949 100644
--- a/src/classdef.cpp
+++ b/src/classdef.cpp
@@ -1591,6 +1591,7 @@ bool ClassDef::isVisibleInHierarchy()
// documented or shown anyway or documentation is external
(hasDocumentation() ||
!Config_getBool("HIDE_UNDOC_CLASSES") ||
+ (m_templateMaster && m_templateMaster->hasDocumentation()) ||
isReference()
) &&
// is not part of an unnamed namespace or shown anyway
diff --git a/src/code.l b/src/code.l
index d6ae4aa..c56385a 100644
--- a/src/code.l
+++ b/src/code.l
@@ -330,12 +330,12 @@ static void startCodeLine()
//if (g_currentFontClass) { g_code->endFontClass(); }
if (g_sourceFileDef)
{
- QCString lineNumber,lineAnchor;
- lineNumber.sprintf("%05d",g_yyLineNr);
- lineAnchor.sprintf("l%05d",g_yyLineNr);
+ //QCString lineNumber,lineAnchor;
+ //lineNumber.sprintf("%05d",g_yyLineNr);
+ //lineAnchor.sprintf("l%05d",g_yyLineNr);
Definition *d = g_sourceFileDef->getSourceDefinition(g_yyLineNr);
- g_code->startLineNumber();
+ //g_code->startLineNumber();
if (!g_includeCodeFragment && d && d->isLinkableInProject())
{
g_currentDefinition = d;
@@ -347,16 +347,19 @@ static void startCodeLine()
//printf("Real scope: `%s'\n",g_realScope.data());
g_bodyCurlyCount = 0;
if (g_currentMemberDef) anchor=g_currentMemberDef->getBodyAnchor();
- g_code->startCodeAnchor(lineAnchor);
- g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(),
- anchor,lineNumber);
- g_code->endCodeAnchor();
+ //g_code->startCodeAnchor(lineAnchor);
+ //g_code->writeCodeLink(d->getReference(),d->getOutputFileBase(),
+ // anchor,lineNumber);
+ //g_code->endCodeAnchor();
+ g_code->writeLineNumber(d->getReference(),d->getOutputFileBase(),
+ anchor,g_yyLineNr);
}
else
{
- g_code->codify(lineNumber);
+ //g_code->codify(lineNumber);
+ g_code->writeLineNumber(0,0,0,g_yyLineNr);
}
- g_code->endLineNumber();
+ //g_code->endLineNumber();
}
g_code->startCodeLine();
if (g_currentFontClass)
@@ -556,12 +559,32 @@ static MemberDef *setCallContextForVar(const QCString &name)
if ((mn=Doxygen::functionNameSDict[name]))
{
//printf("global var `%s'\n",name.data());
- if (mn->count()>=1)
- // TODO: if count>1 link to static members in the same file only
+ if (mn->count()==1) // global defined only once
{
MemberDef *md=mn->getFirst();
- g_theCallContext.setClass(stripClassName(md->typeString()));
- return md;
+ if (!md->isStatic() || md->getBodyDef()==g_sourceFileDef)
+ {
+ g_theCallContext.setClass(stripClassName(md->typeString()));
+ return md;
+ }
+ return 0;
+ }
+ else if (mn->count()>1) // global defined more than once
+ {
+ MemberDef *md=mn->first();
+ while (md)
+ {
+ //printf("mn=%p md=%p md->getBodyDef()=%p g_sourceFileDef=%p\n",
+ // mn,md,
+ // md->getBodyDef(),g_sourceFileDef);
+ if (md->getBodyDef()==g_sourceFileDef)
+ {
+ g_theCallContext.setClass(stripClassName(md->typeString()));
+ return md;
+ }
+ md=mn->next();
+ }
+ return 0;
}
}
return 0;
diff --git a/src/config.l b/src/config.l
index 5094011..670be6a 100644
--- a/src/config.l
+++ b/src/config.l
@@ -994,8 +994,10 @@ void Config::check()
QStrList &inputSources=Config_getList("INPUT");
if (inputSources.count()==0)
{
- config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
- exit(1);
+ //config_err("Error: tag INPUT: no input files specified after the INPUT tag.\n");
+ //exit(1);
+ inputSources.append(QDir::currentDirPath());
+ //config_warn("Warning: no files after the INPUT tag, defaulting to the current dir\n");
}
else
{
@@ -1016,7 +1018,23 @@ void Config::check()
QStrList &filePatternList = Config_getList("FILE_PATTERNS");
if (filePatternList.isEmpty())
{
- filePatternList.append("*");
+ filePatternList.append("*.c");
+ filePatternList.append("*.cc");
+ filePatternList.append("*.cxx");
+ filePatternList.append("*.cpp");
+ filePatternList.append("*.c++");
+ filePatternList.append("*.java");
+ filePatternList.append("*.ii");
+ filePatternList.append("*.ixx");
+ filePatternList.append("*.ipp");
+ filePatternList.append("*.i++");
+ filePatternList.append("*.inl");
+ filePatternList.append("*.h");
+ filePatternList.append("*.hh");
+ filePatternList.append("*.hxx");
+ filePatternList.append("*.hpp");
+ filePatternList.append("*.h++");
+ filePatternList.append("*.idl");
}
// add default pattern if needed
@@ -1509,7 +1527,9 @@ void Config::create()
"If the value of the INPUT tag contains directories, you can use the \n"
"FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp \n"
"and *.h) to filter out the source-files in the directories. If left \n"
- "blank all files are included. \n"
+ "blank file matching one of the following patterns are included: \n"
+ "*.c *.cc *.cxx *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp \n"
+ "*.h++ *.idl \n"
);
cb = addBool(
"RECURSIVE",
diff --git a/src/definition.cpp b/src/definition.cpp
index dcd1517..56b3edf 100644
--- a/src/definition.cpp
+++ b/src/definition.cpp
@@ -334,6 +334,7 @@ void Definition::writeInlineCode(OutputList &ol,const char *scopeName)
initParseCodeContext();
//printf("Read:\n`%s'\n\n",codeFragment.data());
if (definitionType()==TypeMember) setParameterList((MemberDef *)this);
+ ol.newParagraph();
ol.startCodeFragment();
parseCode(ol,scopeName,codeFragment,FALSE,0,
m_bodyDef,actualStart,actualEnd,TRUE);
@@ -418,7 +419,6 @@ void Definition::writeSourceRefList(OutputList &ol,const char *scopeName,
}
parseText(ol,ldefLine.right(ldefLine.length()-index));
ol.writeString(".");
- ol.newParagraph();
}
ol.popGeneratorState();
}
diff --git a/src/definition.h b/src/definition.h
index 0b9d4ff..fed4c52 100644
--- a/src/definition.h
+++ b/src/definition.h
@@ -123,6 +123,9 @@ class Definition
virtual void addInnerCompound(Definition *d);
virtual void setOuterScope(Definition *d) { m_outerScope = d; }
+ MemberSDict *getReferencesMembers() const { return m_sourceRefsDict; }
+ MemberSDict *getReferencedByMembers() const { return m_sourceRefByDict; }
+
protected:
int m_startBodyLine; // line number of the start of the definition
int m_endBodyLine; // line number of the end of the definition
@@ -147,9 +150,6 @@ class Definition
QCString m_doc; // detailed description
QCString m_ref; // reference to external documentation
SectionDict *m_sectionDict; // dictionary of all sections
- //MemberList *m_sourceRefList; // list of entities that refer to this
- // // entity in their definition
- //MemberDict *m_sourceRefDict;
MemberSDict *m_sourceRefByDict;
MemberSDict *m_sourceRefsDict;
int m_testId; // id for test list item
diff --git a/src/doc.l b/src/doc.l
index ab8ab2f..539a4cc 100644
--- a/src/doc.l
+++ b/src/doc.l
@@ -406,7 +406,7 @@ static void skipLine(OutputDocInterface &od,const char *key)
found=TRUE;
od.writeString(" ");
parseCode(od,className,s,exampleDoc,exampleName);
- od.writeString("\n");
+ //od.writeString("\n");
}
else if (includeFileOffset==includeFileLength) found=TRUE;
}
@@ -451,7 +451,7 @@ static void showLine(OutputDocInterface &od,const char *key)
{
od.writeString(" ");
parseCode(od,className,s,exampleDoc,exampleName);
- od.writeString("\n");
+ //od.writeString("\n");
}
}
@@ -469,7 +469,7 @@ static void showUntil(OutputDocInterface &od,const char *key)
{
od.writeString(" ");
parseCode(od,className,s,exampleDoc,exampleName);
- od.writeString("\n");
+ //od.writeString("\n");
if (s.find(key)!=-1) found=TRUE;
}
if (includeFileOffset==includeFileLength) found=TRUE;
diff --git a/src/dot.cpp b/src/dot.cpp
index 48bf311..fae5b93 100644
--- a/src/dot.cpp
+++ b/src/dot.cpp
@@ -837,6 +837,8 @@ int DotClassGraph::m_curNodeNumber;
void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
const char *label,int distance,const char *usedName,const char *templSpec,bool base)
{
+ if (Config_getBool("HIDE_UNDOC_CLASSES") && !cd->isLinkable()) return;
+
int edgeStyle = (label || prot==EdgeInfo::Orange) ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className;
if (usedName) // name is a typedef
diff --git a/src/doxygen.cpp b/src/doxygen.cpp
index 6db5d5d..571cc41 100644
--- a/src/doxygen.cpp
+++ b/src/doxygen.cpp
@@ -1385,7 +1385,6 @@ static MemberDef *addVariableToFile(
}
}
- //printf("Adding member=%s\n",md->name().data());
// add member definition to the list of globals
if (mn)
{
@@ -1395,8 +1394,6 @@ static MemberDef *addVariableToFile(
{
mn = new MemberName(name);
mn->append(md);
- //Doxygen::functionNameDict.insert(name,mn);
- //Doxygen::functionNameList.append(mn);
Doxygen::functionNameSDict.append(name,mn);
}
root->section = Entry::EMPTY_SEC;
@@ -5805,7 +5802,7 @@ static bool openOutputFile(const char *outFile,QFile &f)
dir.rename(fi.fileName(),fi.fileName()+".bak");
}
f.setName(outFile);
- fileOpened = f.open(IO_WriteOnly);
+ fileOpened = f.open(IO_WriteOnly|IO_Translate);
}
return fileOpened;
}
diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp
index 6193223..54b815c 100644
--- a/src/htmlgen.cpp
+++ b/src/htmlgen.cpp
@@ -1113,3 +1113,23 @@ void HtmlGenerator::writeNonBreakableSpace(int n)
t << "&nbsp;";
}
}
+
+void HtmlGenerator::writeLineNumber(const char *ref,const char *file,
+ const char *anchor,int l)
+{
+ QCString lineNumber,lineAnchor;
+ lineNumber.sprintf("%05d",l);
+ lineAnchor.sprintf("l%05d",l);
+
+ if (file)
+ {
+ startCodeAnchor(lineAnchor);
+ writeCodeLink(ref,file,anchor,lineNumber);
+ endCodeAnchor();
+ }
+ else
+ {
+ codify(lineNumber);
+ }
+ codify(" ");
+}
diff --git a/src/htmlgen.h b/src/htmlgen.h
index 40a37bc..75c2a00 100644
--- a/src/htmlgen.h
+++ b/src/htmlgen.h
@@ -124,8 +124,7 @@ class HtmlGenerator : public OutputGenerator
void endCodeFragment() { t << "</pre></div>"; }
void startPreFragment() { t << "<pre>"; }
void endPreFragment() { t << "</pre>"; }
- void startLineNumber() {}
- void endLineNumber() { t << " "; }
+ void writeLineNumber(const char *,const char *,const char *,int);
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
//void writeBoldString(const char *text)
diff --git a/src/latexgen.h b/src/latexgen.h
index fd37132..51947c2 100644
--- a/src/latexgen.h
+++ b/src/latexgen.h
@@ -122,8 +122,7 @@ class LatexGenerator : public OutputGenerator
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
insidePre=FALSE;
}
- void startLineNumber() {}
- void endLineNumber() { t << " "; }
+ void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); }
//void writeBoldString(const char *text)
diff --git a/src/mangen.h b/src/mangen.h
index a5f15fe..ea944be 100644
--- a/src/mangen.h
+++ b/src/mangen.h
@@ -114,8 +114,7 @@ class ManGenerator : public OutputGenerator
void endCodeFragment();
void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); }
- void startLineNumber() {}
- void endLineNumber() { t << " "; }
+ void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; }
//void writeBoldString(const char *text)
diff --git a/src/outputgen.h b/src/outputgen.h
index ed73543..1e8e509 100644
--- a/src/outputgen.h
+++ b/src/outputgen.h
@@ -248,8 +248,8 @@ class BaseOutputDocInterface
virtual void endPageRef(const char *,const char *) = 0;
- virtual void startLineNumber() = 0;
- virtual void endLineNumber() = 0;
+ virtual void writeLineNumber(const char *ref,const char *file,
+ const char *anchor,int lineNumber) = 0;
virtual void startCodeLine() = 0;
virtual void endCodeLine() = 0;
virtual void startCodeAnchor(const char *label) = 0;
diff --git a/src/outputlist.cpp b/src/outputlist.cpp
index 9688dde..34c67c7 100644
--- a/src/outputlist.cpp
+++ b/src/outputlist.cpp
@@ -278,6 +278,7 @@ FORALL3(const char *a1,const char *a2,bool a3,a1,a2,a3)
FORALL3(uchar a1,uchar a2,uchar a3,a1,a2,a3)
FORALL4(const char *a1,const char *a2,const char *a3,const char *a4,a1,a2,a3,a4)
FORALL4(const char *a1,const char *a2,const char *a3,bool a4,a1,a2,a3,a4)
+FORALL4(const char *a1,const char *a2,const char *a3,int a4,a1,a2,a3,a4)
//--------------------------------------------------------------------------
diff --git a/src/outputlist.h b/src/outputlist.h
index 619792c..8a49235 100644
--- a/src/outputlist.h
+++ b/src/outputlist.h
@@ -214,10 +214,13 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startCodeLine); }
void endCodeLine()
{ forall(&OutputGenerator::endCodeLine); }
- void startLineNumber()
- { forall(&OutputGenerator::startLineNumber); }
- void endLineNumber()
- { forall(&OutputGenerator::endLineNumber); }
+ //void startLineNumber()
+ //{ forall(&OutputGenerator::startLineNumber); }
+ //void endLineNumber()
+ //{ forall(&OutputGenerator::endLineNumber); }
+ void writeLineNumber(const char *ref,const char *file,const char *anchor,
+ int lineNumber)
+ { forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); }
void startEmphasis()
{ forall(&OutputGenerator::startEmphasis); }
void endEmphasis()
@@ -485,6 +488,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO3(ClassDiagram &,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,const char *);
FORALLPROTO4(const char *,const char *,const char *,bool);
+ FORALLPROTO4(const char *,const char *,const char *,int);
OutputList(const OutputList &ol);
QList<OutputGenerator> *outputs;
diff --git a/src/rtfgen.h b/src/rtfgen.h
index a1a9f56..980aea6 100644
--- a/src/rtfgen.h
+++ b/src/rtfgen.h
@@ -114,8 +114,7 @@ class RTFGenerator : public OutputGenerator
void endCodeFragment();
void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); }
- void startLineNumber() {}
- void endLineNumber() { t << " "; }
+ void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; }
void endCodeLine() { lineBreak(); }
//void writeBoldString(const char *text)
diff --git a/src/scanner.l b/src/scanner.l
index fc6a7eb..93cac98 100644
--- a/src/scanner.l
+++ b/src/scanner.l
@@ -1699,6 +1699,26 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
}
}
+<ReadBody>"}"{BN}+"typedef"{BN}+ { //err("ReadBody count=%d\n",curlyCount);
+ if ( curlyCount>0 )
+ {
+ current->program += yytext ;
+ --curlyCount ;
+ }
+ else
+ {
+ lineCount();
+ isTypedef = TRUE;
+ current->endBodyLine = yyLineNr;
+ QCString &cn = current->name;
+ QCString rn = current_root->name.copy();
+ if (!cn.isEmpty() && !rn.isEmpty())
+ {
+ prependScope();
+ }
+ BEGIN( TypedefName );
+ }
+ }
<TypedefName>{ID} {
if (current->section == Entry::ENUM_SEC)
{
diff --git a/src/translator_hr.h b/src/translator_hr.h
index 54cfaaa..e985734 100644
--- a/src/translator_hr.h
+++ b/src/translator_hr.h
@@ -39,10 +39,16 @@
// - Removed obsolete method trVerbatimHeadert()
// - Method latexBabelPackage() removed, ude latexLanguageSupportCommand
//
+// 2001/11/13
+// - inherits from Translator
+// - Added strings for 1.2.11
+// - better output for C documentation (trCompoundMembersDescription(), trClassDocumentation())
+//
+
#ifndef TRANSLATOR_HR_H
#define TRANSLATOR_HR_H
-class TranslatorCroatian : public TranslatorAdapter_1_2_11
+class TranslatorCroatian : public Translator
{
private:
/*! to avoid macro redefinition from translator_cz.h */
@@ -156,19 +162,37 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11
QCString trCompoundMembersDescription(bool extractAll)
{
QCString result="Popis svih ";
- if (!extractAll) result+="dokumentiranih ";
- result+="članova klasa s linkovima na ";
- if (extractAll) result+="dokumentaciju svakog člana:";
- else result+="dokumentaciju klase :";
+ if (!extractAll)
+ result+="dokumentiranih ";
+
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ result+="članova klasa s linkovima na ";
+ else
+ result+="članova struktura s linkovima na ";
+
+ if (extractAll)
+ {
+ result+="dokumentaciju svakog člana:";
+ }
+ else
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ result+="dokumentaciju klase :";
+ else
+ result +="dokumentaciju strukture";
+ }
return decode(result);
}
QCString trFileMembersDescription(bool extractAll)
{
QCString result="Popis svih ";
- if (!extractAll) result+="dokumentiranih ";
+ if (!extractAll)
+ result+="dokumentiranih ";
result+="članova s linkovima na ";
- if (extractAll) result+="dokumentaciju datoteke u kojima se nalaze:";
- else result+="datoteke u kojima se nalaze:";
+ if (extractAll)
+ result+="dokumentaciju datoteke u kojima se nalaze:";
+ else
+ result+="datoteke u kojima se nalaze:";
return decode(result);
}
QCString trHeaderFilesDescription()
@@ -189,13 +213,31 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11
QCString trHierarchicalIndex()
{ return "Hijerarhijsko kazalo"; }
QCString trCompoundIndex()
- { return "Skupno kazalo "; }
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Kazalo struktura podataka";
+ }
+ else
+ {
+ return "Skupno kazalo ";
+ }
+ }
QCString trFileIndex()
{ return "Kazalo datoteka"; }
QCString trModuleDocumentation()
{ return "Dokumentacija modula"; }
QCString trClassDocumentation()
- { return "Dokumentacija klasa"; }
+ {
+ if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
+ {
+ return "Dokumentacija struktura podataka";
+ }
+ else
+ {
+ return "Dokumentacija klasa";
+ }
+ }
QCString trFileDocumentation()
{ return "Dokumentacija datoteka"; }
QCString trExampleDocumentation()
@@ -967,6 +1009,16 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_11
return result;
}
+//////////////////////////////////////////////////////////////////////////
+// new since 1.2.11
+//////////////////////////////////////////////////////////////////////////
+
+ /*! This text is put before the list of members referenced by a member
+ */
+ virtual QCString trReferences()
+ {
+ return "Reference";
+ }
};
#endif
diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp
index 463d16a..361b68c 100644
--- a/src/xmlgen.cpp
+++ b/src/xmlgen.cpp
@@ -35,6 +35,8 @@
#include <qfile.h>
#include <qtextstream.h>
+#define XML_DB(x)
+
QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
{
switch (t)
@@ -147,6 +149,10 @@ template<class T> class ValStack
{
return m_sp==0;
}
+ uint count() const
+ {
+ return m_sp;
+ }
private:
QArray<T> m_values;
@@ -170,11 +176,13 @@ class XMLGenerator : public OutputDocInterface
{
m_inParStack.top() = TRUE;
m_t << "<para>" << endl;
+ XML_DB(("start par at level=%d\n",m_inParStack.count());)
}
else if (m_inParStack.isEmpty())
{
m_inParStack.push(TRUE);
m_t << "<para>" << endl;
+ XML_DB(("start par at level=%d\n",m_inParStack.count());)
}
}
void endParMode()
@@ -183,18 +191,25 @@ class XMLGenerator : public OutputDocInterface
{
m_inParStack.top() = FALSE;
m_t << "</para>" << endl;
+ XML_DB(("end par at level=%d\n",m_inParStack.count());)
}
}
void startNestedPar()
{
m_inParStack.push(FALSE);
+ XML_DB(("enter par level=%d\n",m_inParStack.count());)
}
void endNestedPar()
{
+ XML_DB(("leave par level=%d\n",m_inParStack.count());)
if (m_inParStack.pop())
{
m_t << "</para>" << endl;
}
+ else
+ {
+ XML_DB(("ILLEGAL par level!\n");)
+ }
}
// Standard generator functions to be implemented by all generators
@@ -503,27 +518,47 @@ class XMLGenerator : public OutputDocInterface
}
void startTable(int cols)
{
+ XML_DB(("startTable\n");)
startParMode();
- m_t << "<table><tgroup cols=\"" << cols << "\"><tbody>\n";
+ m_t << "<table cols=\"" << cols << "\">\n";
}
void endTable()
{
- m_t << "</row>\n</tbody></tgroup></table>";
+ XML_DB(("endTable\n");)
+ m_t << "</row>\n</table>";
}
void nextTableRow()
{
+ XML_DB(("nextTableRow\n");)
m_t << "<row><entry>";
+
+ // we need manually add a para here because cells are
+ // parsed before the table is generated, and thus
+ // are already parsed as if they are inside a paragraph.
+ m_t << "<para>";
}
void endTableRow()
{
+ XML_DB(("endTableRow\n");)
m_t << "</row>" << endl;
}
void nextTableColumn()
{
+ XML_DB(("nextTableColumn\n");)
m_t << "<entry>";
+
+ // we need manually add a para here because cells are
+ // parsed before the table is generated, and thus
+ // are already parsed as if they are inside a paragraph.
+ m_t << "<para>";
}
void endTableColumn()
{
+ XML_DB(("endTableColumn\n");)
+ // we need manually add a para here because cells are
+ // parsed before the table is generated, and thus
+ // are already parsed as if they are inside a paragraph.
+ m_t << "</para>";
m_t << "</entry>";
}
@@ -614,13 +649,16 @@ class XMLGenerator : public OutputDocInterface
void endPageRef(const char *,const char *)
{
}
- void startLineNumber()
- {
- m_t << "<linenumber>";
- }
- void endLineNumber()
+ void writeLineNumber(const char *,const char *file, // TODO: support external references
+ const char *anchor,int l)
{
- m_t << "</linenumber>";
+ m_t << "<linenumber";
+ m_t << " line=\"" << l << "\"";
+ if (file)
+ {
+ m_t << " refid=\"" << file << "_1" << anchor << "\"";
+ }
+ m_t << "/>";
}
void startCodeLine()
{
@@ -665,15 +703,7 @@ class XMLGenerator : public OutputDocInterface
{
const XMLGenerator *xg = (const XMLGenerator *)g;
- //if (m_inPar && !mifgen->m_inParStart)
- //{
- // endParMode();
- //}
- //else if (!m_inPar && mifgen->m_inParStart)
- //{
- // startParMode();
- //}
- //printf("Appending \n>>>>\n`%s'\n<<<<\n and \n>>>>\n`%s'\n<<<<\n",getContents().data(),mifgen->getContents().data());
+ //printf("Appending \n>>>>\n`%s'\n<<<<\n and \n>>>>\n`%s'\n<<<<\n",getContents().data(),xg->getContents().data());
m_t << xg->getContents();
m_inParStack = xg->m_inParStack;
m_inListStack = xg->m_inListStack;
@@ -697,6 +727,9 @@ class XMLGenerator : public OutputDocInterface
m_t.setDevice(&m_b);
m_t.setEncoding(QTextStream::Latin1);
+ //printf("Cloning >>%s<< m_parStack.count()=%d\n",
+ // xg->getContents().data(),xg->m_inParStack.count());
+
// copy state variables
m_inParStack = xg->m_inParStack;
m_inListStack = xg->m_inListStack;
@@ -779,6 +812,18 @@ void writeXMLCodeBlock(QTextStream &t,FileDef *fd)
void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
{
+
+ // + declaration
+ // - reimplements
+ // - reimplementedBy
+ // - exceptions
+ // - const/volatile specifiers
+ // - examples
+ // + source definition
+ // - source references
+ // - source referenced by
+ // - include code
+
if (md->memberType()==MemberDef::EnumValue) return;
QCString scopeName;
@@ -942,9 +987,67 @@ void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
t << " <detaileddescription>" << endl;
writeXMLDocBlock(t,md->getDefFileName(),md->getDefLine(),scopeName,md->name(),md->documentation());
t << " </detaileddescription>" << endl;
- t << " <location file=\""
- << md->getDefFileName() << "\" line=\""
- << md->getDefLine() << "\"/>" << endl;
+ if (md->getDefLine()!=-1)
+ {
+ t << " <location file=\""
+ << md->getDefFileName() << "\" line=\""
+ << md->getDefLine() << "\"/>" << endl;
+ }
+
+ printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
+ if (md->getReferencesMembers())
+ {
+ MemberSDict::Iterator mdi(*md->getReferencesMembers());
+ MemberDef *rmd;
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ {
+ t << " <references id=\"";
+ t << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << rmd->anchor()
+ << "\" line=\""
+ << rmd->getStartBodyLine()
+ << "\">";
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
+ {
+ name.prepend(scope+"::");
+ }
+ writeXMLString(t,name);
+ t << "</references>" << endl;
+ }
+ }
+ }
+ if (md->getReferencedByMembers())
+ {
+ MemberSDict::Iterator mdi(*md->getReferencedByMembers());
+ MemberDef *rmd;
+ for (mdi.toFirst();(rmd=mdi.current());++mdi)
+ {
+ if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
+ {
+ t << " <referencedby id=\"";
+ t << rmd->getBodyDef()->getOutputFileBase()
+ << "_1" // encoded `:' character (see util.cpp:convertNameToFile)
+ << rmd->anchor()
+ << "\" line=\""
+ << rmd->getStartBodyLine()
+ << "\">";
+ QCString scope = rmd->getScopeString();
+ QCString name = rmd->name();
+ if (!scope.isEmpty() && scope!=def->name())
+ {
+ name.prepend(scope+"::");
+ }
+ writeXMLString(t,name);
+ t << "</referencedby>" << endl;
+ }
+ }
+ }
+
t << " </memberdef>" << endl;
}
@@ -980,6 +1083,7 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
// + user defined member sections
// + standard member sections
// + detailed member documentation
+ // - examples
if (cd->isReference()) return; // skip external references.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds.