Commit 4fbc3452 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.18-20021106

parent afc47efd
DOXYGEN Version 1.2.18-20021030 DOXYGEN Version 1.2.18-20021106
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (30 October 2002) Dimitri van Heesch (06 November 2002)
DOXYGEN Version 1.2.18_20021030 DOXYGEN Version 1.2.18_20021106
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) (30 October 2002) Dimitri van Heesch (dimitri@stack.nl) (06 November 2002)
1.2.18-20021030 1.2.18-20021106
...@@ -159,10 +159,13 @@ class IDoc ...@@ -159,10 +159,13 @@ class IDoc
Row, // 27 -> IDocRow Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection Section, // 29 -> IDocSection
Preformatted, // 30 -> IDocPreformatted Verbatim, // 30 -> IDocVerbatim
Verbatim, // 31 -> IDocVerbatim Copy, // 31 -> IDocCopy
Symbol, // 32 -> IDocSymbol TocList, // 32 -> IDocTocList
Root // 33 -> IDocRoot TocItem, // 33 -> IDocTocItem
Anchor, // 34 -> IDocAnchor
Symbol, // 35 -> IDocSymbol
Root // 36 -> IDocRoot
}; };
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
}; };
...@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc ...@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc
public: public:
enum Markup enum Markup
{ {
Normal = 0x00, Normal = 0x000,
Bold = 0x01, Bold = 0x001,
Emphasis = 0x02, Emphasis = 0x002,
ComputerOutput = 0x04, ComputerOutput = 0x004,
Subscript = 0x08, Subscript = 0x008,
Superscript = 0x10, Superscript = 0x010,
SmallFont = 0x20, SmallFont = 0x020,
Center = 0x40 Center = 0x040,
Preformatted = 0x080,
Heading = 0x100
}; };
}; };
...@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup ...@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup
public: public:
virtual const IString * text() const = 0; virtual const IString * text() const = 0;
virtual int markup() const = 0; virtual int markup() const = 0;
virtual int headingLevel() const = 0;
}; };
class IDocMarkupModifier : public IDoc class IDocMarkupModifier : public IDoc
...@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc ...@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc
public: public:
virtual bool enabled() const = 0; virtual bool enabled() const = 0;
virtual int markup() const = 0; virtual int markup() const = 0;
virtual int headingLevel() const = 0;
}; };
class IDocItemizedList : public IDoc class IDocItemizedList : public IDoc
...@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc ...@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc
class IDocVariableListEntry : public IDoc class IDocVariableListEntry : public IDoc
{ {
public: public:
virtual const IString * term() const = 0; virtual ILinkedTextIterator * term() const = 0;
virtual IDocPara *description() const = 0; virtual IDocPara *description() const = 0;
}; };
...@@ -393,7 +400,20 @@ class IDocSection : public IDoc ...@@ -393,7 +400,20 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0; virtual IDocIterator *title() const = 0;
}; };
class IDocPreformatted : public IDoc class IDocTocList : public IDoc
{
public:
virtual IDocIterator *elements() const = 0;
};
class IDocTocItem : public IDoc
{
public:
virtual const IString *id() const = 0;
virtual const IString *title() const = 0;
};
class IDocCopy : public IDoc
{ {
public: public:
virtual IDocIterator *contents() const = 0; virtual IDocIterator *contents() const = 0;
...@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc ...@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc
class IDocVerbatim : public IDoc class IDocVerbatim : public IDoc
{ {
public: public:
enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
virtual const IString *text() const = 0; virtual const IString *text() const = 0;
virtual Types type() const = 0;
};
class IDocAnchor : public IDoc
{
public:
virtual const IString *id() const = 0;
}; };
class IDocSymbol : public IDoc class IDocSymbol : public IDoc
......
...@@ -19,7 +19,9 @@ ...@@ -19,7 +19,9 @@
#include "debug.h" #include "debug.h"
#include "graphhandler.h" #include "graphhandler.h"
#include "sectionhandler.h" #include "sectionhandler.h"
#include "paramhandler.h"
#include "loamhandler.h" #include "loamhandler.h"
#include "memberhandler.h"
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
This diff is collapsed.
This diff is collapsed.
...@@ -159,10 +159,13 @@ class IDoc ...@@ -159,10 +159,13 @@ class IDoc
Row, // 27 -> IDocRow Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection Section, // 29 -> IDocSection
Preformatted, // 30 -> IDocPreformatted Verbatim, // 30 -> IDocVerbatim
Verbatim, // 31 -> IDocVerbatim Copy, // 31 -> IDocCopy
Symbol, // 32 -> IDocSymbol TocList, // 32 -> IDocTocList
Root // 33 -> IDocRoot TocItem, // 33 -> IDocTocItem
Anchor, // 34 -> IDocAnchor
Symbol, // 35 -> IDocSymbol
Root // 36 -> IDocRoot
}; };
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
}; };
...@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc ...@@ -172,14 +175,16 @@ class IDocMarkup : public IDoc
public: public:
enum Markup enum Markup
{ {
Normal = 0x00, Normal = 0x000,
Bold = 0x01, Bold = 0x001,
Emphasis = 0x02, Emphasis = 0x002,
ComputerOutput = 0x04, ComputerOutput = 0x004,
Subscript = 0x08, Subscript = 0x008,
Superscript = 0x10, Superscript = 0x010,
SmallFont = 0x20, SmallFont = 0x020,
Center = 0x40 Center = 0x040,
Preformatted = 0x080,
Heading = 0x100
}; };
}; };
...@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup ...@@ -194,6 +199,7 @@ class IDocText : public IDocMarkup
public: public:
virtual const IString * text() const = 0; virtual const IString * text() const = 0;
virtual int markup() const = 0; virtual int markup() const = 0;
virtual int headingLevel() const = 0;
}; };
class IDocMarkupModifier : public IDoc class IDocMarkupModifier : public IDoc
...@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc ...@@ -201,6 +207,7 @@ class IDocMarkupModifier : public IDoc
public: public:
virtual bool enabled() const = 0; virtual bool enabled() const = 0;
virtual int markup() const = 0; virtual int markup() const = 0;
virtual int headingLevel() const = 0;
}; };
class IDocItemizedList : public IDoc class IDocItemizedList : public IDoc
...@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc ...@@ -278,7 +285,7 @@ class IDocVariableList : public IDoc
class IDocVariableListEntry : public IDoc class IDocVariableListEntry : public IDoc
{ {
public: public:
virtual const IString * term() const = 0; virtual ILinkedTextIterator * term() const = 0;
virtual IDocPara *description() const = 0; virtual IDocPara *description() const = 0;
}; };
...@@ -393,7 +400,20 @@ class IDocSection : public IDoc ...@@ -393,7 +400,20 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0; virtual IDocIterator *title() const = 0;
}; };
class IDocPreformatted : public IDoc class IDocTocList : public IDoc
{
public:
virtual IDocIterator *elements() const = 0;
};
class IDocTocItem : public IDoc
{
public:
virtual const IString *id() const = 0;
virtual const IString *title() const = 0;
};
class IDocCopy : public IDoc
{ {
public: public:
virtual IDocIterator *contents() const = 0; virtual IDocIterator *contents() const = 0;
...@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc ...@@ -402,7 +422,15 @@ class IDocPreformatted : public IDoc
class IDocVerbatim : public IDoc class IDocVerbatim : public IDoc
{ {
public: public:
enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
virtual const IString *text() const = 0; virtual const IString *text() const = 0;
virtual Types type() const = 0;
};
class IDocAnchor : public IDoc
{
public:
virtual const IString *id() const = 0;
}; };
class IDocSymbol : public IDoc class IDocSymbol : public IDoc
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include "compoundhandler.h" #include "compoundhandler.h"
#include "sectionhandler.h" #include "sectionhandler.h"
#include "graphhandler.h" #include "graphhandler.h"
#include "dochandler.h"
#include "memberhandler.h"
#include "debug.h" #include "debug.h"
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
#define _MAINHANDLER_H #define _MAINHANDLER_H
#include <qlist.h> #include <qlist.h>
#include "basehandler.h"
#include "compoundhandler.h"
#include <doxmlintf.h> #include <doxmlintf.h>
#include "memberhandler.h" #include "basehandler.h"
class CompoundHandler;
struct CompoundEntry; struct CompoundEntry;
struct IndexEntry struct IndexEntry
......
...@@ -18,6 +18,8 @@ ...@@ -18,6 +18,8 @@
#include "dochandler.h" #include "dochandler.h"
#include "mainhandler.h" #include "mainhandler.h"
#include "linkedtexthandler.h" #include "linkedtexthandler.h"
#include "paramhandler.h"
#include "compoundhandler.h"
#include "debug.h" #include "debug.h"
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
...@@ -451,4 +453,60 @@ IMemberIterator *MemberHandler::enumValues() const ...@@ -451,4 +453,60 @@ IMemberIterator *MemberHandler::enumValues() const
return new MemberIterator(m_enumValues); return new MemberIterator(m_enumValues);
} }
ILinkedTextIterator *MemberHandler::type() const
{
return new LinkedTextIterator(m_type);
}
const IString *MemberHandler::typeString() const
{
MemberHandler *that = (MemberHandler *)this;
that->m_typeString = LinkedTextHandler::toString(m_type);
return &m_typeString;
}
IParamIterator *MemberHandler::parameters() const
{
return new ParamIterator(m_params);
}
IParamIterator *MemberHandler::templateParameters() const
{
return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0;
}
IMemberReferenceIterator *MemberHandler::references() const
{
return new MemberReferenceIterator(m_references);
}
IMemberReferenceIterator *MemberHandler::referencedBy() const
{
return new MemberReferenceIterator(m_referencedBy);
}
ILinkedTextIterator *MemberHandler::initializer() const
{
return new LinkedTextIterator(m_initializer);
}
ILinkedTextIterator *MemberHandler::exceptions() const
{
return new LinkedTextIterator(m_exception);
}
IMemberReferenceIterator *MemberHandler::reimplementedBy() const
{
return new MemberReferenceIterator(m_reimplementedBy);
}
IDocRoot *MemberHandler::briefDescription() const
{
return m_brief;
}
IDocRoot *MemberHandler::detailedDescription() const
{
return m_detailed;
}
...@@ -23,14 +23,15 @@ ...@@ -23,14 +23,15 @@
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
#include "paramhandler.h" #include "stringimpl.h"
#include "linkedtexthandler.h"
#include "dochandler.h"
class MainHandler; class MainHandler;
class CompoundHandler; class CompoundHandler;
class SectionHandler; class SectionHandler;
class ParamHandler; class ParamHandler;
class LinkedTextImpl;
class LinkedTextHandler;
class DocHandler;
struct MemberReference : public IMemberReference struct MemberReference : public IMemberReference
{ {
...@@ -159,25 +160,14 @@ class MemberHandler : public IDefine, ...@@ -159,25 +160,14 @@ class MemberHandler : public IDefine,
{ return m_isConst; } { return m_isConst; }
virtual bool isVolatile() const virtual bool isVolatile() const
{ return m_isVolatile; } { return m_isVolatile; }
virtual ILinkedTextIterator *type() const virtual ILinkedTextIterator *type() const;
{ return new LinkedTextIterator(m_type); } virtual const IString *typeString() const;
virtual const IString *typeString() const virtual IParamIterator *parameters() const;
{ MemberHandler *that = (MemberHandler *)this; virtual IParamIterator *templateParameters() const;
that->m_typeString = LinkedTextHandler::toString(m_type); virtual IMemberReferenceIterator *references() const;
return &m_typeString; virtual IMemberReferenceIterator *referencedBy() const;
} virtual ILinkedTextIterator *initializer() const;
virtual IParamIterator *parameters() const virtual ILinkedTextIterator *exceptions() const;
{ return new ParamIterator(m_params); }
virtual IParamIterator *templateParameters() const
{ return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0; }
virtual IMemberReferenceIterator *references() const
{ return new MemberReferenceIterator(m_references); }
virtual IMemberReferenceIterator *referencedBy() const
{ return new MemberReferenceIterator(m_referencedBy); }
virtual ILinkedTextIterator *initializer() const
{ return new LinkedTextIterator(m_initializer); }
virtual ILinkedTextIterator *exceptions() const
{ return new LinkedTextIterator(m_exception); }
virtual int bodyStart() const virtual int bodyStart() const
{ return m_bodyStart; } { return m_bodyStart; }
virtual int bodyEnd() const virtual int bodyEnd() const
...@@ -188,12 +178,9 @@ class MemberHandler : public IDefine, ...@@ -188,12 +178,9 @@ class MemberHandler : public IDefine,
{ return m_defLine; } { return m_defLine; }
virtual IMemberReference *reimplements() const virtual IMemberReference *reimplements() const
{ return m_reimplements; } { return m_reimplements; }
virtual IMemberReferenceIterator *reimplementedBy() const virtual IMemberReferenceIterator *reimplementedBy() const;
{ return new MemberReferenceIterator(m_reimplementedBy); } virtual IDocRoot *briefDescription() const;
virtual IDocRoot *briefDescription() const virtual IDocRoot *detailedDescription() const;
{ return m_brief; }
virtual IDocRoot *detailedDescription() const
{ return m_detailed; }
// IEnum // IEnum
virtual IMemberIterator *enumValues() const; virtual IMemberIterator *enumValues() const;
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "paramhandler.h" #include "paramhandler.h"
#include "memberhandler.h" #include "memberhandler.h"
#include "linkedtexthandler.h"
#include "debug.h" #include "debug.h"
TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent) TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent)
...@@ -127,5 +128,14 @@ void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/) ...@@ -127,5 +128,14 @@ void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/)
debug(2,"member defVal\n"); debug(2,"member defVal\n");
} }
ILinkedTextIterator *ParamHandler::type() const
{
return new LinkedTextIterator(m_type);
}
ILinkedTextIterator *ParamHandler::defaultValue() const
{
return new LinkedTextIterator(m_defVal);
}
...@@ -24,7 +24,9 @@ ...@@ -24,7 +24,9 @@
#include "stringimpl.h" #include "stringimpl.h"
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
#include "linkedtexthandler.h"
class LinkedTextImpl;
class LinkedTextHandler;
class ParamHandler : public IParam, public BaseHandler<ParamHandler> class ParamHandler : public IParam, public BaseHandler<ParamHandler>
...@@ -43,14 +45,12 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler> ...@@ -43,14 +45,12 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler>
virtual ~ParamHandler(); virtual ~ParamHandler();
// IParam // IParam
virtual ILinkedTextIterator *type() const virtual ILinkedTextIterator *type() const;
{ return new LinkedTextIterator(m_type); }
virtual const IString * declarationName() const { return &m_declName; } virtual const IString * declarationName() const { return &m_declName; }
virtual const IString * definitionName() const { return &m_defName; } virtual const IString * definitionName() const { return &m_defName; }
virtual const IString * attrib() const { return &m_attrib; } virtual const IString * attrib() const { return &m_attrib; }
virtual const IString * arraySpecifier() const { return &m_array; } virtual const IString * arraySpecifier() const { return &m_array; }
virtual ILinkedTextIterator *defaultValue() const virtual ILinkedTextIterator *defaultValue() const;
{ return new LinkedTextIterator(m_defVal); }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "mainhandler.h" #include "mainhandler.h"
#include "compoundhandler.h" #include "compoundhandler.h"
#include "sectionhandler.h" #include "sectionhandler.h"
#include "memberhandler.h"
#include "debug.h" #include "debug.h"
class SectionTypeMap class SectionTypeMap
...@@ -126,4 +127,8 @@ void SectionHandler::initialize(CompoundHandler *ch) ...@@ -126,4 +127,8 @@ void SectionHandler::initialize(CompoundHandler *ch)
} }
} }
IMemberIterator *SectionHandler::members() const
{
return new MemberIterator(m_members);
}
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <doxmlintf.h> #include <doxmlintf.h>
#include "basehandler.h" #include "basehandler.h"
#include "memberhandler.h"
class MainHandler; class MainHandler;
...@@ -50,8 +49,7 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler> ...@@ -50,8 +49,7 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{ return &m_kindString; } { return &m_kindString; }
virtual SectionKind kind() const virtual SectionKind kind() const
{ return m_kind; } { return m_kind; }
virtual IMemberIterator *members() const virtual IMemberIterator *members() const;
{ return new MemberIterator(m_members); }
virtual bool isStatic() const virtual bool isStatic() const
{ {
return m_kind==PubStatFuncs || m_kind==PubStatAttribs || return m_kind==PubStatFuncs || m_kind==PubStatAttribs ||
......
...@@ -73,14 +73,16 @@ void DumpDoc(IDoc *doc,int level) ...@@ -73,14 +73,16 @@ void DumpDoc(IDoc *doc,int level)
{ {
IDocText *txt = dynamic_cast<IDocText*>(doc); IDocText *txt = dynamic_cast<IDocText*>(doc);
ASSERT(txt!=0); ASSERT(txt!=0);
InPrint(("<text value=`%s' markup=%d/>\n",txt->text()->latin1(),txt->markup())); InPrint(("<text value=`%s' markup=%d headingLevel=%d/>\n",
txt->text()->latin1(),txt->markup(),txt->headingLevel()));
} }
break; break;
case IDoc::MarkupModifier: case IDoc::MarkupModifier:
{ {
IDocMarkupModifier *md = dynamic_cast<IDocMarkupModifier*>(doc); IDocMarkupModifier *md = dynamic_cast<IDocMarkupModifier*>(doc);
ASSERT(md!=0); ASSERT(md!=0);
InPrint(("<markup modifier enabled=%d markup=%d/>\n",md->enabled(),md->markup())); InPrint(("<markup modifier enabled=%d markup=%d headingLevel=%d/>\n",
md->enabled(),md->markup(),md->headingLevel()));
} }
break; break;
case IDoc::ItemizedList: case IDoc::ItemizedList:
...@@ -203,7 +205,10 @@ void DumpDoc(IDoc *doc,int level) ...@@ -203,7 +205,10 @@ void DumpDoc(IDoc *doc,int level)
{ {
IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc); IDocVariableListEntry *vle = dynamic_cast<IDocVariableListEntry*>(doc);
ASSERT(vle!=0); ASSERT(vle!=0);
InPrint(("<variablelistentry term=%s>\n",vle->term()->latin1())); ILinkedTextIterator *lti = vle->term();
QString term = linkedTextToString(lti);
lti->release();
InPrint(("<variablelistentry term=%s>\n",term.latin1()));
DumpDoc(vle->description(),level+1); DumpDoc(vle->description(),level+1);
InPrint(("<variablelistentry/>\n")); InPrint(("<variablelistentry/>\n"));
} }
...@@ -255,7 +260,7 @@ void DumpDoc(IDoc *doc,int level) ...@@ -255,7 +260,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(cl,level+1); DumpDoc(cl,level+1);
} }
cli->release(); cli->release();
InPrint(("<programlisting/>\n")); InPrint(("</programlisting>\n"));
} }
break; break;
case IDoc::CodeLine: case IDoc::CodeLine:
...@@ -270,7 +275,7 @@ void DumpDoc(IDoc *doc,int level) ...@@ -270,7 +275,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(ce,level+1); DumpDoc(ce,level+1);
} }
cei->release(); cei->release();
InPrint(("<codeline/>\n")); InPrint(("</codeline>\n"));
} }
break; break;
case IDoc::Highlight: case IDoc::Highlight:
...@@ -373,31 +378,70 @@ void DumpDoc(IDoc *doc,int level) ...@@ -373,31 +378,70 @@ void DumpDoc(IDoc *doc,int level)
{ {
DumpDoc(pdoc,level+1); DumpDoc(pdoc,level+1);
} }
InPrint(("<section/>\n")); InPrint(("</section>\n"));
} }
break; break;
case IDoc::Preformatted: case IDoc::Copy:
{ {
InPrint(("<preformatted>\n")); IDocCopy *cpy = dynamic_cast<IDocCopy*>(doc);
IDocPreformatted *pf = dynamic_cast<IDocPreformatted*>(doc); ASSERT(cpy!=0);
ASSERT(pf!=0); InPrint(("<copydoc>\n"));
IDocIterator *di = pf->contents(); IDocIterator *di = cpy->contents();
IDoc *pdoc; IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext()) for (di->toFirst();(pdoc=di->current());di->toNext())
{ {
DumpDoc(pdoc,level+1); DumpDoc(pdoc,level+1);
} }
di->release(); di->release();
InPrint(("<preformatted/>\n")); InPrint(("<copydoc/>\n"));
}
break;
case IDoc::TocItem:
{
IDocTocItem *ti = dynamic_cast<IDocTocItem*>(doc);
ASSERT(ti!=0);
InPrint(("<tocitem id=\"%s\" title=\"%s\"/>\n",
ti->id()->latin1(),ti->title()->latin1()));
}
break;
case IDoc::TocList:
{
IDocTocList *tl = dynamic_cast<IDocTocList*>(doc);
ASSERT(tl!=0);
InPrint(("<toclist>\n"));
IDocIterator *di = tl->elements();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc,level+1);
}
di->release();
InPrint(("<toclist/>\n"));
} }
break; break;
case IDoc::Verbatim: case IDoc::Verbatim:
{ {
InPrint(("<verbatim>\n"));
IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc); IDocVerbatim *vt = dynamic_cast<IDocVerbatim*>(doc);
ASSERT(vt!=0); ASSERT(vt!=0);
const char *s=0;
switch (vt->type())
{
case IDocVerbatim::Verbatim: s="verbatim"; break;
case IDocVerbatim::HtmlOnly: s="htmlonly"; break;
case IDocVerbatim::LatexOnly: s="latexonly"; break;
default:
printf("Invalid verbatim type!\n");
}
InPrint(("<verbatim %s>\n",s));
InPrint(("%s",vt->text()->latin1())); InPrint(("%s",vt->text()->latin1()));
InPrint(("<verbatim/>\n")); InPrint(("</verbatim>\n"));
}
break;
case IDoc::Anchor:
{
IDocAnchor *anc = dynamic_cast<IDocAnchor*>(doc);
ASSERT(anc!=0);
InPrint(("<anchor id='%s'/>\n",anc->id()->latin1()));
} }
break; break;
case IDoc::Symbol: case IDoc::Symbol:
...@@ -420,7 +464,7 @@ void DumpDoc(IDoc *doc,int level) ...@@ -420,7 +464,7 @@ void DumpDoc(IDoc *doc,int level)
DumpDoc(pdoc,level+1); DumpDoc(pdoc,level+1);
} }
di->release(); di->release();
InPrint(("<root/>\n")); InPrint(("</root>\n"));
} }
break; break;
......
...@@ -319,7 +319,7 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -319,7 +319,7 @@ doxygen. Unrecognized commands are treated as normal text.
If your comment block \e is in front of the function If your comment block \e is in front of the function
declaration or definition this command can (and to avoid redundancy declaration or definition this command can (and to avoid redundancy
should) be ommitted. should) be omitted.
A full function declaration including arguments should be specified after the A full function declaration including arguments should be specified after the
\\fn command on a \e single line, since the argument ends at the end \\fn command on a \e single line, since the argument ends at the end
...@@ -745,7 +745,7 @@ See section \ref memgroup for an example. ...@@ -745,7 +745,7 @@ See section \ref memgroup for an example.
\par Example: \par Example:
\verbatim \verbatim
/*! Uncoditionally shown documentation. /*! Unconditionally shown documentation.
* \if Cond1 * \if Cond1
* Only included if Cond1 is set. * Only included if Cond1 is set.
* \endif * \endif
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.18_20021030 Version: 1.2.18_20021106
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -521,7 +521,7 @@ static MemberDef *setCallContextForVar(const QCString &name) ...@@ -521,7 +521,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
{ {
QCString scope = name.left(scopeEnd); QCString scope = name.left(scopeEnd);
QCString locName = name.right(name.length()-scopeEnd-2); QCString locName = name.right(name.length()-scopeEnd-2);
//printf("name=%s scope=%s\n",locName.data(),scope.data()); //printf("explicit scope: name=%s scope=%s\n",locName.data(),scope.data());
ClassDef *mcd = getClass(scope); // TODO: check namespace as well ClassDef *mcd = getClass(scope); // TODO: check namespace as well
if (mcd && !locName.isEmpty()) if (mcd && !locName.isEmpty())
{ {
...@@ -539,11 +539,11 @@ static MemberDef *setCallContextForVar(const QCString &name) ...@@ -539,11 +539,11 @@ static MemberDef *setCallContextForVar(const QCString &name)
ClassDef *mcd = g_theVarContext.findVariable(name); ClassDef *mcd = g_theVarContext.findVariable(name);
if (mcd) // local variable if (mcd) // local variable
{ {
//printf("local var `%s'\n",name.data()); //printf("local var `%s' mcd=%s\n",name.data(),mcd->name().data());
g_theCallContext.setClass(mcd); g_theCallContext.setClass(mcd);
return 0;
} }
else
{
// look for a class member // look for a class member
mcd = getClass(g_classScope); mcd = getClass(g_classScope);
if (mcd) if (mcd)
...@@ -555,6 +555,7 @@ static MemberDef *setCallContextForVar(const QCString &name) ...@@ -555,6 +555,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
return md; return md;
} }
} }
}
// look for a global member // look for a global member
if ((mn=Doxygen::functionNameSDict[name])) if ((mn=Doxygen::functionNameSDict[name]))
...@@ -613,6 +614,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst) ...@@ -613,6 +614,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0) static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int *clNameLen=0)
{ {
int i=0; int i=0;
//printf("generateClassOrGlobalLink(clName=%s)\n",clName);
if (*clName=='~') // correct for matching negated values i.s.o. destructors. if (*clName=='~') // correct for matching negated values i.s.o. destructors.
{ {
g_code->codify("~"); g_code->codify("~");
...@@ -634,6 +636,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int ...@@ -634,6 +636,7 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
} }
if (cd && cd->isLinkable()) // is it a linkable class if (cd && cd->isLinkable()) // is it a linkable class
{ {
//printf("is linkable class %s\n",clName);
if (g_exampleBlock) if (g_exampleBlock)
{ {
QCString anchor; QCString anchor;
...@@ -654,10 +657,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int ...@@ -654,10 +657,12 @@ static void generateClassOrGlobalLink(BaseCodeDocInterface &ol,char *clName,int
if (cd==0) // not a class, see if it is a global enum/variable/typedef. if (cd==0) // not a class, see if it is a global enum/variable/typedef.
{ {
MemberDef *md = setCallContextForVar(clName); MemberDef *md = setCallContextForVar(clName);
//printf("is a global md=%p\n",md);
if (md) if (md)
{ {
Definition *d = md->getOuterScope()==Doxygen::globalScope ? Definition *d = md->getOuterScope()==Doxygen::globalScope ?
md->getBodyDef() : md->getOuterScope(); md->getBodyDef() : md->getOuterScope();
//printf("definition %s\n",d?d->name().data():"<none>");
if (md->getGroupDef()) d = md->getGroupDef(); if (md->getGroupDef()) d = md->getGroupDef();
if (d && d->isLinkable() && md->isLinkable()) if (d && d->isLinkable() && md->isLinkable())
{ {
......
...@@ -2206,10 +2206,28 @@ void Config::create() ...@@ -2206,10 +2206,28 @@ void Config::create()
"PERLMOD_LATEX", "PERLMOD_LATEX",
"If the PERLMOD_LATEX tag is set to YES Doxygen will generate \n" "If the PERLMOD_LATEX tag is set to YES Doxygen will generate \n"
"the necessary Makefile rules, Perl scripts and LaTeX code to be able \n" "the necessary Makefile rules, Perl scripts and LaTeX code to be able \n"
"to generate PDF and DVI output from the Perl module output.\n", "to generate PDF and DVI output from the Perl module output. \n",
FALSE FALSE
); );
cb->addDependency("GENERATE_PERLMOD"); cb->addDependency("GENERATE_PERLMOD");
cb = addBool(
"PERLMOD_PRETTY",
"If the PERLMOD_PRETTY tag is set to YES the Perl module output will be \n"
"nicely formatted so it can be parsed by a human reader. This is useful \n"
"if you want to understand what is going on. On the other hand, if this \n"
"tag is set to NO the size of the Perl module output will be much smaller \n"
"and Perl will parse it just the same. \n",
TRUE
);
cb->addDependency("GENERATE_PERLMOD");
cs = addString(
"PERLMOD_MAKEVAR_PREFIX",
"The names of the make variables in the generated doxyrules.make file \n"
"are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. \n"
"This is useful so different doxyrules.make files included by the same \n"
"Makefile don't overwrite each other's variables."
);
cs->addDependency("GENERATE_PERLMOD");
//----------------------------------------------------------------------------------------------- //-----------------------------------------------------------------------------------------------
addInfo( "Preprocessor","Configuration options related to the preprocessor "); addInfo( "Preprocessor","Configuration options related to the preprocessor ");
......
...@@ -259,9 +259,9 @@ void Definition::writeSourceDef(OutputList &ol,const char *) ...@@ -259,9 +259,9 @@ void Definition::writeSourceDef(OutputList &ol,const char *)
//printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef); //printf("Definition::writeSourceRef %d %p\n",bodyLine,bodyDef);
if (Config_getBool("SOURCE_BROWSER") && m_startBodyLine!=-1 && m_bodyDef) if (Config_getBool("SOURCE_BROWSER") && m_startBodyLine!=-1 && m_bodyDef)
{ {
//ol.disable(OutputGenerator::RTF); ol.disable(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
//ol.enableAll(); ol.enableAll();
QCString refText = theTranslator->trDefinedAtLineInSourceFile(); QCString refText = theTranslator->trDefinedAtLineInSourceFile();
int lineMarkerPos = refText.find("@0"); int lineMarkerPos = refText.find("@0");
......
This diff is collapsed.
...@@ -80,7 +80,7 @@ class DocNode ...@@ -80,7 +80,7 @@ class DocNode
Kind_XRefItem = 15, Kind_XRefItem = 15,
Kind_HtmlList = 16, Kind_HtmlList = 16,
Kind_HtmlListItem = 17, Kind_HtmlListItem = 17,
Kind_HtmlPre = 18, //Kind_HtmlPre = 18,
Kind_HtmlDescList = 19, Kind_HtmlDescList = 19,
Kind_HtmlDescData = 20, Kind_HtmlDescData = 20,
Kind_HtmlDescTitle = 21, Kind_HtmlDescTitle = 21,
...@@ -112,7 +112,9 @@ class DocNode ...@@ -112,7 +112,9 @@ class DocNode
Kind_Copy = 47, Kind_Copy = 47,
Kind_Text = 48 Kind_Text = 48
}; };
/*! Destructor. */ /*! Creates a new node */
DocNode() : m_insidePre(FALSE) {}
/*! Destroys a node. */
virtual ~DocNode() {} virtual ~DocNode() {}
/*! Returns the kind of node. Provides runtime type information */ /*! Returns the kind of node. Provides runtime type information */
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
...@@ -122,6 +124,12 @@ class DocNode ...@@ -122,6 +124,12 @@ class DocNode
* @param v Abstract visitor. * @param v Abstract visitor.
*/ */
virtual void accept(DocVisitor *v) = 0; virtual void accept(DocVisitor *v) = 0;
/*! Returns TRUE iff this node is inside a preformatted section */
bool isPreformatted() const { return m_insidePre; }
/*! Sets whether or not this item is inside a preformatted section */
void setInsidePreformatted(bool p) { m_insidePre = p; }
private:
bool m_insidePre;
}; };
/*! @brief Default accept implementation for compound nodes in the abstract /*! @brief Default accept implementation for compound nodes in the abstract
...@@ -254,22 +262,26 @@ class DocStyleChange : public DocNode ...@@ -254,22 +262,26 @@ class DocStyleChange : public DocNode
{ {
public: public:
enum Style { Bold, Italic, Code, Center, Small, enum Style { Bold, Italic, Code, Center, Small,
Subscript, Superscript Subscript, Superscript, Preformatted
}; };
DocStyleChange(DocNode *parent,uint position,Style s,bool enable) : DocStyleChange(DocNode *parent,uint position,Style s,bool enable,
m_parent(parent), m_position(position), m_style(s), m_enable(enable) {} const HtmlAttribList *attribs=0) :
m_parent(parent), m_position(position), m_style(s), m_enable(enable)
{ if (attribs) m_attribs=*attribs; }
Kind kind() const { return Kind_StyleChange; } Kind kind() const { return Kind_StyleChange; }
Style style() const { return m_style; } Style style() const { return m_style; }
bool enable() const { return m_enable; } bool enable() const { return m_enable; }
uint position() const { return m_position; } uint position() const { return m_position; }
DocNode *parent() const { return m_parent; } DocNode *parent() const { return m_parent; }
void accept(DocVisitor *v) { v->visit(this); } void accept(DocVisitor *v) { v->visit(this); }
const HtmlAttribList &attribs() const { return m_attribs; }
private: private:
DocNode *m_parent; DocNode *m_parent;
uint m_position; uint m_position;
Style m_style; Style m_style;
bool m_enable; bool m_enable;
HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a special symbol */ /*! @brief Node representing a special symbol */
...@@ -1024,7 +1036,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode ...@@ -1024,7 +1036,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
#if 0
/*! @brief Node representing a preformatted HTML section */ /*! @brief Node representing a preformatted HTML section */
class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
{ {
...@@ -1041,6 +1053,7 @@ class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode ...@@ -1041,6 +1053,7 @@ class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
DocNode * m_parent; DocNode * m_parent;
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
#endif
/*! @brief Node representing a HTML table cell */ /*! @brief Node representing a HTML table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
......
...@@ -219,7 +219,7 @@ URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])? ...@@ -219,7 +219,7 @@ URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])?
FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+]
FILEECHAR [a-z_A-Z0-9\-\+] FILEECHAR [a-z_A-Z0-9\-\+]
FILEMASK {FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)* FILEMASK {FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*
LINKMASK [^ \t\n\r\\@<&$]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))? LINKMASK [^ \t\n\r\\@<&${}]+("("[^\n)]*")")?({BLANK}*("const"|"volatile"))?
SPCMD1 {CMD}[a-z_A-Z0-9]+ SPCMD1 {CMD}[a-z_A-Z0-9]+
SPCMD2 {CMD}[\\@<>&$#%~] SPCMD2 {CMD}[\\@<>&$#%~]
SPCMD3 {CMD}form#[0-9]+ SPCMD3 {CMD}form#[0-9]+
...@@ -234,12 +234,12 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")? ...@@ -234,12 +234,12 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")?
OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()" OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"
OPCAST {BLANK}+[^(\r\n.,]+ OPCAST {BLANK}+[^(\r\n.,]+
OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 {SCOPEMASK} LNKWORD1 ("::"|"#")?{SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile") CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>&$#,.]+ WORD1 [^ \t\n\r\\@<>{}&$#,.]+|"{"|"}"
WORD2 "."|"," WORD2 "."|","
WORD1NQ [^ \t\n\r\\@<>&$#,."]+ WORD1NQ [^ \t\n\r\\@<>{}&$#,."]+
WORD2NQ "."|"," WORD2NQ "."|","
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p" HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
......
...@@ -38,7 +38,7 @@ class DocVerbatim; ...@@ -38,7 +38,7 @@ class DocVerbatim;
class DocXRefItem; class DocXRefItem;
class DocHtmlList; class DocHtmlList;
class DocHtmlListItem; class DocHtmlListItem;
class DocHtmlPre; //class DocHtmlPre;
class DocHtmlDescList; class DocHtmlDescList;
class DocHtmlDescTitle; class DocHtmlDescTitle;
class DocHtmlDescData; class DocHtmlDescData;
...@@ -75,6 +75,7 @@ class DocText; ...@@ -75,6 +75,7 @@ class DocText;
class DocVisitor class DocVisitor
{ {
public: public:
virtual ~DocVisitor() {}
/*! @name Visitor functions for leaf nodes /*! @name Visitor functions for leaf nodes
* @{ * @{
*/ */
...@@ -119,8 +120,8 @@ class DocVisitor ...@@ -119,8 +120,8 @@ class DocVisitor
virtual void visitPost(DocHtmlListItem *) = 0; virtual void visitPost(DocHtmlListItem *) = 0;
virtual void visitPre(DocHtmlListItem *) = 0; virtual void visitPre(DocHtmlListItem *) = 0;
virtual void visitPost(DocHtmlList *) = 0; virtual void visitPost(DocHtmlList *) = 0;
virtual void visitPre(DocHtmlPre *) = 0; //virtual void visitPre(DocHtmlPre *) = 0;
virtual void visitPost(DocHtmlPre *) = 0; //virtual void visitPost(DocHtmlPre *) = 0;
virtual void visitPre(DocHtmlDescList *) = 0; virtual void visitPre(DocHtmlDescList *) = 0;
virtual void visitPost(DocHtmlDescList *) = 0; virtual void visitPost(DocHtmlDescList *) = 0;
virtual void visitPre(DocHtmlDescTitle *) = 0; virtual void visitPre(DocHtmlDescTitle *) = 0;
......
...@@ -133,26 +133,37 @@ void HtmlDocVisitor::visit(DocStyleChange *s) ...@@ -133,26 +133,37 @@ void HtmlDocVisitor::visit(DocStyleChange *s)
switch (s->style()) switch (s->style())
{ {
case DocStyleChange::Bold: case DocStyleChange::Bold:
if (s->enable()) m_t << "<b>"; else m_t << "</b>"; if (s->enable()) m_t << "<b" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</b>";
break; break;
case DocStyleChange::Italic: case DocStyleChange::Italic:
if (s->enable()) m_t << "<em>"; else m_t << "</em>"; if (s->enable()) m_t << "<em" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</em>";
break; break;
case DocStyleChange::Code: case DocStyleChange::Code:
if (s->enable()) m_t << "<code>"; else m_t << "</code>"; if (s->enable()) m_t << "<code" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</code>";
break; break;
case DocStyleChange::Subscript: case DocStyleChange::Subscript:
if (s->enable()) m_t << "<sub>"; else m_t << "</sub>"; if (s->enable()) m_t << "<sub" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sub>";
break; break;
case DocStyleChange::Superscript: case DocStyleChange::Superscript:
if (s->enable()) m_t << "<sup>"; else m_t << "</sup>"; if (s->enable()) m_t << "<sup" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</sup>";
break; break;
case DocStyleChange::Center: case DocStyleChange::Center:
if (s->enable()) m_t << "<center>"; else m_t << "</center>"; if (s->enable()) m_t << "<center" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</center>";
break; break;
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) m_t << "<small>"; else m_t << "</small>"; if (s->enable()) m_t << "<small" << htmlAttribsToString(s->attribs()) << ">"; else m_t << "</small>";
break; break;
case DocStyleChange::Preformatted:
if (s->enable())
{
m_t << "<pre" << htmlAttribsToString(s->attribs()) << ">\n";
m_insidePre=TRUE;
}
else
{
m_insidePre=FALSE;
m_t << "</pre>\n";
}
} }
} }
...@@ -434,17 +445,17 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *) ...@@ -434,17 +445,17 @@ void HtmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</li>\n"; m_t << "</li>\n";
} }
void HtmlDocVisitor::visitPre(DocHtmlPre *p) //void HtmlDocVisitor::visitPre(DocHtmlPre *p)
{ //{
m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n"; // m_t << "<pre" << htmlAttribsToString(p->attribs()) << ">\n";
m_insidePre=TRUE; // m_insidePre=TRUE;
} //}
void HtmlDocVisitor::visitPost(DocHtmlPre *) //void HtmlDocVisitor::visitPost(DocHtmlPre *)
{ //{
m_insidePre=FALSE; // m_insidePre=FALSE;
m_t << "</pre>\n"; // m_t << "</pre>\n";
} //}
void HtmlDocVisitor::visitPre(DocHtmlDescList *dl) void HtmlDocVisitor::visitPre(DocHtmlDescList *dl)
{ {
......
...@@ -76,8 +76,8 @@ class HtmlDocVisitor : public DocVisitor ...@@ -76,8 +76,8 @@ class HtmlDocVisitor : public DocVisitor
void visitPost(DocHtmlList *) ; void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *); void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *); void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *); //void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *); //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *); void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *); void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *); void visitPre(DocHtmlDescTitle *);
......
...@@ -203,6 +203,18 @@ void LatexDocVisitor::visit(DocStyleChange *s) ...@@ -203,6 +203,18 @@ void LatexDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) m_t << "\\footnotesize "; else m_t << "\\normalsize "; if (s->enable()) m_t << "\\footnotesize "; else m_t << "\\normalsize ";
break; break;
case DocStyleChange::Preformatted:
if (s->enable())
{
m_t << "\\small\\begin{alltt}";
m_insidePre=TRUE;
}
else
{
m_insidePre=FALSE;
m_t << "\\end{alltt}\\normalsize " << endl;
}
break;
} }
} }
...@@ -499,17 +511,17 @@ void LatexDocVisitor::visitPost(DocHtmlListItem *) ...@@ -499,17 +511,17 @@ void LatexDocVisitor::visitPost(DocHtmlListItem *)
{ {
} }
void LatexDocVisitor::visitPre(DocHtmlPre *) //void LatexDocVisitor::visitPre(DocHtmlPre *)
{ //{
m_t << "\\small\\begin{alltt}"; // m_t << "\\small\\begin{alltt}";
m_insidePre=TRUE; // m_insidePre=TRUE;
} //}
void LatexDocVisitor::visitPost(DocHtmlPre *) //void LatexDocVisitor::visitPost(DocHtmlPre *)
{ //{
m_insidePre=FALSE; // m_insidePre=FALSE;
m_t << "\\end{alltt}\\normalsize " << endl; // m_t << "\\end{alltt}\\normalsize " << endl;
} //}
void LatexDocVisitor::visitPre(DocHtmlDescList *) void LatexDocVisitor::visitPre(DocHtmlDescList *)
{ {
......
...@@ -76,8 +76,8 @@ class LatexDocVisitor : public DocVisitor ...@@ -76,8 +76,8 @@ class LatexDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s); void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *); void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *); void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *); //void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *); //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *); void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *); void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *); void visitPre(DocHtmlDescTitle *);
......
...@@ -151,6 +151,22 @@ void ManDocVisitor::visit(DocStyleChange *s) ...@@ -151,6 +151,22 @@ void ManDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small: case DocStyleChange::Small:
/* not supported */ /* not supported */
break; break;
case DocStyleChange::Preformatted:
if (s->enable())
{
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_t << ".nf" << endl;
m_insidePre=TRUE;
}
else
{
m_insidePre=FALSE;
if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl;
m_firstCol=TRUE;
}
break;
} }
} }
...@@ -468,21 +484,21 @@ void ManDocVisitor::visitPost(DocHtmlListItem *) ...@@ -468,21 +484,21 @@ void ManDocVisitor::visitPost(DocHtmlListItem *)
m_firstCol=TRUE; m_firstCol=TRUE;
} }
void ManDocVisitor::visitPre(DocHtmlPre *) //void ManDocVisitor::visitPre(DocHtmlPre *)
{ //{
if (!m_firstCol) m_t << endl; // if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl; // m_t << ".PP" << endl;
m_t << ".nf" << endl; // m_t << ".nf" << endl;
m_insidePre=TRUE; // m_insidePre=TRUE;
} //}
//
void ManDocVisitor::visitPost(DocHtmlPre *) //void ManDocVisitor::visitPost(DocHtmlPre *)
{ //{
m_insidePre=FALSE; // m_insidePre=FALSE;
if (!m_firstCol) m_t << endl; // if (!m_firstCol) m_t << endl;
m_t << ".PP" << endl; // m_t << ".PP" << endl;
m_firstCol=TRUE; // m_firstCol=TRUE;
} //}
void ManDocVisitor::visitPre(DocHtmlDescList *) void ManDocVisitor::visitPre(DocHtmlDescList *)
{ {
......
...@@ -76,8 +76,8 @@ class ManDocVisitor : public DocVisitor ...@@ -76,8 +76,8 @@ class ManDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s); void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *); void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *); void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *); //void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *); //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *); void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *); void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *); void visitPre(DocHtmlDescTitle *);
......
...@@ -1271,6 +1271,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1271,6 +1271,15 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.newParagraph(); ol.newParagraph();
ol.popGeneratorState(); ol.popGeneratorState();
} }
else if(!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
!Config_getBool("BRIEF_MEMBER_DESC")))
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.popGeneratorState();
}
//printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n", //printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n",
// defArgList, // defArgList,
...@@ -1375,7 +1384,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1375,7 +1384,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
// write class that contains a member that is reimplemented by this one // write class that contains a member that is reimplemented by this one
if (bcd->isLinkable()) if (bcd->isLinkable())
{ {
ol.disable(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll();
QCString reimplFromLine; QCString reimplFromLine;
if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface) if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface)
...@@ -1449,7 +1460,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, ...@@ -1449,7 +1460,9 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{ {
mli.toFirst(); mli.toFirst();
// write the list of classes that overwrite this member // write the list of classes that overwrite this member
ol.disable(OutputGenerator::RTF);
ol.newParagraph(); ol.newParagraph();
ol.enableAll();
QCString reimplInLine; QCString reimplInLine;
if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface)) if (virt==Pure || (classDef && classDef->compoundType()==ClassDef::Interface))
......
This diff is collapsed.
...@@ -121,6 +121,9 @@ class PrintDocVisitor : public DocVisitor ...@@ -121,6 +121,9 @@ class PrintDocVisitor : public DocVisitor
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) printf("<small>"); else printf("</small>"); if (s->enable()) printf("<small>"); else printf("</small>");
break; break;
case DocStyleChange::Preformatted:
if (s->enable()) printf("<pre>"); else printf("</pre>");
break;
} }
} }
void visit(DocVerbatim *s) void visit(DocVerbatim *s)
...@@ -330,18 +333,18 @@ class PrintDocVisitor : public DocVisitor ...@@ -330,18 +333,18 @@ class PrintDocVisitor : public DocVisitor
indent_post(); indent_post();
printf("</li>\n"); printf("</li>\n");
} }
void visitPre(DocHtmlPre *) //void visitPre(DocHtmlPre *)
{ //{
indent_pre(); // indent_pre();
printf("<pre>\n"); // printf("<pre>\n");
m_insidePre=TRUE; // m_insidePre=TRUE;
} //}
void visitPost(DocHtmlPre *) //void visitPost(DocHtmlPre *)
{ //{
m_insidePre=FALSE; // m_insidePre=FALSE;
indent_post(); // indent_post();
printf("</pre>\n"); // printf("</pre>\n");
} //}
void visitPre(DocHtmlDescList *) void visitPre(DocHtmlDescList *)
{ {
indent_pre(); indent_pre();
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "message.h" #include "message.h"
RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci) RTFDocVisitor::RTFDocVisitor(QTextStream &t,BaseCodeDocInterface &ci)
: m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(0) : m_t(t), m_ci(ci), m_insidePre(FALSE), m_hide(FALSE), m_indentLevel(1)
{ {
} }
...@@ -48,7 +48,7 @@ void RTFDocVisitor::incIndentLevel() ...@@ -48,7 +48,7 @@ void RTFDocVisitor::incIndentLevel()
void RTFDocVisitor::decIndentLevel() void RTFDocVisitor::decIndentLevel()
{ {
if (m_indentLevel>0) m_indentLevel--; if (m_indentLevel>1) m_indentLevel--;
} }
//-------------------------------------- //--------------------------------------
...@@ -259,6 +259,21 @@ void RTFDocVisitor::visit(DocStyleChange *s) ...@@ -259,6 +259,21 @@ void RTFDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) m_t << "{\\sub "; else m_t << "} "; if (s->enable()) m_t << "{\\sub "; else m_t << "} ";
break; break;
case DocStyleChange::Preformatted:
if (s->enable())
{
m_t << "{" << endl;
m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample");
m_insidePre=TRUE;
}
else
{
m_insidePre=FALSE;
m_t << "\\par" << endl;
m_t << "}" << endl;
}
break;
} }
} }
...@@ -585,20 +600,20 @@ void RTFDocVisitor::visitPost(DocHtmlListItem *) ...@@ -585,20 +600,20 @@ void RTFDocVisitor::visitPost(DocHtmlListItem *)
{ {
} }
void RTFDocVisitor::visitPre(DocHtmlPre *) //void RTFDocVisitor::visitPre(DocHtmlPre *)
{ //{
m_t << "{" << endl; // m_t << "{" << endl;
m_t << "\\par" << endl; // m_t << "\\par" << endl;
m_t << rtf_Style_Reset << getStyle("CodeExample"); // m_t << rtf_Style_Reset << getStyle("CodeExample");
m_insidePre=TRUE; // m_insidePre=TRUE;
} //}
void RTFDocVisitor::visitPost(DocHtmlPre *) //void RTFDocVisitor::visitPost(DocHtmlPre *)
{ //{
m_insidePre=FALSE; // m_insidePre=FALSE;
m_t << "\\par" << endl; // m_t << "\\par" << endl;
m_t << "}" << endl; // m_t << "}" << endl;
} //}
void RTFDocVisitor::visitPre(DocHtmlDescList *) void RTFDocVisitor::visitPre(DocHtmlDescList *)
{ {
...@@ -875,8 +890,8 @@ void RTFDocVisitor::visitPost(DocLanguage *) ...@@ -875,8 +890,8 @@ void RTFDocVisitor::visitPost(DocLanguage *)
void RTFDocVisitor::visitPre(DocParamSect *s) void RTFDocVisitor::visitPre(DocParamSect *s)
{ {
m_t << "{"; // start param list m_t << "{"; // start param list
m_t << "{\\b "; // start bold
m_t << "\\par" << endl; m_t << "\\par" << endl;
m_t << "{\\b "; // start bold
switch(s->type()) switch(s->type())
{ {
case DocParamSect::Param: case DocParamSect::Param:
...@@ -896,7 +911,7 @@ void RTFDocVisitor::visitPre(DocParamSect *s) ...@@ -896,7 +911,7 @@ void RTFDocVisitor::visitPre(DocParamSect *s)
void RTFDocVisitor::visitPost(DocParamSect *) void RTFDocVisitor::visitPost(DocParamSect *)
{ {
m_t << "\\par" << endl; //m_t << "\\par" << endl;
decIndentLevel(); decIndentLevel();
m_t << "}" << endl; m_t << "}" << endl;
} }
......
...@@ -76,8 +76,8 @@ class RTFDocVisitor : public DocVisitor ...@@ -76,8 +76,8 @@ class RTFDocVisitor : public DocVisitor
void visitPost(DocHtmlList *s); void visitPost(DocHtmlList *s);
void visitPre(DocHtmlListItem *); void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *); void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *); //void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *); //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *); void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *); void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *); void visitPre(DocHtmlDescTitle *);
......
...@@ -1439,14 +1439,14 @@ void RTFGenerator::startDescription() ...@@ -1439,14 +1439,14 @@ void RTFGenerator::startDescription()
{ {
DBG_RTF(t << "{\\comment (startDescription)}" << endl) DBG_RTF(t << "{\\comment (startDescription)}" << endl)
t << "{" << endl; t << "{" << endl;
t << rtf_Style_Reset << rtf_CList_DepthStyle(); t << rtf_Style_Reset << rtf_DList_DepthStyle();
} }
void RTFGenerator::endDescription() void RTFGenerator::endDescription()
{ {
DBG_RTF(t << "{\\comment (endDescription)}" << endl) DBG_RTF(t << "{\\comment (endDescription)}" << endl)
t << "}";
newParagraph(); newParagraph();
t << "}";
} }
void RTFGenerator::startDescItem() void RTFGenerator::startDescItem()
...@@ -1758,6 +1758,7 @@ void RTFGenerator::writeRTFReference(const char *label) ...@@ -1758,6 +1758,7 @@ void RTFGenerator::writeRTFReference(const char *label)
void RTFGenerator::startCodeFragment() void RTFGenerator::startCodeFragment()
{ {
DBG_RTF(t << "{\\comment (startCodeFragment) }" << endl)
t << "{" << endl; t << "{" << endl;
newParagraph(); newParagraph();
t << rtf_Style_Reset << rtf_Code_DepthStyle(); t << rtf_Style_Reset << rtf_Code_DepthStyle();
...@@ -1974,8 +1975,11 @@ void RTFGenerator::endTextBlock() ...@@ -1974,8 +1975,11 @@ void RTFGenerator::endTextBlock()
void RTFGenerator::newParagraph() void RTFGenerator::newParagraph()
{ {
if (!m_omitParagraph)
{
DBG_RTF(t << "{\\comment (newParagraph)}" << endl) DBG_RTF(t << "{\\comment (newParagraph)}" << endl)
if (!m_omitParagraph) t << "\\par" << endl; t << "\\par" << endl;
}
m_omitParagraph = FALSE; m_omitParagraph = FALSE;
} }
...@@ -2177,6 +2181,7 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl ...@@ -2177,6 +2181,7 @@ static bool PreProcessFile(QDir &d,QCString &infName, QTextStream &t, bool bIncl
void RTFGenerator::startDotGraph() void RTFGenerator::startDotGraph()
{ {
DBG_RTF(t << "{\\comment (startDotGraph)}" << endl)
} }
void RTFGenerator::endDotGraph(DotClassGraph &g) void RTFGenerator::endDotGraph(DotClassGraph &g)
...@@ -2193,10 +2198,13 @@ void RTFGenerator::endDotGraph(DotClassGraph &g) ...@@ -2193,10 +2198,13 @@ void RTFGenerator::endDotGraph(DotClassGraph &g)
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
newParagraph();
DBG_RTF(t << "{\\comment (endDotGraph)}" << endl)
} }
void RTFGenerator::startInclDepGraph() void RTFGenerator::startInclDepGraph()
{ {
DBG_RTF(t << "{\\comment (startInclDepGraph)}" << endl)
} }
void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
...@@ -2212,6 +2220,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g) ...@@ -2212,6 +2220,7 @@ void RTFGenerator::endInclDepGraph(DotInclDepGraph &g)
t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT"); t << fileName << "." << Config_getEnum("DOT_IMAGE_FORMAT");
t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl; t << " \\\\d \\\\*MERGEFORMAT}{\\fldrslt IMAGE}}\\par" << endl;
t << "}" << endl; t << "}" << endl;
DBG_RTF(t << "{\\comment (endInclDepGraph)}" << endl)
} }
/** Tests the integrity of the result by counting brackets. /** Tests the integrity of the result by counting brackets.
......
...@@ -3827,18 +3827,14 @@ void filterLatexString(QTextStream &t,const char *str, ...@@ -3827,18 +3827,14 @@ void filterLatexString(QTextStream &t,const char *str,
case '>': t << "$>$"; break; case '>': t << "$>$"; break;
case '|': t << "$|$"; break; case '|': t << "$|$"; break;
case '~': t << "$\\sim$"; break; case '~': t << "$\\sim$"; break;
case '[': if (Config_getBool("PDF_HYPERLINKS")) case '[': if (Config_getBool("PDF_HYPERLINKS") || insideItem)
t << "\\mbox{[}"; t << "\\mbox{[}";
else if (insideItem)
t << "\\[";
else else
t << "["; t << "[";
break; break;
case ']': if (pc=='[') t << "$\\,$"; case ']': if (pc=='[') t << "$\\,$";
if (Config_getBool("PDF_HYPERLINKS")) if (Config_getBool("PDF_HYPERLINKS") || insideItem)
t << "\\mbox{]}"; t << "\\mbox{]}";
else if (insideItem)
t << "\\]";
else else
t << "]"; t << "]";
break; break;
......
...@@ -138,6 +138,18 @@ void XmlDocVisitor::visit(DocStyleChange *s) ...@@ -138,6 +138,18 @@ void XmlDocVisitor::visit(DocStyleChange *s)
case DocStyleChange::Small: case DocStyleChange::Small:
if (s->enable()) m_t << "<small>"; else m_t << "</small> "; if (s->enable()) m_t << "<small>"; else m_t << "</small> ";
break; break;
case DocStyleChange::Preformatted:
if (s->enable())
{
m_t << "<preformatted>";
m_insidePre=TRUE;
}
else
{
m_t << "</preformatted> ";
m_insidePre=FALSE;
}
break;
} }
} }
...@@ -412,18 +424,6 @@ void XmlDocVisitor::visitPost(DocHtmlListItem *) ...@@ -412,18 +424,6 @@ void XmlDocVisitor::visitPost(DocHtmlListItem *)
m_t << "</listitem>\n"; m_t << "</listitem>\n";
} }
void XmlDocVisitor::visitPre(DocHtmlPre *)
{
m_t << "<preformatted>\n";
m_insidePre=TRUE;
}
void XmlDocVisitor::visitPost(DocHtmlPre *)
{
m_insidePre=FALSE;
m_t << "</preformatted>\n";
}
void XmlDocVisitor::visitPre(DocHtmlDescList *) void XmlDocVisitor::visitPre(DocHtmlDescList *)
{ {
m_t << "<variablelist>\n"; m_t << "<variablelist>\n";
...@@ -517,12 +517,12 @@ void XmlDocVisitor::visitPost(DocHRef *) ...@@ -517,12 +517,12 @@ void XmlDocVisitor::visitPost(DocHRef *)
void XmlDocVisitor::visitPre(DocHtmlHeader *header) void XmlDocVisitor::visitPre(DocHtmlHeader *header)
{ {
m_t << "<sect" << header->level() << ">"; m_t << "<heading" << header->level() << ">";
} }
void XmlDocVisitor::visitPost(DocHtmlHeader *header) void XmlDocVisitor::visitPost(DocHtmlHeader *header)
{ {
m_t << "</sect" << header->level() << ">\n"; m_t << "</heading" << header->level() << ">\n";
} }
void XmlDocVisitor::visitPre(DocImage *img) void XmlDocVisitor::visitPre(DocImage *img)
......
...@@ -76,8 +76,8 @@ class XmlDocVisitor : public DocVisitor ...@@ -76,8 +76,8 @@ class XmlDocVisitor : public DocVisitor
void visitPost(DocHtmlList *) ; void visitPost(DocHtmlList *) ;
void visitPre(DocHtmlListItem *); void visitPre(DocHtmlListItem *);
void visitPost(DocHtmlListItem *); void visitPost(DocHtmlListItem *);
void visitPre(DocHtmlPre *); //void visitPre(DocHtmlPre *);
void visitPost(DocHtmlPre *); //void visitPost(DocHtmlPre *);
void visitPre(DocHtmlDescList *); void visitPre(DocHtmlDescList *);
void visitPost(DocHtmlDescList *); void visitPost(DocHtmlDescList *);
void visitPre(DocHtmlDescTitle *); void visitPre(DocHtmlDescTitle *);
......
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