Commit 86502f97 authored by dimitri's avatar dimitri

Release-1.2.10-20010923

parent 4ce0e434
DOXYGEN Version 1.2.10-20010909 DOXYGEN Version 1.2.10-20010923
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (09 September 2001) Dimitri van Heesch (23 September 2001)
DOXYGEN Version 1.2.10_20010909 DOXYGEN Version 1.2.10_20010923
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (09 September 2001) Dimitri van Heesch (dimitri@stack.nl) (23 September 2001)
1.2.10-20010909 1.2.10-20010923
Doxywizard is a graphical front-end to read/edit/write doxygen configuration Doxywizard is a graphical front-end to read/edit/write doxygen configuration
files. It requires Qt version 2.1.0 or higher. files. It requires Qt version 2.1.0 or higher.
As a special exception, Dimitri van Heesch gives permission to link this
program with Qt non-commercial edition, and distribute the resulting
executable, without including the source code for the Qt non-commercial
edition in the source distribution.
...@@ -71,7 +71,7 @@ IGNORE_PREFIX = ...@@ -71,7 +71,7 @@ IGNORE_PREFIX =
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# configuration options related to the HTML output # configuration options related to the HTML output
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
GENERATE_HTML = YES GENERATE_HTML = NO
HTML_OUTPUT = HTML_OUTPUT =
HTML_HEADER = HTML_HEADER =
HTML_FOOTER = HTML_FOOTER =
......
...@@ -191,6 +191,17 @@ template<class T> class BaseHandler : public IBaseHandler, ...@@ -191,6 +191,17 @@ template<class T> class BaseHandler : public IBaseHandler,
return TRUE; return TRUE;
} }
bool skippedEntity ( const QString &s )
{
if (m_delegateHandler)
{
return m_delegateHandler->skippedEntity(s);
}
printf("Skipped unhandled entity %s\n",s.data());
return TRUE;
}
virtual bool characters ( const QString & ch ) virtual bool characters ( const QString & ch )
{ {
if (m_delegateHandler) if (m_delegateHandler)
...@@ -198,6 +209,7 @@ template<class T> class BaseHandler : public IBaseHandler, ...@@ -198,6 +209,7 @@ template<class T> class BaseHandler : public IBaseHandler,
return m_delegateHandler->characters(ch); return m_delegateHandler->characters(ch);
} }
//printf("Found characters \"%s\"\n",ch.data());
m_curString+=ch; m_curString+=ch;
return TRUE; return TRUE;
} }
......
...@@ -21,10 +21,11 @@ ...@@ -21,10 +21,11 @@
#include "basehandler.h" #include "basehandler.h"
#include "sectionhandler.h" #include "sectionhandler.h"
#include "doxmlintf.h"
class DocHandler; class DocHandler;
class CompoundHandler : public BaseHandler<CompoundHandler> class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
{ {
public: public:
virtual void startSection(const QXmlAttributes& attrib); virtual void startSection(const QXmlAttributes& attrib);
...@@ -38,6 +39,13 @@ class CompoundHandler : public BaseHandler<CompoundHandler> ...@@ -38,6 +39,13 @@ class CompoundHandler : public BaseHandler<CompoundHandler>
CompoundHandler(IBaseHandler *parent); CompoundHandler(IBaseHandler *parent);
virtual ~CompoundHandler(); virtual ~CompoundHandler();
// ICompound
QString name() const { return m_name; }
QString id() const { return m_id; }
QString kind() const { return m_kind; }
QListIterator<ISection> getSectionIterator() const { return m_sections; }
private: private:
struct SuperClass struct SuperClass
{ {
...@@ -59,7 +67,7 @@ class CompoundHandler : public BaseHandler<CompoundHandler> ...@@ -59,7 +67,7 @@ class CompoundHandler : public BaseHandler<CompoundHandler>
}; };
QList<SuperClass> m_superClasses; QList<SuperClass> m_superClasses;
QList<SubClass> m_subClasses; QList<SubClass> m_subClasses;
QList<SectionHandler> m_sections; QList<ISection> m_sections;
IBaseHandler *m_parent; IBaseHandler *m_parent;
DocHandler *m_brief; DocHandler *m_brief;
DocHandler *m_detailed; DocHandler *m_detailed;
......
...@@ -372,15 +372,148 @@ void ParameterListHandler::startParameterDescription(const QXmlAttributes& attri ...@@ -372,15 +372,148 @@ void ParameterListHandler::startParameterDescription(const QXmlAttributes& attri
m_curParam->startParameterDescription(attrib); m_curParam->startParameterDescription(attrib);
} }
//----------------------------------------------------------------------
// LineBreakHandler
//----------------------------------------------------------------------
LineBreakHandler::LineBreakHandler(IBaseHandler *parent)
: DocNode(LineBreak), m_parent(parent)
{
}
LineBreakHandler::~LineBreakHandler()
{
}
void LineBreakHandler::startLineBreak(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
addEndHandler("linebreak",this,&LineBreakHandler::endLineBreak);
printf("Start linebreak\n");
}
void LineBreakHandler::endLineBreak()
{
m_parent->setDelegate(0);
printf("End linebreak\n");
}
//----------------------------------------------------------------------
// HRulerHandler
//----------------------------------------------------------------------
HRulerHandler::HRulerHandler(IBaseHandler *parent)
: DocNode(HRuler), m_parent(parent)
{
}
HRulerHandler::~HRulerHandler()
{
}
void HRulerHandler::startHRuler(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
addEndHandler("hruler",this,&HRulerHandler::endHRuler);
printf("Start hruler\n");
}
void HRulerHandler::endHRuler()
{
m_parent->setDelegate(0);
printf("End hruler\n");
}
//----------------------------------------------------------------------
// RefHandler
//----------------------------------------------------------------------
RefHandler::RefHandler(IBaseHandler *parent)
: DocNode(Ref), m_parent(parent)
{
}
RefHandler::~RefHandler()
{
}
void RefHandler::startRef(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
addEndHandler("ref",this,&RefHandler::endRef);
m_refId = attrib.value("idref");
m_anchor = attrib.value("anchor");
printf("Start ref refId=%s anchor=%s\n",m_refId.data(),m_anchor.data());
m_curString="";
}
void RefHandler::endRef()
{
m_linkText = m_curString;
m_parent->setDelegate(0);
printf("End ref\n");
}
//----------------------------------------------------------------------
// TitleHandler
//----------------------------------------------------------------------
TitleHandler::TitleHandler(IBaseHandler *parent)
: DocNode(Title), m_parent(parent)
{
m_children.setAutoDelete(TRUE);
m_markupHandler = new MarkupHandler(m_children,m_curString);
setFallBackHandler(m_markupHandler);
addStartHandler("ref",this,&TitleHandler::startRef);
}
TitleHandler::~TitleHandler()
{
delete m_markupHandler;
}
void TitleHandler::startTitle(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
addEndHandler("title",this,&TitleHandler::endTitle);
printf("Start title\n");
m_curString="";
}
void TitleHandler::endTitle()
{
addTextNode();
m_parent->setDelegate(0);
printf("End title\n");
}
void TitleHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
printf("addTextNode() text=\"%s\" markup=%x\n",
m_curString.data(),m_markupHandler->markup());
m_curString="";
}
}
void TitleHandler::startRef(const QXmlAttributes& attrib)
{
RefHandler *ref = new RefHandler(this);
ref->startRef(attrib);
m_children.append(ref);
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// SimpleSectHandler // SimpleSectHandler
//---------------------------------------------------------------------- //----------------------------------------------------------------------
SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent) SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent)
: DocNode(Para), m_parent(parent), m_paragraph(0) : DocNode(Para), m_parent(parent), m_paragraph(0), m_title(0)
{ {
addStartHandler("title",this,&SimpleSectHandler::startTitle); addStartHandler("title",this,&SimpleSectHandler::startTitle);
addEndHandler("title",this,&SimpleSectHandler::endTitle);
addStartHandler("para",this,&SimpleSectHandler::startParagraph); addStartHandler("para",this,&SimpleSectHandler::startParagraph);
} }
...@@ -402,24 +535,124 @@ void SimpleSectHandler::endSimpleSect() ...@@ -402,24 +535,124 @@ void SimpleSectHandler::endSimpleSect()
m_parent->setDelegate(0); m_parent->setDelegate(0);
} }
void SimpleSectHandler::startTitle(const QXmlAttributes& /*attrib*/) void SimpleSectHandler::startTitle(const QXmlAttributes& attrib)
{ {
m_curString=""; ASSERT(m_title==0);
m_title = new TitleHandler(this);
m_title->startTitle(attrib);
}
void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
{
ASSERT(m_paragraph==0);
m_paragraph = new ParagraphHandler(this);
m_paragraph->startParagraph(attrib);
}
//----------------------------------------------------------------------
// VariableListEntryHandler
//----------------------------------------------------------------------
VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent)
: DocNode(VariableListEntry), m_parent(parent), m_description(0)
{
addStartHandler("term",this,&VariableListEntryHandler::startTerm);
addEndHandler("term",this,&VariableListEntryHandler::endTerm);
addStartHandler("para",this,&VariableListEntryHandler::startParagraph);
}
VariableListEntryHandler::~VariableListEntryHandler()
{
delete m_description;
}
void VariableListEntryHandler::startVarListEntry(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("start varlistentry\n");
addEndHandler("varlistentry",this,&VariableListEntryHandler::endVarListEntry);
} }
void SimpleSectHandler::endTitle() void VariableListEntryHandler::endVarListEntry()
{
m_parent->setDelegate(0);
printf("end varlistentry\n");
}
void VariableListEntryHandler::startListItem(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("start listitem\n");
addEndHandler("listitem",this,&VariableListEntryHandler::endListItem);
}
void VariableListEntryHandler::endListItem()
{
m_parent->setDelegate(0);
printf("end listitem\n");
}
void VariableListEntryHandler::startTerm(const QXmlAttributes& /*attrib*/)
{ {
printf("simpleSect title=\"%s\"\n",m_curString.data());
m_title = m_curString;
m_curString=""; m_curString="";
} }
void VariableListEntryHandler::endTerm()
{
m_term = m_curString;
printf("term=%s\n",m_term.data());
}
void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib) void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
{ {
ASSERT(m_paragraph==0); ASSERT(m_description==0);
m_paragraph = new ParagraphHandler(this); m_description = new ParagraphHandler(this);
m_paragraph->startParagraph(attrib); m_description->startParagraph(attrib);
}
//----------------------------------------------------------------------
// VariableListHandler
//----------------------------------------------------------------------
VariableListHandler::VariableListHandler(IBaseHandler *parent)
: DocNode(VariableList), m_parent(parent)
{
m_entries.setAutoDelete(TRUE);
addStartHandler("varlistentry",this,&VariableListHandler::startVarListEntry);
addStartHandler("listitem",this,&VariableListHandler::startListItem);
}
VariableListHandler::~VariableListHandler()
{
}
void VariableListHandler::startVariableList(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
printf("start variablelist\n");
addEndHandler("variablelist",this,&VariableListHandler::endVariableList);
}
void VariableListHandler::endVariableList()
{
printf("end variablelist\n");
m_parent->setDelegate(0);
}
void VariableListHandler::startVarListEntry(const QXmlAttributes& attrib)
{
VariableListEntryHandler *vle = new VariableListEntryHandler(this);
vle->startVarListEntry(attrib);
m_curEntry = vle;
m_entries.append(vle);
}
void VariableListHandler::startListItem(const QXmlAttributes& attrib)
{
ASSERT(m_curEntry!=0);
m_curEntry->startListItem(attrib);
} }
//---------------------------------------------------------------------- //----------------------------------------------------------------------
...@@ -440,6 +673,10 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent) ...@@ -440,6 +673,10 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList); addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList); addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect); addStartHandler("simplesect",this,&ParagraphHandler::startSimpleSect);
addStartHandler("ref",this,&ParagraphHandler::startRef);
addStartHandler("variablelist",this,&ParagraphHandler::startVariableList);
addStartHandler("hruler",this,&ParagraphHandler::startHRuler);
addStartHandler("linebreak",this,&ParagraphHandler::startLineBreak);
} }
ParagraphHandler::~ParagraphHandler() ParagraphHandler::~ParagraphHandler()
...@@ -492,12 +729,40 @@ void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib) ...@@ -492,12 +729,40 @@ void ParagraphHandler::startSimpleSect(const QXmlAttributes& attrib)
m_children.append(sectHandler); m_children.append(sectHandler);
} }
void ParagraphHandler::startRef(const QXmlAttributes& attrib)
{
RefHandler *ref = new RefHandler(this);
ref->startRef(attrib);
m_children.append(ref);
}
void ParagraphHandler::startVariableList(const QXmlAttributes& attrib)
{
VariableListHandler *vl = new VariableListHandler(this);
vl->startVariableList(attrib);
m_children.append(vl);
}
void ParagraphHandler::startHRuler(const QXmlAttributes& attrib)
{
HRulerHandler *hr = new HRulerHandler(this);
hr->startHRuler(attrib);
m_children.append(hr);
}
void ParagraphHandler::startLineBreak(const QXmlAttributes& attrib)
{
LineBreakHandler *lb = new LineBreakHandler(this);
lb->startLineBreak(attrib);
m_children.append(lb);
}
void ParagraphHandler::addTextNode() void ParagraphHandler::addTextNode()
{ {
if (!m_curString.isEmpty()) if (!m_curString.isEmpty())
{ {
m_children.append(new TextNode(m_curString,m_markupHandler->markup())); m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
printf("addTextNode() text=%s markup=%x\n", printf("addTextNode() text=\"%s\" markup=%x\n",
m_curString.data(),m_markupHandler->markup()); m_curString.data(),m_markupHandler->markup());
m_curString=""; m_curString="";
} }
......
...@@ -53,7 +53,13 @@ class DocNode ...@@ -53,7 +53,13 @@ class DocNode
ListItem, ListItem,
ParameterList, ParameterList,
Parameter, Parameter,
SimpleSect SimpleSect,
Title,
Ref,
VariableList,
VariableListEntry,
HRuler,
LineBreak
}; };
DocNode(NodeKind k) : m_kind(k) {} DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {} virtual ~DocNode() {}
...@@ -223,6 +229,85 @@ class ParameterListHandler : public DocNode, ...@@ -223,6 +229,85 @@ class ParameterListHandler : public DocNode,
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
/* \brief Node representing a horizontal ruler
*
*/
class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler>
{
public:
LineBreakHandler(IBaseHandler *parent);
virtual ~LineBreakHandler();
void startLineBreak(const QXmlAttributes& attrib);
void endLineBreak();
private:
IBaseHandler *m_parent;
};
//-----------------------------------------------------------------------------
/* \brief Node representing a horizontal ruler
*
*/
class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler>
{
public:
HRulerHandler(IBaseHandler *parent);
virtual ~HRulerHandler();
void startHRuler(const QXmlAttributes& attrib);
void endHRuler();
private:
IBaseHandler *m_parent;
};
//-----------------------------------------------------------------------------
/* \brief Node representing a reference to another item
*
*/
class RefHandler : public DocNode, public BaseHandler<RefHandler>
{
public:
RefHandler(IBaseHandler *parent);
virtual ~RefHandler();
void startRef(const QXmlAttributes& attrib);
void endRef();
private:
IBaseHandler *m_parent;
QCString m_refId;
QCString m_anchor;
QCString m_linkText;
};
//-----------------------------------------------------------------------------
/* \brief Node representing the title of a section
*
*/
// children: text, ref
// children handled by MarkupHandler:
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
class TitleHandler : public DocNode, public BaseHandler<TitleHandler>
{
public:
TitleHandler(IBaseHandler *parent);
virtual ~TitleHandler();
virtual void startTitle(const QXmlAttributes& attrib);
virtual void endTitle();
virtual void startRef(const QXmlAttributes& attrib);
void addTextNode();
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
MarkupHandler *m_markupHandler;
};
//-----------------------------------------------------------------------------
/* \brief Node representing a simple section with an unnumbered header. /* \brief Node representing a simple section with an unnumbered header.
* *
*/ */
...@@ -244,15 +329,58 @@ class SimpleSectHandler : public DocNode, ...@@ -244,15 +329,58 @@ class SimpleSectHandler : public DocNode,
virtual void startSimpleSect(const QXmlAttributes& attrib); virtual void startSimpleSect(const QXmlAttributes& attrib);
virtual void endSimpleSect(); virtual void endSimpleSect();
virtual void startTitle(const QXmlAttributes& attrib); virtual void startTitle(const QXmlAttributes& attrib);
virtual void endTitle();
virtual void startParagraph(const QXmlAttributes& attrib); virtual void startParagraph(const QXmlAttributes& attrib);
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
ParagraphHandler *m_paragraph; ParagraphHandler *m_paragraph;
Types m_type; Types m_type;
// TODO: a title can also contain links (for todo sections for instance!) TitleHandler *m_title;
QString m_title; };
//-----------------------------------------------------------------------------
class VariableListEntryHandler : public DocNode, public BaseHandler<VariableListEntryHandler>
{
public:
virtual void startVarListEntry(const QXmlAttributes& attrib);
virtual void endVarListEntry();
virtual void startListItem(const QXmlAttributes& attrib);
virtual void endListItem();
virtual void startTerm(const QXmlAttributes& attrib);
virtual void endTerm();
virtual void startParagraph(const QXmlAttributes& attrib);
VariableListEntryHandler(IBaseHandler *parent);
virtual ~VariableListEntryHandler();
private:
IBaseHandler *m_parent;
QString m_term;
ParagraphHandler *m_description;
};
//-----------------------------------------------------------------------------
/*! \brief Node representing a list of named items.
*
*/
// children: varlistentry, listitem
class VariableListHandler : public DocNode, public BaseHandler<VariableListHandler>
{
public:
virtual void startVariableList(const QXmlAttributes& attrib);
virtual void endVariableList();
virtual void startVarListEntry(const QXmlAttributes& attrib);
virtual void startListItem(const QXmlAttributes& attrib);
VariableListHandler(IBaseHandler *parent);
virtual ~VariableListHandler();
private:
IBaseHandler *m_parent;
QList<VariableListEntryHandler> m_entries;
VariableListEntryHandler *m_curEntry;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -260,10 +388,13 @@ class SimpleSectHandler : public DocNode, ...@@ -260,10 +388,13 @@ class SimpleSectHandler : public DocNode,
/*! \brief Node representing a paragraph of text and commands. /*! \brief Node representing a paragraph of text and commands.
* *
*/ */
// children: itemizedlist, orderedlist, parameterlist, simplesect, // children: itemizedlist, orderedlist, parameterlist, simplesect, ref,
// programlisting, hruler, variablelist, // variablelist, hruler, linebreak,
// linebreak, nonbreakablespace, ref, ulink, email, // TODO:
// table, link, indexentry, formula, image, dotfile, ref // ulink, email, link
// table,
// programlisting,
// indexentry, formula, image, dotfile
// children handled by MarkupHandler: // children handled by MarkupHandler:
// bold, computeroutput, emphasis, center, // bold, computeroutput, emphasis, center,
// small, subscript, superscript. // small, subscript, superscript.
...@@ -276,6 +407,10 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler> ...@@ -276,6 +407,10 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
virtual void startOrderedList(const QXmlAttributes& attrib); virtual void startOrderedList(const QXmlAttributes& attrib);
virtual void startParameterList(const QXmlAttributes& attrib); virtual void startParameterList(const QXmlAttributes& attrib);
virtual void startSimpleSect(const QXmlAttributes& attrib); virtual void startSimpleSect(const QXmlAttributes& attrib);
virtual void startRef(const QXmlAttributes& attrib);
virtual void startVariableList(const QXmlAttributes& attrib);
virtual void startHRuler(const QXmlAttributes& attrib);
virtual void startLineBreak(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent); ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler(); virtual ~ParagraphHandler();
......
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
#include <qlist.h>
#include <qstring.h>
class IParam
{
public:
virtual QString type() const = 0;
virtual QString declarationName() const = 0;
virtual QString definitionName() const = 0;
virtual QString attrib() const = 0;
virtual QString arraySpecifier() const = 0;
virtual QString defaultValue() const = 0;
};
class IMember
{
public:
virtual QString kind() const = 0;
virtual QString id() const = 0;
virtual QString protection() const = 0;
virtual QString virtualness() const = 0;
virtual QString type() const = 0;
virtual QString name() const = 0;
virtual QListIterator<IParam> getParamIterator() const = 0;
};
class ISection
{
public:
virtual QString kind() const = 0;
virtual QListIterator<IMember> getMemberIterator() const = 0;
};
class ICompound
{
public:
virtual QString name() const = 0;
virtual QString id() const = 0;
virtual QString kind() const = 0;
virtual QListIterator<ISection> getSectionIterator() const = 0;
};
/*! Root node of the object model. */
class IDoxygen
{
public:
/*! Returns an iterator that can be used to iterate over the list
* of compounds found in the project.
*/
virtual QListIterator<ICompound> getCompoundIterator() const = 0;
};
/*! Factory method that creates an object model given an XML file generated
* by doxygen.
* @param xmlFileName The name of the XML to parse.
* @returns An iterface to the object model.
*/
IDoxygen *createObjectModelFromXML(const char *xmlFileName);
#endif
...@@ -13,95 +13,53 @@ ...@@ -13,95 +13,53 @@
* *
*/ */
#include "mainhandler.h" #include <stdio.h>
#include "doxmlintf.h"
#include <qstring.h>
#include <qxml.h>
#include <qfile.h>
#include <qdict.h>
#include <qlist.h>
//#define USE_DOM
#define USE_SAX
#ifdef USE_DOM
#include <qdom.h>
#endif
class ErrorHandler : public QXmlErrorHandler
{
public:
virtual ~ErrorHandler() {}
bool warning( const QXmlParseException & )
{
return FALSE;
}
bool error( const QXmlParseException & )
{
return FALSE;
}
bool fatalError( const QXmlParseException &exception )
{
fprintf(stderr,"Fatal error at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
exception.message().data());
return FALSE;
}
QString errorString() { return ""; }
private:
QString errorMsg;
};
int main(int argc,char **argv) int main(int argc,char **argv)
{ {
if (argc==1) if (argc!=2)
{ {
printf("Usage: %s file.xml\n",argv[0]); printf("Usage: %s file.xml\n",argv[0]);
exit(1); exit(1);
} }
QFile xmlFile(argv[1]); IDoxygen *dox = createObjectModelFromXML(argv[1]);
#ifdef USE_SAX
MainHandler handler;
ErrorHandler errorHandler;
QXmlInputSource source( xmlFile );
QXmlSimpleReader reader;
reader.setContentHandler( &handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
#endif
#ifdef USE_DOM
if (!xmlFile.open( IO_ReadOnly ))
{ {
qFatal("Could not read %s",argv[1] ); QListIterator<ICompound> cli(dox->getCompoundIterator());
} ICompound *comp;
QDomDocument doc; printf("--- compound list ---------\n");
doc.setContent( &xmlFile ); for (cli.toFirst();(comp=cli.current());++cli)
{
QDomElement de = doc.documentElement(); printf("Compound name=%s id=%s kind=%s\n",
comp->name().data(),comp->id().data(),comp->kind().data());
printf("docElem=%s\n",de.tagName().data()); QListIterator<ISection> sli(comp->getSectionIterator());
ISection *sec;
QDomNode n = de.firstChild(); for (sli.toFirst();(sec=sli.current());++sli)
while( !n.isNull() )
{ {
QDomElement e = n.toElement(); // try to convert the node to an element. printf(" Section kind=%s\n",sec->kind().data());
if( !e.isNull() ) QListIterator<IMember> mli(sec->getMemberIterator());
{ // the node was really an element. IMember *mem;
printf("direct child %s id=%s kind=%s\n", for (mli.toFirst();(mem=mli.current());++mli)
e.tagName().data(), {
e.attribute("id").data(), printf(" Member type=%s name=%s\n",mem->type().data(),mem->name().data());
e.attribute("kind").data() QListIterator<IParam> pli(mem->getParamIterator());
); IParam *par;
for (pli.toFirst();(par=pli.current());++pli)
{
printf(" Param type=%s name=%s defvalue=%s\n",
par->type().data(),par->definitionName().data(),par->defaultValue().data());
}
} }
n = n.nextSibling(); }
}
printf("---------------------------\n");
} }
#endif delete dox;
return 0; return 0;
} }
......
...@@ -13,6 +13,7 @@ ...@@ -13,6 +13,7 @@
* *
*/ */
#include <qxml.h>
#include "mainhandler.h" #include "mainhandler.h"
void MainHandler::startCompound(const QXmlAttributes& attrib) void MainHandler::startCompound(const QXmlAttributes& attrib)
...@@ -20,9 +21,10 @@ void MainHandler::startCompound(const QXmlAttributes& attrib) ...@@ -20,9 +21,10 @@ void MainHandler::startCompound(const QXmlAttributes& attrib)
CompoundHandler *compHandler = new CompoundHandler(this); CompoundHandler *compHandler = new CompoundHandler(this);
compHandler->startCompound(attrib); compHandler->startCompound(attrib);
m_compounds.append(compHandler); m_compounds.append(compHandler);
m_compoundDict.insert(compHandler->id(),compHandler);
} }
MainHandler::MainHandler() MainHandler::MainHandler() : m_compoundDict(10007)
{ {
m_compounds.setAutoDelete(TRUE); m_compounds.setAutoDelete(TRUE);
addStartHandler("doxygen"); addStartHandler("doxygen");
...@@ -33,6 +35,45 @@ MainHandler::MainHandler() ...@@ -33,6 +35,45 @@ MainHandler::MainHandler()
MainHandler::~MainHandler() MainHandler::~MainHandler()
{ {
printf("MainHandler::~MainHandler()\n");
} }
class ErrorHandler : public QXmlErrorHandler
{
public:
virtual ~ErrorHandler() {}
bool warning( const QXmlParseException & )
{
return FALSE;
}
bool error( const QXmlParseException & )
{
return FALSE;
}
bool fatalError( const QXmlParseException &exception )
{
fprintf(stderr,"Fatal error at line %d column %d: %s\n",
exception.lineNumber(),exception.columnNumber(),
exception.message().data());
return FALSE;
}
QString errorString() { return ""; }
private:
QString errorMsg;
};
IDoxygen *createObjectModelFromXML(const char * xmlFileName)
{
QFile xmlFile(xmlFileName);
MainHandler * handler = new MainHandler;
ErrorHandler errorHandler;
QXmlInputSource source( xmlFile );
QXmlSimpleReader reader;
reader.setContentHandler( handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
return handler;
}
...@@ -19,15 +19,28 @@ ...@@ -19,15 +19,28 @@
#include <qlist.h> #include <qlist.h>
#include "basehandler.h" #include "basehandler.h"
#include "compoundhandler.h" #include "compoundhandler.h"
#include "doxmlintf.h"
class MainHandler : public BaseHandler<MainHandler> class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
{ {
public: public:
virtual void startCompound(const QXmlAttributes& attrib); virtual void startCompound(const QXmlAttributes& attrib);
MainHandler(); MainHandler();
virtual ~MainHandler(); virtual ~MainHandler();
// IDoxygen
QListIterator<ICompound> getCompoundIterator() const
{
return m_compounds;
}
ICompound *getCompoundById(const QString &id) const
{
return m_compoundDict[id];
}
private: private:
QList<CompoundHandler> m_compounds; QList<ICompound> m_compounds;
QDict<ICompound> m_compoundDict;
}; };
#endif #endif
...@@ -22,10 +22,11 @@ ...@@ -22,10 +22,11 @@
#include "basehandler.h" #include "basehandler.h"
#include "paramhandler.h" #include "paramhandler.h"
#include "doxmlintf.h"
class DocHandler; class DocHandler;
class MemberHandler : public BaseHandler<MemberHandler> class MemberHandler : public IMember, public BaseHandler<MemberHandler>
{ {
public: public:
virtual void startMember(const QXmlAttributes& attrib); virtual void startMember(const QXmlAttributes& attrib);
...@@ -38,6 +39,16 @@ class MemberHandler : public BaseHandler<MemberHandler> ...@@ -38,6 +39,16 @@ class MemberHandler : public BaseHandler<MemberHandler>
MemberHandler(IBaseHandler *parent); MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler(); virtual ~MemberHandler();
// IMember
virtual QString kind() const { return m_kind; }
virtual QString id() const { return m_id; }
virtual QString protection() const { return m_protection; }
virtual QString virtualness() const { return m_virtualness; }
virtual QString type() const { return m_type; }
virtual QString name() const { return m_name; }
virtual QListIterator<IParam> getParamIterator() const { return m_params; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_kind; QString m_kind;
...@@ -48,7 +59,7 @@ class MemberHandler : public BaseHandler<MemberHandler> ...@@ -48,7 +59,7 @@ class MemberHandler : public BaseHandler<MemberHandler>
QString m_name; QString m_name;
DocHandler *m_brief; DocHandler *m_brief;
DocHandler *m_detailed; DocHandler *m_detailed;
QList<ParamHandler> m_params; QList<IParam> m_params;
}; };
#endif #endif
...@@ -21,8 +21,9 @@ ...@@ -21,8 +21,9 @@
#include <qxml.h> #include <qxml.h>
#include "basehandler.h" #include "basehandler.h"
#include "doxmlintf.h"
class ParamHandler : public BaseHandler<ParamHandler> class ParamHandler : public IParam, public BaseHandler<ParamHandler>
{ {
public: public:
virtual void startParam(const QXmlAttributes& attrib); virtual void startParam(const QXmlAttributes& attrib);
...@@ -36,6 +37,15 @@ class ParamHandler : public BaseHandler<ParamHandler> ...@@ -36,6 +37,15 @@ class ParamHandler : public BaseHandler<ParamHandler>
ParamHandler(IBaseHandler *parent); ParamHandler(IBaseHandler *parent);
virtual ~ParamHandler(); virtual ~ParamHandler();
// IParam
virtual QString type() const { return m_type; }
virtual QString declarationName() const { return m_declName; }
virtual QString definitionName() const { return m_defName; }
virtual QString attrib() const { return m_attrib; }
virtual QString arraySpecifier() const { return m_array; }
virtual QString defaultValue() const { return m_defVal; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_type; QString m_type;
......
...@@ -22,8 +22,9 @@ ...@@ -22,8 +22,9 @@
#include "basehandler.h" #include "basehandler.h"
#include "memberhandler.h" #include "memberhandler.h"
#include "doxmlintf.h"
class SectionHandler : public BaseHandler<SectionHandler> class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{ {
public: public:
virtual void startMember(const QXmlAttributes& attrib); virtual void startMember(const QXmlAttributes& attrib);
...@@ -32,10 +33,15 @@ class SectionHandler : public BaseHandler<SectionHandler> ...@@ -32,10 +33,15 @@ class SectionHandler : public BaseHandler<SectionHandler>
SectionHandler(IBaseHandler *parent); SectionHandler(IBaseHandler *parent);
virtual ~SectionHandler(); virtual ~SectionHandler();
// ISection
virtual QString kind() const { return m_kind; }
virtual QListIterator<IMember> getMemberIterator() const { return m_members; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_kind; QString m_kind;
QList<MemberHandler> m_members; QList<IMember> m_members;
}; };
#endif #endif
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
\usepackage{a4wide} \usepackage{a4wide}
\usepackage{makeidx} \usepackage{makeidx}
\usepackage{fancyhdr} \usepackage{fancyhdr}
\usepackage{float}
\usepackage{graphicx} \usepackage{graphicx}
\usepackage{epsf} \usepackage{epsf}
\usepackage{doxygen} \usepackage{doxygen}
......
...@@ -514,13 +514,17 @@ Compilation is now done by performing the following steps: ...@@ -514,13 +514,17 @@ Compilation is now done by performing the following steps:
\subsection install_bin_windows Installating the binaries on Windows \subsection install_bin_windows Installating the binaries on Windows
There is no fancy installation procedure at the moment (if anyone wants There is no fancy installation procedure at the moment (if anyone can
to add it please let me know). add it in a location independent way please let me know).
To install doxygen, just copy the binaries from the <code>bin</code> directory To install doxygen, just copy the binaries from the <code>bin</code> directory
to a location somewhere in the path. Alternatively, you can include to a location somewhere in the path. Alternatively, you can include
the <code>bin</code> directory of the distribution to the path. the <code>bin</code> directory of the distribution to the path.
For running doxywizard you need to install the non-commercial version of
the Qt library first. This library can be downloaded from
http://www.trolltech.com/products/download/freelicense/noncommercial-dl.html
\subsection build_tools Tools used to develop doxygen \subsection build_tools Tools used to develop doxygen
Doxygen was developed and tested under Linux using the following Doxygen was developed and tested under Linux using the following
......
...@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means ...@@ -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 that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time. languages other than English (the default) at configuration time.
Currently (version 1.2.10), 24 languages Currently (version 1.2.10-20010909), 24 languages
are supported (sorted alphabetically): are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish, Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German, Dutch, English, Finnish, French, German,
......
...@@ -184,7 +184,8 @@ During parsing the following steps take place: ...@@ -184,7 +184,8 @@ During parsing the following steps take place:
<li> The special commands inside the documentation are executed. See <li> The special commands inside the documentation are executed. See
section \ref commands for an overview of all commands. section \ref commands for an overview of all commands.
<li> If a line starts with some whitespace followed by one or more asterixes <li> If a line starts with some whitespace followed by one or more asterixes
(<tt>*</tt>) then the whitespace and asterixes are removed. (<tt>*</tt>) and then optionally more whitespace,
then all whitespace and asterixes are removed.
<li> All resulting blank lines are treated as a paragraph separators. <li> All resulting blank lines are treated as a paragraph separators.
This saves you from placing new-paragraph commands yourself This saves you from placing new-paragraph commands yourself
in order to make the generated documentation readable. in order to make the generated documentation readable.
......
...@@ -55,6 +55,28 @@ ...@@ -55,6 +55,28 @@
# equal prototypes from the base class and from the derived # equal prototypes from the base class and from the derived
# classes (if they should be considered equal). # classes (if they should be considered equal).
# #
# 2001/08/28
# - "see details" added to the up-to-date translator list
# (in translator report) to translators for which some details
# are listed below in the report. This is usually the case
# when the up-to-date translator still implements a obsolete
# method that will never be called (i.e. the code should be removed).
#
# 2001/09/10
# - The script now always exits with 0. If the sources are not
# found, translator report is not generated. If the $flangdoc
# is not also found and no sources are available, the simplified
# result with remarks inside is generated from the template.
# The consequences, translator.pl should never break the "make",
# and the language.doc should always be present after running
# this script -- no problem should occur when generating doxygen
# documentation.
#
# 2001/09/11
# - Minor (say cosmetic) enhancement. The code for generating
# the simplified language.doc from the template was moved to
# the separate function CopyTemplateToLanguageDoc().
#
################################################################ ################################################################
use 5.005; use 5.005;
...@@ -642,6 +664,64 @@ xxxTABLE_FOOTxxx ...@@ -642,6 +664,64 @@ xxxTABLE_FOOTxxx
} }
##}}} ##}}}
################################################################
# CopyTemplateToLanguageDoc takes the $flangtpl template and
# generates $flangdoc without using information from other
# sources. This function is called when source files were not found.
# The marks inside the template are replaced by warning-like
# explanations that something could not be done because sources
# were not available. Writes directly to the file, returns nothing.
#
sub CopyTemplateToLanguageDoc ##{{{
{
# The template file will be the source.
#
my $fin = "$docdir/$flangtpl";
# Let's open the template and read it all into one string.
#
open(FIN, "< $fin") or die "\nError when open < $fin: $!";
my @content = <FIN>;
close FIN;
my $cont = join("", @content);
# Replace the template marks by some notices.
#
$cont =~ s{<notice>.+?</notice>}
{Warning: this file was generated from the $flangtpl template
* by the $0 script. As doxygen sources were not available
* in that time, some information could not be extracted
* and inserted into this file.
*
* Do not edit this file. Edit the above mentioned files!}sx;
$cont =~ s{\$version}{$doxversion};
$cont =~ s{\$numlang}
{<b>[number of supported languages could not be extracted -- no sources]</b>};
$cont =~ s{\$languages}
{<b>[names of languages could not be extracted -- no sources]</b>};
$cont =~ s{\$information_table}
{<b>[Information table could not be extracted -- no sources.]</b>};
$cont =~ s{\$translator_report_file_name}
{$ftranslatortxt <b>[translator report could not be
generated -- no sources]</b>}x;
$cont =~ s{\$translator_report_link}{<b>[no sources, no link]</b>};
# Let's open the output file and copy the template content there.
#
my $fout = "$docdir/$flangdoc";
open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
print FOUT $cont;
close FOUT;
}
##}}}
################################################################ ################################################################
# Body # Body
...@@ -672,16 +752,42 @@ print STDERR "\n\n"; ...@@ -672,16 +752,42 @@ print STDERR "\n\n";
##}}} ##}}}
# The translator base class must be present. Exit otherwise. #{{{ # The translator base class must be present. Exit otherwise,
# but be kind to those who already have the documentation
# generated by this script ready, but who do not have sources.
# If no $flangdoc is present, copy the template to it. #{{{
#
if (!-f "$srcdir/translator.h") {
print STDERR "\nThe $0 warning:\n"
. "\tThe translator.h not found in $srcdir.\n"
. "\tThe $ftranslatortxt will not be "
. "generated (you don't need it).\n";
# $flangdoc is present, copy the template to it.
#
if (!-f "$docdir/$flangdoc") {
# Copy the template document to $flandoc with simplified
# replacement of the markers inside the template.
#
CopyTemplateToLanguageDoc();
# Generate the warning about $flangdoc content.
# #
if (!-f "$srcdir/translator.h") print STDERR "\nThe $0 warning:\n"
{ . "\tThe $flangdoc not found in the '$docdir' directory.\n"
print STDERR "\n\nThe translator.h not found in $srcdir.\n\n\a"; . "\tThe $flangtpl template content copied into it.\n"
exit 1; . "\tAs the sources are not available, some information\n"
. "\tcould not be extracted and inserted into $flangdoc.\n";
}
# Exit as if nothing happened.
#
exit 0;
} }
##}}} ##}}}
# Find all translator_xx.h files. #{{{ # Find all translator_xx.h file names. #{{{
# #
my @entries = (); # init my @entries = (); # init
...@@ -700,9 +806,12 @@ print STDERR "\n\n"; ...@@ -700,9 +806,12 @@ print STDERR "\n\n";
my @expected = GetPureVirtualFrom("$srcdir/translator.h"); my @expected = GetPureVirtualFrom("$srcdir/translator.h");
# The details for translators will be collected into the output # The details for translators will be collected into the output
# string. # string. If some details are listed for a translator, the flag
# will be set to produce possible warning to the list of
# up-to-date translators.
# #
my $output = ''; my $output = '';
my %details = ();
# Remove the argument identifiers from the method prototypes # Remove the argument identifiers from the method prototypes
# to get only the required form of the prototype. Fill the # to get only the required form of the prototype. Fill the
...@@ -728,7 +837,8 @@ print STDERR "\n\n"; ...@@ -728,7 +837,8 @@ print STDERR "\n\n";
foreach (@files) { foreach (@files) {
# Get the information from the sources. Remember the base # Get the information from the sources. Remember the base
# class for each of the classes. #{{{ # class for each of the classes. Clear the flag for
# details for the class. #{{{
# #
my @info = GetInfoFrom("$srcdir/$_"); my @info = GetInfoFrom("$srcdir/$_");
...@@ -736,6 +846,8 @@ print STDERR "\n\n"; ...@@ -736,6 +846,8 @@ print STDERR "\n\n";
my $base = shift @info; my $base = shift @info;
$cb{$class} = $base; $cb{$class} = $base;
$details{$class} = 0;
##}}} ##}}}
# Set the value of the required methods to 1 (true). Let # Set the value of the required methods to 1 (true). Let
...@@ -822,6 +934,11 @@ print STDERR "\n\n"; ...@@ -822,6 +934,11 @@ print STDERR "\n\n";
$output .= "\nObsolete methods (should be removed):\n\n"; $output .= "\nObsolete methods (should be removed):\n\n";
foreach (sort @old_methods) { $output .= " $_\n"; } foreach (sort @old_methods) { $output .= " $_\n"; }
} }
# Some details were listed, set the details flag for
# the class.
#
$details{$class} = 1;
} }
##}}} ##}}}
} }
...@@ -863,15 +980,26 @@ print STDERR "\n\n"; ...@@ -863,15 +980,26 @@ print STDERR "\n\n";
. "release. Anyway, there\n" . "release. Anyway, there\n"
. "still may be some details listed even for " . "still may be some details listed even for "
. "the up-to-date translators.\n" . "the up-to-date translators.\n"
. "Please, check the text below.\n\n"; . "Please, check the text below if the translator "
. "is marked so.\n\n";
foreach (@list) { foreach (@list) {
# Print the class name.
#
print FOUT " $_"; print FOUT " $_";
# For almost up-to-date translators, show also the base class. # For almost up-to-date translators, show also the base class.
# #
if ($cb{$_} ne 'Translator') { print FOUT "\t($cb{$_})"; } if ($cb{$_} ne 'Translator') { print FOUT "\t($cb{$_})"; }
# If some details were listed for the translator class,
# add a notice.
#
if ($details{$_}) {
print FOUT "\t-- see details below in the report";
}
print FOUT "\n"; print FOUT "\n";
} }
} }
......
Name: doxygen Name: doxygen
Version: 1.2.10_20010909 Version: 1.2.10_20010923
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 4 Release: 4
Source: doxygen-%{version}.src.tar.gz Source: doxygen-%{version}.src.tar.gz
......
...@@ -53,6 +53,14 @@ class BufStr : public QCString ...@@ -53,6 +53,14 @@ class BufStr : public QCString
} }
offset+=s; offset+=s;
} }
void resize( uint newlen )
{
QCString::resize(newlen);
if (offset>newlen)
{
offset=newlen;
}
}
private: private:
uint offset; uint offset;
const int spareRoom; // 10Kb extra room to avoid frequent resizing const int spareRoom; // 10Kb extra room to avoid frequent resizing
......
...@@ -700,6 +700,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -700,6 +700,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
//printf("Class %s brief=`%s' doc=`%s'\n",name().data(),briefDescription().data(),documentation().data()); //printf("Class %s brief=`%s' doc=`%s'\n",name().data(),briefDescription().data(),documentation().data());
bool exampleFlag=hasExamples();
// write brief description // write brief description
OutputList briefOutput(&ol); OutputList briefOutput(&ol);
if (!briefDescription().isEmpty()) if (!briefDescription().isEmpty())
...@@ -710,7 +711,14 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -710,7 +711,14 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details"); ol.startTextLink(0,"_details");
if (Config_getBool("REPEAT_BRIEF") ||
!documentation().isEmpty() ||
exampleFlag
)
{
parseText(ol,theTranslator->trMore()); parseText(ol,theTranslator->trMore());
}
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState(); ol.popGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
...@@ -1032,7 +1040,6 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -1032,7 +1040,6 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endMemberSections(); ol.endMemberSections();
// write detailed description // write detailed description
bool exampleFlag=hasExamples();
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) || if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty() || !documentation().isEmpty() ||
/*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/ /*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
......
...@@ -228,9 +228,10 @@ static void startCodeLine() ...@@ -228,9 +228,10 @@ static void startCodeLine()
} }
static void endFontClass();
static void endCodeLine() static void endCodeLine()
{ {
if (g_currentFontClass) { g_code->endFontClass(); } endFontClass();
g_code->endCodeLine(); g_code->endCodeLine();
} }
...@@ -1720,6 +1721,10 @@ void parseCode(OutputDocInterface &od,const char *className,const QCString &s, ...@@ -1720,6 +1721,10 @@ void parseCode(OutputDocInterface &od,const char *className,const QCString &s,
BEGIN( Body ); BEGIN( Body );
codeYYlex(); codeYYlex();
endFontClass(); endFontClass();
if (g_inputLines==1)
{
g_code->endCodeLine();
}
od.append(g_code); od.append(g_code);
delete g_code; delete g_code;
return; return;
......
...@@ -126,7 +126,7 @@ static void writeBitmapBox(DiagramItem *di,Image *image, ...@@ -126,7 +126,7 @@ static void writeBitmapBox(DiagramItem *di,Image *image,
{ {
int colFill = hasDocs ? (firstRow ? 0 : 2) : 7; int colFill = hasDocs ? (firstRow ? 0 : 2) : 7;
int colBorder = (firstRow || !hasDocs) ? 1 : 3; int colBorder = (firstRow || !hasDocs) ? 1 : 3;
int l = stringLength(di->label()); int l = Image::stringLength(di->label());
uint mask=virtToMask(di->virtualness()); uint mask=virtToMask(di->virtualness());
image->fillRect(x+1,y+1,w-2,h-2,colFill,mask); image->fillRect(x+1,y+1,w-2,h-2,colFill,mask);
image->drawRect(x,y,w,h,colBorder,mask); image->drawRect(x,y,w,h,colBorder,mask);
...@@ -463,7 +463,7 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos) ...@@ -463,7 +463,7 @@ void TreeDiagram::computeExtremes(uint *maxLabelLen,uint *maxXPos)
{ {
if (di->isInList()) done=TRUE; if (di->isInList()) done=TRUE;
if (maxXPos) mx=QMAX(mx,(uint)di->xPos()); if (maxXPos) mx=QMAX(mx,(uint)di->xPos());
if (maxLabelLen) ml=QMAX(ml,stringLength(di->label())); if (maxLabelLen) ml=QMAX(ml,Image::stringLength(di->label()));
di=dr->next(); di=dr->next();
} }
dr=next(); dr=next();
......
...@@ -431,7 +431,7 @@ void DotNode::write(QTextStream &t, ...@@ -431,7 +431,7 @@ void DotNode::write(QTextStream &t,
void DotNode::writeXML(QTextStream &t) void DotNode::writeXML(QTextStream &t)
{ {
t << " <node id=\"" << m_number << "\">" << endl; t << " <node id=\"" << m_number << "\">" << endl;
t << " <label>" << m_label << "</label>" << endl; t << " <label>" << convertToXML(m_label) << "</label>" << endl;
if (!m_url.isEmpty()) if (!m_url.isEmpty())
{ {
QCString url(m_url); QCString url(m_url);
...@@ -475,12 +475,12 @@ void DotNode::writeXML(QTextStream &t) ...@@ -475,12 +475,12 @@ void DotNode::writeXML(QTextStream &t)
while ((ni=edgeInfo->m_label.find("\\n",p))!=-1) while ((ni=edgeInfo->m_label.find("\\n",p))!=-1)
{ {
t << " <edgelabel>" t << " <edgelabel>"
<< edgeInfo->m_label.mid(p,ni-p) << convertToXML(edgeInfo->m_label.mid(p,ni-p))
<< "</edgelabel>" << endl; << "</edgelabel>" << endl;
p=ni+2; p=ni+2;
} }
t << " <edgelabel>" t << " <edgelabel>"
<< edgeInfo->m_label.right(edgeInfo->m_label.length()-p) << convertToXML(edgeInfo->m_label.right(edgeInfo->m_label.length()-p))
<< "</edgelabel>" << endl; << "</edgelabel>" << endl;
} }
t << " </childnode>" << endl; t << " </childnode>" << endl;
......
...@@ -1281,13 +1281,14 @@ static MemberDef *addVariableToClass( ...@@ -1281,13 +1281,14 @@ static MemberDef *addVariableToClass(
{ {
Debug::print(Debug::Variables,0, Debug::print(Debug::Variables,0,
" class variable:\n" " class variable:\n"
" %s' %s'::`%s' `%s' prot=`%d ann=%d\n", " %s' %s'::`%s' `%s' prot=`%d ann=%d init=%s\n",
root->type.data(), root->type.data(),
scope.data(), scope.data(),
name.data(), name.data(),
root->args.data(), root->args.data(),
root->protection, root->protection,
fromAnnScope fromAnnScope,
root->initializer.data()
); );
// class friends may be templatized // class friends may be templatized
...@@ -6132,6 +6133,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest) ...@@ -6132,6 +6133,7 @@ static void copyAndFilterFile(const char *fileName,BufStr &dest)
for (i=0;i<size;i++,p++) *p=conv[*p]; for (i=0;i<size;i++,p++) *p=conv[*p];
// and translate CR's // and translate CR's
int newSize=filterCRLF(dest.data()+oldPos,size); int newSize=filterCRLF(dest.data()+oldPos,size);
//printf("filter char at %p size=%d newSize=%d\n",dest.data()+oldPos,size,newSize);
if (newSize!=size) // we removed chars if (newSize!=size) // we removed chars
{ {
dest.resize(newSize); // resize the array dest.resize(newSize); // resize the array
......
...@@ -49,8 +49,8 @@ static const char *defaultStyleSheet = ...@@ -49,8 +49,8 @@ static const char *defaultStyleSheet =
"DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n" "DIV.fragment { width: 100%; border: none; background-color: #eeeeee }\n"
"DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }\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.md { background-color: #f2f2ff; font-weight: bold; }\n"
"TD.mdname1 { background-color: #f2f2ff; font-weight: bold; font-style: italic; }\n" "TD.mdname1 { background-color: #f2f2ff; font-weight: bold; color: #602020; }\n"
"TD.mdname { background-color: #f2f2ff; font-weight: bold; font-style: italic; width: 600px; }\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.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" "DIV.groupText { margin-left: 16px; font-style: italic; font-size: smaller }\n"
"FONT.keyword { color: #008000 }\n" "FONT.keyword { color: #008000 }\n"
...@@ -801,21 +801,32 @@ void HtmlGenerator::endMemberSubtitle() ...@@ -801,21 +801,32 @@ void HtmlGenerator::endMemberSubtitle()
void HtmlGenerator::startIndexList() void HtmlGenerator::startIndexList()
{ {
t << "<ul>" << endl; t << "<table>" << endl;
//if (Config_getBool("GENERATE_HTMLHELP"))
//{
// if (htmlHelp->depth()==0) htmlHelp->addItem(lastTitle,lastFile);
// htmlHelp->incDepth();
//}
} }
void HtmlGenerator::endIndexList() void HtmlGenerator::endIndexList()
{ {
t << "</ul>" << endl; t << "</table>" << endl;
//if (Config_getBool("GENERATE_HTMLHELP")) }
//{
// htmlHelp->decDepth(); void HtmlGenerator::startIndexKey()
//} {
t << " <tr bgcolor=\"#f0f0f0\"><td>";
}
void HtmlGenerator::endIndexKey()
{
t << "</td>";
}
void HtmlGenerator::startIndexValue()
{
t << "<td>";
}
void HtmlGenerator::endIndexValue(const char *)
{
t << "</td></tr>" << endl;
} }
void HtmlGenerator::startAlphabeticalIndexList() void HtmlGenerator::startAlphabeticalIndexList()
......
...@@ -66,6 +66,10 @@ class HtmlGenerator : public OutputGenerator ...@@ -66,6 +66,10 @@ class HtmlGenerator : public OutputGenerator
void writeString(const char *text); void writeString(const char *text);
void startIndexList(); void startIndexList();
void endIndexList(); void endIndexList();
void startIndexKey();
void endIndexKey();
void startIndexValue();
void endIndexValue(const char *);
void startItemList() { t << "<ul>" << endl; } void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; } void endItemList() { t << "</ul>" << endl; }
void startEnumList() { t << "<ol>" << endl; } void startEnumList() { t << "<ol>" << endl; }
...@@ -215,7 +219,7 @@ class HtmlGenerator : public OutputGenerator ...@@ -215,7 +219,7 @@ class HtmlGenerator : public OutputGenerator
void startDescTableTitle() void startDescTableTitle()
{ t << "<tr><td valign=top><em>"; } { t << "<tr><td valign=top><em>"; }
void endDescTableTitle() void endDescTableTitle()
{ t << endl << "</em>&nbsp;</td>"; } { t << "</em>&nbsp;</td>"; }
void startDescTableData() void startDescTableData()
{ t << "<td>" << endl; } { t << "<td>" << endl; }
void endDescTableData() void endDescTableData()
......
...@@ -250,7 +250,7 @@ void Image::writeString(int x,int y,const char *s,uchar fg) ...@@ -250,7 +250,7 @@ void Image::writeString(int x,int y,const char *s,uchar fg)
} }
} }
uint stringLength(const char *s) uint Image::stringLength(const char *s)
{ {
int w=0; int w=0;
if (s) if (s)
......
...@@ -41,6 +41,7 @@ class Image ...@@ -41,6 +41,7 @@ class Image
uint getWidth() const { return width; } uint getWidth() const { return width; }
uint getHeight() const { return height; } uint getHeight() const { return height; }
uchar *getData() const { return data; } uchar *getData() const { return data; }
static uint stringLength(const char *s);
private: private:
int width; int width;
......
...@@ -347,7 +347,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -347,7 +347,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
{ {
if (!started) if (!started)
{ {
ol.startIndexList(); ol.startItemList();
if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE; started=TRUE;
...@@ -396,7 +396,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper) ...@@ -396,7 +396,7 @@ void writeClassTree(OutputList &ol,BaseClassList *bcl,bool hideSuper)
} }
if (started) if (started)
{ {
ol.endIndexList(); ol.endItemList();
if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth();
} }
...@@ -550,7 +550,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started) ...@@ -550,7 +550,7 @@ static void writeClassTreeForList(OutputList &ol,ClassSDict *cl,bool &started)
{ {
if (!started) if (!started)
{ {
ol.startIndexList(); ol.startItemList();
if (hasHtmlHelp) htmlHelp->incContentsDepth(); if (hasHtmlHelp) htmlHelp->incContentsDepth();
if (hasFtvHelp) ftvHelp->incContentsDepth(); if (hasFtvHelp) ftvHelp->incContentsDepth();
started=TRUE; started=TRUE;
...@@ -621,7 +621,7 @@ void writeClassHierarchy(OutputList &ol) ...@@ -621,7 +621,7 @@ void writeClassHierarchy(OutputList &ol)
writeClassTreeForList(ol,&Doxygen::hiddenClasses,started); writeClassTreeForList(ol,&Doxygen::hiddenClasses,started);
if (started) if (started)
{ {
ol.endIndexList(); ol.endItemList();
if (hasHtmlHelp) htmlHelp->decContentsDepth(); if (hasHtmlHelp) htmlHelp->decContentsDepth();
if (hasFtvHelp) ftvHelp->decContentsDepth(); if (hasFtvHelp) ftvHelp->decContentsDepth();
} }
...@@ -875,6 +875,7 @@ void writeFileIndex(OutputList &ol) ...@@ -875,6 +875,7 @@ void writeFileIndex(OutputList &ol)
if (!path.isEmpty()) fullName.prepend(path+"/"); if (!path.isEmpty()) fullName.prepend(path+"/");
// --------------- LaTeX/RTF only ------------------------- // --------------- LaTeX/RTF only -------------------------
#if 0
if (doc) if (doc)
{ {
ol.pushGeneratorState(); ol.pushGeneratorState();
...@@ -887,22 +888,22 @@ void writeFileIndex(OutputList &ol) ...@@ -887,22 +888,22 @@ void writeFileIndex(OutputList &ol)
if (!fd->briefDescription().isEmpty()) if (!fd->briefDescription().isEmpty())
{ {
ol.docify(" ("); ol.docify(" (");
OutputList briefOutput(&ol); parseDoc(ol,fd->absFilePath(),1,
parseDoc(briefOutput,fd->absFilePath(),1,
0,0, 0,0,
abbreviate(fd->briefDescription(),fd->name())); abbreviate(fd->briefDescription(),fd->name()));
ol+=briefOutput;
ol.docify(")"); ol.docify(")");
} }
ol.writeEndAnnoItem(fd->getOutputFileBase()); ol.writeEndAnnoItem(fd->getOutputFileBase());
ol.popGeneratorState(); ol.popGeneratorState();
} }
#endif
// -------------------------------------------------------- // --------------------------------------------------------
// ----------------- HTML only ---------------------------- // ----------------- HTML only ----------------------------
ol.pushGeneratorState(); //ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html); //ol.disableAllBut(OutputGenerator::Html);
ol.writeListItem(); //ol.writeListItem();
ol.startIndexKey();
ol.docify(path); ol.docify(path);
if (doc) if (doc)
{ {
...@@ -932,25 +933,29 @@ void writeFileIndex(OutputList &ol) ...@@ -932,25 +933,29 @@ void writeFileIndex(OutputList &ol)
} }
if (src) if (src)
{ {
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.docify(" "); ol.docify(" ");
ol.startTextLink(fd->includeName(),0); ol.startTextLink(fd->includeName(),0);
ol.docify("["); ol.docify("[");
parseText(ol,theTranslator->trCode()); parseText(ol,theTranslator->trCode());
ol.docify("]"); ol.docify("]");
ol.endTextLink(); ol.endTextLink();
ol.popGeneratorState();
} }
ol.endIndexKey();
ol.startIndexValue();
if (!fd->briefDescription().isEmpty()) if (!fd->briefDescription().isEmpty())
{ {
ol.docify(" ("); //ol.docify(" (");
OutputList briefOutput(&ol); parseDoc(ol,
parseDoc(briefOutput,
fd->absFilePath(),1, fd->absFilePath(),1,
0,0, 0,0,
abbreviate(fd->briefDescription(),fd->name())); abbreviate(fd->briefDescription(),fd->name()));
ol+=briefOutput; //ol.docify(")");
ol.docify(")");
} }
ol.popGeneratorState(); ol.endIndexValue(fd->getOutputFileBase());
//ol.popGeneratorState();
// -------------------------------------------------------- // --------------------------------------------------------
} }
fd=fl->next(); fd=fl->next();
...@@ -1039,19 +1044,22 @@ void writeNamespaceIndex(OutputList &ol) ...@@ -1039,19 +1044,22 @@ void writeNamespaceIndex(OutputList &ol)
ol.startIndexList(); ol.startIndexList();
first=FALSE; first=FALSE;
} }
ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name()); //ol.writeStartAnnoItem("namespace",nd->getOutputFileBase(),0,nd->name());
ol.startIndexKey();
ol.writeObjectLink(0,nd->getOutputFileBase(),0,nd->name());
ol.endIndexKey();
ol.startIndexValue();
if (!nd->briefDescription().isEmpty()) if (!nd->briefDescription().isEmpty())
{ {
ol.docify(" ("); //ol.docify(" (");
OutputList briefOutput(&ol); parseDoc(ol,
parseDoc(briefOutput,
nd->getDefFileName(),nd->getDefLine(), nd->getDefFileName(),nd->getDefLine(),
nd->name(),0, nd->name(),0,
abbreviate(nd->briefDescription(),nd->name())); abbreviate(nd->briefDescription(),nd->name()));
ol+=briefOutput; //ol.docify(")");
ol.docify(")");
} }
ol.writeEndAnnoItem(nd->getOutputFileBase()); ol.endIndexValue(nd->getOutputFileBase());
//ol.writeEndAnnoItem(nd->getOutputFileBase());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase()); htmlHelp->addContentsItem(FALSE,nd->name(),nd->getOutputFileBase());
...@@ -1112,19 +1120,22 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -1112,19 +1120,22 @@ void writeAnnotatedClassList(OutputList &ol)
if (cd->isLinkableInProject() && cd->templateMaster()==0) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
QCString type=cd->compoundTypeString(); QCString type=cd->compoundTypeString();
ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName()); //ol.writeStartAnnoItem(type,cd->getOutputFileBase(),0,cd->displayName());
ol.startIndexKey();
ol.writeObjectLink(0,cd->getOutputFileBase(),0,cd->displayName());
ol.endIndexKey();
ol.startIndexValue();
if (!cd->briefDescription().isEmpty()) if (!cd->briefDescription().isEmpty())
{ {
ol.docify(" ("); //ol.docify(" (");
OutputList briefOutput(&ol); parseDoc(ol,
parseDoc(briefOutput,
cd->getDefFileName(),cd->getDefLine(), cd->getDefFileName(),cd->getDefLine(),
cd->name(),0, cd->name(),0,
abbreviate(cd->briefDescription(),cd->name())); abbreviate(cd->briefDescription(),cd->name()));
ol+=briefOutput; //ol.docify(")");
ol.docify(")");
} }
ol.writeEndAnnoItem(cd->getOutputFileBase()); ol.endIndexValue(cd->getOutputFileBase());
//ol.writeEndAnnoItem(cd->getOutputFileBase());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
HtmlHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase()); HtmlHelp::getInstance()->addContentsItem(FALSE,cd->name(),cd->getOutputFileBase());
...@@ -1152,19 +1163,23 @@ void writePackageList(OutputList &ol) ...@@ -1152,19 +1163,23 @@ void writePackageList(OutputList &ol)
{ {
if (!pd->isReference()) if (!pd->isReference())
{ {
ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name()); //ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
ol.startIndexKey();
ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name());
ol.endIndexKey();
ol.startIndexValue();
if (!pd->briefDescription().isEmpty()) if (!pd->briefDescription().isEmpty())
{ {
ol.docify(" ("); //ol.docify(" (");
OutputList briefOutput(&ol); parseDoc(ol,
parseDoc(briefOutput,
pd->getDefFileName(),pd->getDefLine(), pd->getDefFileName(),pd->getDefLine(),
pd->name(),0, pd->name(),0,
abbreviate(pd->briefDescription(),pd->name())); abbreviate(pd->briefDescription(),pd->name()));
ol+=briefOutput; //ol.docify(")");
ol.docify(")");
} }
ol.writeEndAnnoItem(pd->getOutputFileBase()); ol.endIndexValue(pd->getOutputFileBase());
//ol.writeEndAnnoItem(pd->getOutputFileBase());
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase()); HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
...@@ -1967,7 +1982,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -1967,7 +1982,7 @@ void writeExampleIndex(OutputList &ol)
parseText(ol,theTranslator->trExamplesDescription()); parseText(ol,theTranslator->trExamplesDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
ol.startIndexList(); ol.startItemList();
PageSDictIterator pdi(*Doxygen::exampleSDict); PageSDictIterator pdi(*Doxygen::exampleSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
...@@ -1988,7 +2003,7 @@ void writeExampleIndex(OutputList &ol) ...@@ -1988,7 +2003,7 @@ void writeExampleIndex(OutputList &ol)
} }
ol.writeString("\n"); ol.writeString("\n");
} }
ol.endIndexList(); ol.endItemList();
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
...@@ -2071,7 +2086,7 @@ void writePageIndex(OutputList &ol) ...@@ -2071,7 +2086,7 @@ void writePageIndex(OutputList &ol)
parseText(ol,theTranslator->trRelatedPagesDescription()); parseText(ol,theTranslator->trRelatedPagesDescription());
//ol.newParagraph(); //ol.newParagraph();
ol.endTextBlock(); ol.endTextBlock();
ol.startIndexList(); ol.startItemList();
PageSDictIterator pdi(*Doxygen::pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
PageInfo *pi=0; PageInfo *pi=0;
for (pdi.toFirst();(pi=pdi.current());++pdi) for (pdi.toFirst();(pi=pdi.current());++pdi)
...@@ -2105,7 +2120,7 @@ void writePageIndex(OutputList &ol) ...@@ -2105,7 +2120,7 @@ void writePageIndex(OutputList &ol)
if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle); if (hasFtvHelp) ftvHelp->addContentsItem(FALSE,0,pageName,0,pageTitle);
} }
} }
ol.endIndexList(); ol.endItemList();
if (hasHtmlHelp) if (hasHtmlHelp)
{ {
htmlHelp->decContentsDepth(); htmlHelp->decContentsDepth();
...@@ -2258,12 +2273,12 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) ...@@ -2258,12 +2273,12 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
// write subgroups // write subgroups
if (hasSubGroups) if (hasSubGroups)
{ {
ol.startIndexList(); ol.startItemList();
for (gli.toLast();(subgd=gli.current());--gli) for (gli.toLast();(subgd=gli.current());--gli)
{ {
writeGroupTreeNode(ol,subgd,TRUE); writeGroupTreeNode(ol,subgd,TRUE);
} }
ol.endIndexList(); ol.endItemList();
} }
...@@ -2463,14 +2478,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel) ...@@ -2463,14 +2478,14 @@ void writeGroupTreeNode(OutputList &ol, GroupDef *gd,bool subLevel)
void writeGroupHierarchy(OutputList &ol) void writeGroupHierarchy(OutputList &ol)
{ {
ol.startIndexList(); ol.startItemList();
GroupListIterator gli(Doxygen::groupList); GroupListIterator gli(Doxygen::groupList);
GroupDef *gd; GroupDef *gd;
for (;(gd=gli.current());++gli) for (;(gd=gli.current());++gli)
{ {
writeGroupTreeNode(ol,gd,FALSE); writeGroupTreeNode(ol,gd,FALSE);
} }
ol.endIndexList(); ol.endItemList();
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -906,6 +906,26 @@ void LatexGenerator::writeEndAnnoItem(const char *name) ...@@ -906,6 +906,26 @@ void LatexGenerator::writeEndAnnoItem(const char *name)
t << "}{\\pageref{" << name << "}}{}" << endl; t << "}{\\pageref{" << name << "}}{}" << endl;
} }
void LatexGenerator::startIndexKey()
{
t << "\\item\\contentsline{section}{";
}
void LatexGenerator::endIndexKey()
{
}
void LatexGenerator::startIndexValue()
{
t << " (";
}
void LatexGenerator::endIndexValue(const char *name)
{
t << ")";
t << "}{\\pageref{" << name << "}}{}" << endl;
}
//void LatexGenerator::writeClassLink(const char *,const char *, //void LatexGenerator::writeClassLink(const char *,const char *,
// const char *,const char *name) // const char *,const char *name)
//{ //{
...@@ -1530,7 +1550,7 @@ void LatexGenerator::startImage(const char *name,const char *size,bool hasCaptio ...@@ -1530,7 +1550,7 @@ void LatexGenerator::startImage(const char *name,const char *size,bool hasCaptio
{ {
if (hasCaption) if (hasCaption)
{ {
t << "\\begin{figure}[h]" << endl; t << "\\begin{figure}[H]" << endl;
t << "\\begin{center}" << endl; t << "\\begin{center}" << endl;
} }
else else
......
...@@ -63,6 +63,10 @@ class LatexGenerator : public OutputGenerator ...@@ -63,6 +63,10 @@ class LatexGenerator : public OutputGenerator
void writeString(const char *text); void writeString(const char *text);
void startIndexList() { t << "\\begin{CompactList}" << endl; } void startIndexList() { t << "\\begin{CompactList}" << endl; }
void endIndexList() { t << "\\end{CompactList}" << endl; } void endIndexList() { t << "\\end{CompactList}" << endl; }
void startIndexKey();
void endIndexKey();
void startIndexValue();
void endIndexValue(const char *);
void startItemList() { t << "\\begin{CompactItemize}" << endl; } void startItemList() { t << "\\begin{CompactItemize}" << endl; }
void endItemList() { t << "\\end{CompactItemize}" << endl; } void endItemList() { t << "\\end{CompactItemize}" << endl; }
void startEnumList() { t << "\\begin{enumerate}" << endl; } void startEnumList() { t << "\\begin{enumerate}" << endl; }
......
...@@ -61,6 +61,10 @@ class ManGenerator : public OutputGenerator ...@@ -61,6 +61,10 @@ class ManGenerator : public OutputGenerator
void writeString(const char *text); void writeString(const char *text);
void startIndexList() {} void startIndexList() {}
void endIndexList() { newParagraph(); } void endIndexList() { newParagraph(); }
void startIndexKey() {}
void endIndexKey() {}
void startIndexValue() {}
void endIndexValue(const char *) {}
void startItemList() {} void startItemList() {}
void endItemList() { newParagraph(); } void endItemList() { newParagraph(); }
void startEnumList() {} void startEnumList() {}
......
...@@ -1653,6 +1653,8 @@ MemberDef *MemberDef::createTemplateInstanceMember( ...@@ -1653,6 +1653,8 @@ MemberDef *MemberDef::createTemplateInstanceMember(
bool MemberDef::hasOneLineInitializer() const bool MemberDef::hasOneLineInitializer() const
{ {
//printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
// name().data(),init.data(),initLines,maxInitLines,userInitLines);
return !init.isEmpty() && initLines==0 && // one line initializer return !init.isEmpty() && initLines==0 && // one line initializer
((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly ((maxInitLines>0 && userInitLines==-1) || userInitLines>0); // enabled by default or explicitly
} }
...@@ -1664,3 +1666,12 @@ bool MemberDef::hasMultiLineInitializer() const ...@@ -1664,3 +1666,12 @@ bool MemberDef::hasMultiLineInitializer() const
|| initLines<userInitLines // explicitly enabled || initLines<userInitLines // explicitly enabled
); );
} }
void MemberDef::setInitializer(const char *initializer)
{
init=initializer;
int p=init.length()-1;
while (p>=0 && isspace(init.at(p))) p--;
init=init.left(p+1);
initLines=init.contains('\n');
}
...@@ -139,10 +139,7 @@ class MemberDef : public Definition ...@@ -139,10 +139,7 @@ class MemberDef : public Definition
void setProtection(Protection p) { prot=p; } void setProtection(Protection p) { prot=p; }
void setMemberSpecifiers(int s) { memSpec=s; } void setMemberSpecifiers(int s) { memSpec=s; }
void mergeMemberSpecifiers(int s) { memSpec|=s; } void mergeMemberSpecifiers(int s) { memSpec|=s; }
void setInitializer(const char *i) { init=i; void setInitializer(const char *i);
//init=init.stripWhiteSpace();
initLines=init.contains('\n');
}
void setBitfields(const char *s) { bitfields = s; } void setBitfields(const char *s) { bitfields = s; }
void setMaxInitLines(int lines) { userInitLines=lines; } void setMaxInitLines(int lines) { userInitLines=lines; }
void setMemberClass(ClassDef *cd); void setMemberClass(ClassDef *cd);
......
...@@ -314,6 +314,10 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -314,6 +314,10 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void endTitleHead(const char *fileName,const char *name) = 0; virtual void endTitleHead(const char *fileName,const char *name) = 0;
virtual void startIndexList() = 0; virtual void startIndexList() = 0;
virtual void endIndexList() = 0; virtual void endIndexList() = 0;
virtual void startIndexKey() = 0;
virtual void endIndexKey() = 0;
virtual void startIndexValue() = 0;
virtual void endIndexValue(const char *) = 0;
virtual void startAlphabeticalIndexList() = 0; virtual void startAlphabeticalIndexList() = 0;
virtual void endAlphabeticalIndexList() = 0; virtual void endAlphabeticalIndexList() = 0;
virtual void writeIndexHeading(const char *s) = 0; virtual void writeIndexHeading(const char *s) = 0;
......
...@@ -105,6 +105,14 @@ class OutputList : public OutputDocInterface ...@@ -105,6 +105,14 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startIndexList); } { forall(&OutputGenerator::startIndexList); }
void endIndexList() void endIndexList()
{ forall(&OutputGenerator::endIndexList); } { forall(&OutputGenerator::endIndexList); }
void startIndexKey()
{ forall(&OutputGenerator::startIndexKey); }
void endIndexKey()
{ forall(&OutputGenerator::endIndexKey); }
void startIndexValue()
{ forall(&OutputGenerator::startIndexValue); }
void endIndexValue(const char *name)
{ forall(&OutputGenerator::endIndexValue,name); }
void startItemList() void startItemList()
{ forall(&OutputGenerator::startItemList); } { forall(&OutputGenerator::startItemList); }
void endItemList() void endItemList()
......
...@@ -877,6 +877,7 @@ void RTFGenerator::startFile(const char *name,const char *, ...@@ -877,6 +877,7 @@ void RTFGenerator::startFile(const char *name,const char *,
void RTFGenerator::endFile() void RTFGenerator::endFile()
{ {
DBG_RTF(t << "{\\comment endFile}\n")
t << "}"; t << "}";
endPlainFile(); endPlainFile();
...@@ -1410,7 +1411,6 @@ void RTFGenerator::startItemList() ...@@ -1410,7 +1411,6 @@ void RTFGenerator::startItemList()
t << "{"; t << "{";
incrementIndentLevel(); incrementIndentLevel();
listItemInfo[m_listLevel].isEnum = FALSE; listItemInfo[m_listLevel].isEnum = FALSE;
//t << Rtf_Style_Reset << Rtf_BList_DepthStyle();
} }
/*! end bullet list */ /*! end bullet list */
...@@ -1421,9 +1421,6 @@ void RTFGenerator::endItemList() ...@@ -1421,9 +1421,6 @@ void RTFGenerator::endItemList()
t << "}"; t << "}";
decrementIndentLevel(); decrementIndentLevel();
m_omitParagraph=TRUE; m_omitParagraph=TRUE;
//t << Rtf_Style_Reset << styleStack.top() << endl;
//printf("RTFGenerator::endItemList() `%s'\n",styleStack.top());
//newParagraph();
} }
/*! start enumeration list */ /*! start enumeration list */
...@@ -1571,6 +1568,39 @@ void RTFGenerator::writeEndAnnoItem(const char *name) ...@@ -1571,6 +1568,39 @@ void RTFGenerator::writeEndAnnoItem(const char *name)
newParagraph(); newParagraph();
} }
void RTFGenerator::startIndexKey()
{
DBG_RTF(t << "{\\comment (startIndexKey)}" << endl)
t << "{\\b ";
}
void RTFGenerator::endIndexKey()
{
}
void RTFGenerator::startIndexValue()
{
t << " (";
}
void RTFGenerator::endIndexValue(const char *name)
{
DBG_RTF(t << "{\\comment (endIndexKey)}" << endl)
t << ")";
t << "} ";
if (name)
{
t << "\\tab ";
WriteRTFReference(name);
t << endl;
}
else
{
t << endl;
}
newParagraph();
}
void RTFGenerator::startSubsection() void RTFGenerator::startSubsection()
{ {
//beginRTFSubSection(); //beginRTFSubSection();
...@@ -1937,7 +1967,7 @@ void RTFGenerator::startDescList(SectionTypes) ...@@ -1937,7 +1967,7 @@ void RTFGenerator::startDescList(SectionTypes)
void RTFGenerator::endDescTitle() void RTFGenerator::endDescTitle()
{ {
DBG_RTF(t << "{\\comment (endDescTitle) }" << endl) DBG_RTF(t << "{\\comment (endDescTitle) }" << endl)
endBold(); //endBold();
newParagraph(); newParagraph();
//t << Rtf_Style_Reset << styleStack.top(); //t << Rtf_Style_Reset << styleStack.top();
incrementIndentLevel(); incrementIndentLevel();
...@@ -1948,6 +1978,7 @@ void RTFGenerator::startParamList(ParamListTypes) ...@@ -1948,6 +1978,7 @@ void RTFGenerator::startParamList(ParamListTypes)
{ {
DBG_RTF(t << "{\\comment (startParamList)}" << endl) DBG_RTF(t << "{\\comment (startParamList)}" << endl)
t << "{"; t << "{";
incrementIndentLevel();
newParagraph(); newParagraph();
} }
...@@ -2182,6 +2213,7 @@ void RTFGenerator::endCodeFragment() ...@@ -2182,6 +2213,7 @@ void RTFGenerator::endCodeFragment()
//styleStack.pop(); //styleStack.pop();
//printf("RTFGenerator::endCodeFrament() top=%s\n",styleStack.top()); //printf("RTFGenerator::endCodeFrament() top=%s\n",styleStack.top());
//t << Rtf_Style_Reset << styleStack.top() << endl; //t << Rtf_Style_Reset << styleStack.top() << endl;
DBG_RTF(t << "{\\comment (endCodeFragment) }" << endl)
t << "}" << endl; t << "}" << endl;
m_omitParagraph = TRUE; m_omitParagraph = TRUE;
} }
...@@ -2382,8 +2414,8 @@ void RTFGenerator::startTextBlock(bool dense) ...@@ -2382,8 +2414,8 @@ void RTFGenerator::startTextBlock(bool dense)
void RTFGenerator::endTextBlock() void RTFGenerator::endTextBlock()
{ {
newParagraph(); newParagraph();
t << "}" << endl;
DBG_RTF(t << "{\\comment End TextBlock}" << endl) DBG_RTF(t << "{\\comment End TextBlock}" << endl)
t << "}" << endl;
m_omitParagraph = TRUE; m_omitParagraph = TRUE;
} }
...@@ -2395,12 +2427,14 @@ void RTFGenerator::newParagraph() ...@@ -2395,12 +2427,14 @@ void RTFGenerator::newParagraph()
void RTFGenerator::startMemberSubtitle() void RTFGenerator::startMemberSubtitle()
{ {
DBG_RTF(t << "{\\comment startMemberSubtitle}" << endl)
t << "{" << endl; t << "{" << endl;
t << Rtf_Style_Reset << Rtf_CList_DepthStyle() << endl; t << Rtf_Style_Reset << Rtf_CList_DepthStyle() << endl;
} }
void RTFGenerator::endMemberSubtitle() void RTFGenerator::endMemberSubtitle()
{ {
DBG_RTF(t << "{\\comment endMemberSubtitle}" << endl)
newParagraph(); newParagraph();
t << "}" << endl; t << "}" << endl;
} }
......
...@@ -58,12 +58,16 @@ class RTFGenerator : public OutputGenerator ...@@ -58,12 +58,16 @@ class RTFGenerator : public OutputGenerator
void startTitleHead(const char *); void startTitleHead(const char *);
void startTitle(); void startTitle();
void endTitleHead(const char *,const char *name); void endTitleHead(const char *,const char *name);
void endTitle() {}; //{ t << "}"; } void endTitle() {}
void newParagraph(); void newParagraph();
void writeString(const char *text); void writeString(const char *text);
void startIndexList(); void startIndexList();
void endIndexList(); void endIndexList();
void startIndexKey();
void endIndexKey();
void startIndexValue();
void endIndexValue(const char *);
void startItemList(); void startItemList();
void endItemList(); void endItemList();
void startEnumList(); void startEnumList();
......
...@@ -235,12 +235,18 @@ static void lineCount() ...@@ -235,12 +235,18 @@ static void lineCount()
static void addType( Entry* current ) static void addType( Entry* current )
{ {
if( current->type.length() ) uint tl=current->type.length();
if( tl>0 && !current->name.isEmpty() && current->type.at(tl-1)!='.')
{
current->type += ' ' ; current->type += ' ' ;
}
current->type += current->name ; current->type += current->name ;
current->name.resize(0) ; current->name.resize(0) ;
if( current->type.length() ) tl=current->type.length();
if( tl>0 && !current->args.isEmpty() && current->type.at(tl-1)!='.')
{
current->type += ' ' ; current->type += ' ' ;
}
current->type += current->args ; current->type += current->args ;
current->args.resize(0) ; current->args.resize(0) ;
current->argList->clear(); current->argList->clear();
...@@ -443,6 +449,7 @@ UL [uU][lL] ...@@ -443,6 +449,7 @@ UL [uU][lL]
OL [oO][lL] OL [oO][lL]
DL [dD][lL] DL [dD][lL]
TITLE [tT][iI][tT][lL][eE] TITLE [tT][iI][tT][lL][eE]
CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
%option noyywrap %option noyywrap
...@@ -531,7 +538,6 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -531,7 +538,6 @@ TITLE [tT][iI][tT][lL][eE]
%x FileDocArg2 %x FileDocArg2
%x ExampleDoc %x ExampleDoc
%x ExampleDocArg1 %x ExampleDocArg1
%x EnumDoc
%x EnumDocArg1 %x EnumDocArg1
%x FuncPtr %x FuncPtr
%x EndFuncPtr %x EndFuncPtr
...@@ -633,9 +639,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -633,9 +639,7 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN( FindMembers ); BEGIN( FindMembers );
} }
} }
<NextSemi>"'"\\[0-7]{1,3}"'" <NextSemi>{CHARLIT}
<NextSemi>"'"\\."'"
<NextSemi>"'".{1,4}"'"
<NextSemi>\" { <NextSemi>\" {
lastStringContext=NextSemi; lastStringContext=NextSemi;
BEGIN(SkipString); BEGIN(SkipString);
...@@ -1148,6 +1152,12 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1148,6 +1152,12 @@ TITLE [tT][iI][tT][lL][eE]
BEGIN(FindMembers); BEGIN(FindMembers);
} }
} }
<FindMembers>"." {
if (insideJava)
{
current->name+=".";
}
}
<FindMembers>"::" { <FindMembers>"::" {
current->name+=yytext; current->name+=yytext;
} }
...@@ -1388,9 +1398,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1388,9 +1398,7 @@ TITLE [tT][iI][tT][lL][eE]
initializerSharpCount--; initializerSharpCount--;
current->initializer+=*yytext; current->initializer+=*yytext;
} }
<ReadInitializer>"'"\\[0-7]{1,3}"'" | <ReadInitializer>{CHARLIT} { current->initializer+=yytext; }
<ReadInitializer>"'"\\."'" |
<ReadInitializer>"'".{1,4}"'" { current->initializer+=yytext; }
<ReadInitializer>\n { <ReadInitializer>\n {
current->initializer+=*yytext; current->initializer+=*yytext;
yyLineNr++; yyLineNr++;
...@@ -1438,9 +1446,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1438,9 +1446,7 @@ TITLE [tT][iI][tT][lL][eE]
yyLineNr++; yyLineNr++;
*pCopyRoundString+=*yytext; *pCopyRoundString+=*yytext;
} }
<CopyRound>"'"\\[0-7]{1,3}"'" { *pCopyRoundString+=yytext; } <CopyRound>{CHARLIT} { *pCopyRoundString+=yytext; }
<CopyRound>"'"\\."'" { *pCopyRoundString+=yytext; }
<CopyRound>"'".{1,4}"'" { *pCopyRoundString+=yytext; }
<CopyRound>[^"'()\n]+ { <CopyRound>[^"'()\n]+ {
*pCopyRoundString+=yytext; *pCopyRoundString+=yytext;
} }
...@@ -1461,9 +1467,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1461,9 +1467,7 @@ TITLE [tT][iI][tT][lL][eE]
if (--curlyCount<0) if (--curlyCount<0)
BEGIN(lastCurlyContext); BEGIN(lastCurlyContext);
} }
<CopyCurly>"'"\\[0-7]{1,3}"'" { *pCopyCurlyString+=yytext; } <CopyCurly>{CHARLIT} { *pCopyCurlyString+=yytext; }
<CopyCurly>"'"\\."'" { *pCopyCurlyString+=yytext; }
<CopyCurly>"'".{1,4}"'" { *pCopyCurlyString+=yytext; }
<CopyCurly>[^"'{}\/\n]+ { <CopyCurly>[^"'{}\/\n]+ {
*pCopyCurlyString+=yytext; *pCopyCurlyString+=yytext;
} }
...@@ -1623,9 +1627,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1623,9 +1627,7 @@ TITLE [tT][iI][tT][lL][eE]
lastContext = ReadBody ; lastContext = ReadBody ;
BEGIN( Comment ) ; BEGIN( Comment ) ;
} }
<ReadBody>"'"\\[0-7]{1,3}"'" { current->program += yytext; } <ReadBody>{CHARLIT} { current->program += yytext; }
<ReadBody>"'"\\."'" { current->program += yytext; }
<ReadBody>"'".{1,4}"'" { current->program += yytext; }
<ReadBody>"{" { current->program += yytext ; <ReadBody>"{" { current->program += yytext ;
++curlyCount ; ++curlyCount ;
} }
...@@ -2052,15 +2054,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2052,15 +2054,7 @@ TITLE [tT][iI][tT][lL][eE]
fullArgString+=*yytext; fullArgString+=*yytext;
BEGIN( lastCopyArgStringContext ); BEGIN( lastCopyArgStringContext );
} }
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'"\\[0-7]{1,3}"'" { <ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>{CHARLIT} {
*copyArgString+=yytext;
fullArgString+=yytext;
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'"\\."'" {
*copyArgString+=yytext;
fullArgString+=yytext;
}
<ReadFuncArgType,ReadTempArgs,CopyArgRound,CopyArgSharp>"'".{1,4}"'" {
*copyArgString+=yytext; *copyArgString+=yytext;
fullArgString+=yytext; fullArgString+=yytext;
} }
...@@ -2294,13 +2288,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2294,13 +2288,7 @@ TITLE [tT][iI][tT][lL][eE]
current = tempEntry; current = tempEntry;
BEGIN( lastCurlyContext ); BEGIN( lastCurlyContext );
} }
<SkipCurly>"'"\\[0-7]{1,3}"'" { <SkipCurly>{CHARLIT} {
//addToBody(yytext);
}
<SkipCurly>"'"\\."'" {
//addToBody(yytext);
}
<SkipCurly>"'".{1,4}"'" {
//addToBody(yytext); //addToBody(yytext);
} }
<SkipCurly>\" { <SkipCurly>\" {
...@@ -3321,6 +3309,9 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -3321,6 +3309,9 @@ TITLE [tT][iI][tT][lL][eE]
addSection(); addSection();
BEGIN(PageDoc); BEGIN(PageDoc);
} }
<SectionTitle>[^\n*]* {
sectionTitle+=yytext;
}
<SectionTitle>"*" { <SectionTitle>"*" {
sectionTitle+=yytext; sectionTitle+=yytext;
} }
......
...@@ -473,7 +473,7 @@ ClassDef *getResolvedClass( ...@@ -473,7 +473,7 @@ ClassDef *getResolvedClass(
{ {
// strip * and & from n // strip * and & from n
int ip=subst.length()-1; int ip=subst.length()-1;
while (subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ') ip--; while (ip>=0 && (subst.at(ip)=='*' || subst.at(ip)=='&' || subst.at(ip)==' ')) ip--;
subst=subst.left(ip+1); subst=subst.left(ip+1);
if (pIsTypeDef) *pIsTypeDef=TRUE; if (pIsTypeDef) *pIsTypeDef=TRUE;
......
...@@ -296,7 +296,6 @@ class XMLGenerator : public OutputDocInterface ...@@ -296,7 +296,6 @@ class XMLGenerator : public OutputDocInterface
} }
void startCodeFragment() void startCodeFragment()
{ {
startParMode();
m_t << "<programlisting>"; m_t << "<programlisting>";
} }
void endCodeFragment() void endCodeFragment()
...@@ -305,7 +304,6 @@ class XMLGenerator : public OutputDocInterface ...@@ -305,7 +304,6 @@ class XMLGenerator : public OutputDocInterface
} }
void startPreFragment() void startPreFragment()
{ {
startParMode();
m_t << "<programlisting>"; m_t << "<programlisting>";
} }
void endPreFragment() void endPreFragment()
...@@ -416,11 +414,10 @@ class XMLGenerator : public OutputDocInterface ...@@ -416,11 +414,10 @@ class XMLGenerator : public OutputDocInterface
int i;for (i=0;i<num;i++) m_t << "&nbsp;"; int i;for (i=0;i<num;i++) m_t << "&nbsp;";
} }
//// TODO: translate these as well....
void writeObjectLink(const char *ref,const char *file, void writeObjectLink(const char *ref,const char *file,
const char *anchor, const char *text) const char *anchor, const char *text)
{ {
startParMode();
writeXMLLink(m_t,ref,file,anchor,text); writeXMLLink(m_t,ref,file,anchor,text);
} }
void writeCodeLink(const char *ref,const char *file, void writeCodeLink(const char *ref,const char *file,
...@@ -748,13 +745,15 @@ void writeXMLDocBlock(QTextStream &t, ...@@ -748,13 +745,15 @@ void writeXMLDocBlock(QTextStream &t,
const QCString &name, const QCString &name,
const QCString &text) const QCString &text)
{ {
if (text.stripWhiteSpace().isEmpty()) return;
XMLGenerator *xmlGen = new XMLGenerator; XMLGenerator *xmlGen = new XMLGenerator;
xmlGen->startParMode();
parseDoc(*xmlGen, parseDoc(*xmlGen,
fileName, // input definition file fileName, // input definition file
lineNr, // input definition line lineNr, // input definition line
scope, // scope (which should not be linked to) scope, // scope (which should not be linked to)
name, // member (which should not be linked to) name, // member (which should not be linked to)
text // actual text text+"\n" // actual text
); );
xmlGen->endParMode(); xmlGen->endParMode();
t << xmlGen->getContents(); t << xmlGen->getContents();
...@@ -979,6 +978,7 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) ...@@ -979,6 +978,7 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
// + standard member sections // + standard member sections
// + detailed member documentation // + detailed member documentation
if (cd->isReference()) return; // skip external references.
if (cd->name().find('@')!=-1) return; // skip anonymous compounds. if (cd->name().find('@')!=-1) return; // skip anonymous compounds.
if (cd->templateMaster()!=0) return; // skip generated template instances. if (cd->templateMaster()!=0) return; // skip generated template instances.
t << " <compounddef id=\"" t << " <compounddef id=\""
...@@ -989,7 +989,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) ...@@ -989,7 +989,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
t << "</compoundname>" << endl; t << "</compoundname>" << endl;
if (cd->baseClasses()->count()>0) if (cd->baseClasses()->count()>0)
{ {
//t << " <basecompoundlist>" << endl;
BaseClassListIterator bcli(*cd->baseClasses()); BaseClassListIterator bcli(*cd->baseClasses());
BaseClassDef *bcd; BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli) for (bcli.toFirst();(bcd=bcli.current());++bcli)
...@@ -1012,11 +1011,9 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) ...@@ -1012,11 +1011,9 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
} }
t << "\"/>" << endl; t << "\"/>" << endl;
} }
//t << " </basecompoundlist>" << endl;
} }
if (cd->subClasses()->count()>0) if (cd->subClasses()->count()>0)
{ {
//t << " <derivedcompoundlist>" << endl;
BaseClassListIterator bcli(*cd->subClasses()); BaseClassListIterator bcli(*cd->subClasses());
BaseClassDef *bcd; BaseClassDef *bcd;
for (bcli.toFirst();(bcd=bcli.current());++bcli) for (bcli.toFirst();(bcd=bcli.current());++bcli)
...@@ -1039,7 +1036,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t) ...@@ -1039,7 +1036,6 @@ void generateXMLForClass(ClassDef *cd,QTextStream &t)
} }
t << "\"/>" << endl; t << "\"/>" << endl;
} }
//t << " </derivedcompoundlist>" << endl;
} }
int numMembers = int numMembers =
cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+ cd->pubTypes.count()+cd->pubMembers.count()+cd->pubAttribs.count()+
...@@ -1120,6 +1116,7 @@ void generateXMLFileSection(FileDef *fd,QTextStream &t,MemberList *ml,const char ...@@ -1120,6 +1116,7 @@ void generateXMLFileSection(FileDef *fd,QTextStream &t,MemberList *ml,const char
void generateXMLForFile(FileDef *fd,QTextStream &t) void generateXMLForFile(FileDef *fd,QTextStream &t)
{ {
if (fd->isReference()) return; // skip external references
t << " <compounddef id=\"" t << " <compounddef id=\""
<< fd->getOutputFileBase() << "\" kind=\"file\">" << endl; << fd->getOutputFileBase() << "\" kind=\"file\">" << endl;
t << " <compoundname>"; t << " <compoundname>";
......
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