From dc404b516e366ca10ad325d399ef0bd47d065863 Mon Sep 17 00:00:00 2001 From: Dimitri van Heesch Date: Sun, 20 Oct 2002 18:23:06 +0000 Subject: Release-1.2.18-20021020 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/doxmlparser/include/doxmlintf.h | 46 +- addon/doxmlparser/src/basehandler.h | 6 +- addon/doxmlparser/src/compoundhandler.cpp | 35 +- addon/doxmlparser/src/compoundhandler.h | 66 +- addon/doxmlparser/src/dochandler.cpp | 205 +- addon/doxmlparser/src/dochandler.h | 78 +- addon/doxmlparser/src/doxmlintf.h | 46 +- addon/doxmlparser/src/mainhandler.cpp | 6 +- addon/doxmlparser/src/memberhandler.cpp | 22 +- addon/doxmlparser/src/memberhandler.h | 12 +- addon/doxmlparser/src/paramhandler.cpp | 33 + addon/doxmlparser/src/paramhandler.h | 21 + addon/doxmlparser/src/stringimpl.h | 2 + addon/doxmlparser/test/main.cpp | 28 +- packages/rpm/doxygen.spec | 2 +- src/classdef.cpp | 3 + src/cmdmapper.cpp | 3 + src/cmdmapper.h | 5 +- src/code.l | 18 +- src/defargs.l | 1 + src/doc.h | 34 - src/doc.l | 3073 ----------------------------- src/docparser.cpp | 48 + src/docparser.h | 14 +- src/doctokenizer.l | 29 +- src/dot.cpp | 2 +- src/doxygen.cpp | 11 +- src/htmlgen.cpp | 10 +- src/htmlgen.h | 67 - src/latexdocvisitor.cpp | 15 +- src/latexgen.cpp | 92 +- src/latexgen.h | 4 +- src/mangen.cpp | 30 +- src/mangen.h | 4 +- src/memberdef.cpp | 16 +- src/memberdef.h | 12 +- src/outputgen.h | 10 +- src/outputlist.cpp | 68 +- src/outputlist.h | 132 -- src/rtfgen.cpp | 36 +- src/rtfgen.h | 4 +- src/scanner.l | 6 +- src/translator_br.h | 160 +- src/translator_ca.h | 2 +- src/translator_cz.h | 23 +- src/translator_de.h | 2 +- src/translator_dk.h | 2 +- src/translator_en.h | 2 +- src/translator_es.h | 2 +- src/translator_fi.h | 2 +- src/translator_fr.h | 2 +- src/translator_gr.h | 2 +- src/translator_hr.h | 2 +- src/translator_hu.h | 2 +- src/translator_nl.h | 2 +- src/translator_no.h | 2 +- src/translator_pl.h | 2 +- src/translator_pt.h | 2 +- src/translator_ro.h | 2 +- src/translator_ru.h | 23 +- src/translator_se.h | 2 +- src/translator_sk.h | 2 +- src/translator_sr.h | 2 +- src/translator_tw.h | 2 +- src/util.cpp | 1 - src/xmldocvisitor.cpp | 12 +- src/xmlgen.cpp | 886 +-------- 70 files changed, 955 insertions(+), 4553 deletions(-) delete mode 100644 src/doc.h delete mode 100644 src/doc.l diff --git a/INSTALL b/INSTALL index 1e97587..4470c55 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.18-20021013 +DOXYGEN Version 1.2.18-20021020 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (13 October 2002) +Dimitri van Heesch (20 October 2002) diff --git a/README b/README index 8914c99..8608a25 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.18_20021013 +DOXYGEN Version 1.2.18_20021020 Please read INSTALL for compilation instructions. @@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. Enjoy, -Dimitri van Heesch (dimitri@stack.nl) (13 October 2002) +Dimitri van Heesch (dimitri@stack.nl) (20 October 2002) diff --git a/VERSION b/VERSION index 33342af..e36a3bf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.18-20021013 +1.2.18-20021020 diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h index d0d3c2a..55eb946 100644 --- a/addon/doxmlparser/include/doxmlintf.h +++ b/addon/doxmlparser/include/doxmlintf.h @@ -131,8 +131,8 @@ class IDoc enum Kind { Invalid = 0, // 0 - Para = 1, // 1 -> IDocPara - Text = 2, // 2 -> IDocText + Para, // 1 -> IDocPara + Text, // 2 -> IDocText MarkupModifier, // 3 -> IDocMarkupModifier ItemizedList, // 4 -> IDocItemizedList OrderedList, // 5 -> IDocOrderedList @@ -160,7 +160,9 @@ class IDoc Row, // 27 -> IDocRow Entry, // 28 -> IDocEntry Section, // 29 -> IDocSection - Root, // 30 -> IDocRoot + Preformatted, // 30 -> IDocPreformatted + Symbol, // 31 -> IDocSymbol + Root // 32 -> IDocRoot }; virtual Kind kind() const = 0; }; @@ -177,10 +179,8 @@ class IDocMarkup : public IDoc Subscript = 0x08, Superscript = 0x10, SmallFont = 0x20, - Center = 0x40, - Preformatted = 0x80 + Center = 0x40 }; - }; class IDocPara : public IDoc @@ -393,6 +393,24 @@ class IDocSection : public IDoc virtual IDocIterator *title() const = 0; }; +class IDocPreformatted : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocSymbol : public IDoc +{ + public: + enum Types + { Invalid = 0, + Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual char letter() const = 0; +}; + class IDocRoot : public IDoc { public: @@ -737,15 +755,15 @@ class IClass : public ICompound virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; // TODO: // class: - // ITemplateParamListIterator *templateParamLists() // listOfAllMembers() - // locationFile() - // locationLine() - // locationBodyStartLine() - // locationBodyEndLine() }; /*! \brief The interface to a struct in the object model. @@ -756,6 +774,10 @@ class IStruct : public ICompound virtual ICompoundIterator *nestedCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; }; /*! \brief The interface to a union in the object model. @@ -822,6 +844,8 @@ class IGroup : public ICompound */ class IPage : public ICompound { + public: + virtual const IDocTitle *title() const = 0; }; /*! Root node of the object model. */ diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h index 0fb59bd..6137259 100644 --- a/addon/doxmlparser/src/basehandler.h +++ b/addon/doxmlparser/src/basehandler.h @@ -75,11 +75,11 @@ template class ElementMapper Handler m_handler; }; + public: typedef StartElementHandler StartElementHandlerT; typedef EndElementHandler EndElementHandlerT; - - public: - ElementMapper() : m_startHandlers(67), m_endHandlers(67) + + ElementMapper() : m_startHandlers(67), m_endHandlers(67) { m_startHandlers.setAutoDelete(TRUE); m_endHandlers.setAutoDelete(TRUE); diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 62275ce..623ac71 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -145,15 +145,15 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) : m_brief(0), m_detailed(0), m_programListing(0), m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257), m_mainHandler(0), m_inheritanceGraph(0), m_collaborationGraph(0), - m_includeDependencyGraph(0), m_includedByDependencyGraph(0), - m_hasTemplateParams(FALSE) + m_includeDependencyGraph(0), m_includedByDependencyGraph(0), m_templateParamList(0), + m_titleHandler(0) { m_superClasses.setAutoDelete(TRUE); m_subClasses.setAutoDelete(TRUE); m_sections.setAutoDelete(TRUE); m_memberNameDict.setAutoDelete(TRUE); m_innerCompounds.setAutoDelete(TRUE); - m_templateParams.setAutoDelete(TRUE); + m_params.setAutoDelete(TRUE); addStartHandler("doxygen"); addEndHandler("doxygen"); @@ -201,16 +201,19 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup); addEndHandler("innergroup"); - addStartHandler("templateparamlist"); + addStartHandler("templateparamlist",this,&CompoundHandler::startTemplateParamList); addEndHandler("templateparamlist"); addStartHandler("param",this,&CompoundHandler::startParam); addEndHandler("param"); + + addStartHandler("title",this,&CompoundHandler::startTitle); } CompoundHandler::~CompoundHandler() { debug(2,"CompoundHandler::~CompoundHandler()\n"); + delete m_titleHandler; delete m_brief; delete m_detailed; delete m_programListing; @@ -265,6 +268,8 @@ void CompoundHandler::startLocation(const QXmlAttributes& attrib) { m_defFile = attrib.value("file"); m_defLine = attrib.value("line").toInt(); + m_defBodyStart = attrib.value("bodystart").toInt(); + m_defBodyEnd = attrib.value("bodyend").toInt(); } void CompoundHandler::endCompoundName() @@ -295,10 +300,15 @@ void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib) void CompoundHandler::startParam(const QXmlAttributes& attrib) { - m_hasTemplateParams = TRUE; ParamHandler *ph = new ParamHandler(this); ph->startParam(attrib); - m_templateParams.append(ph); + m_params.append(ph); +} + +void CompoundHandler::startTemplateParamList(const QXmlAttributes& attrib) +{ + m_templateParamList = new TemplateParamListHandler(this); + m_templateParamList->startParam(attrib); } void CompoundHandler::addSuperClass(const QXmlAttributes& attrib) @@ -349,6 +359,13 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib) m_subClasses.append(sc); } +void CompoundHandler::startTitle(const QXmlAttributes& attrib) +{ + ASSERT(m_titleHandler==0); + m_titleHandler = new TitleHandler(this); + m_titleHandler->startTitle(attrib); +} + bool CompoundHandler::parseXML(const char *compId) { QFile xmlFile(m_xmlDir+"/"+compId+".xml"); @@ -506,6 +523,10 @@ IDocProgramListing *CompoundHandler::source() const IParamIterator *CompoundHandler::templateParameters() const { - return m_hasTemplateParams ? new ParamIterator(m_templateParams) : 0; + return m_templateParamList ? m_templateParamList->templateParams() : 0; } +const IDocTitle *CompoundHandler::title() const +{ + return m_titleHandler; +} diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h index ae567b6..b099be4 100644 --- a/addon/doxmlparser/src/compoundhandler.h +++ b/addon/doxmlparser/src/compoundhandler.h @@ -32,7 +32,8 @@ class MemberHandler; class CompoundHandler; class SectionHandler; class ParamHandler; - +class TemplateParamListHandler; +class TitleHandler; class RelatedCompound : public IRelatedCompound { @@ -97,6 +98,8 @@ class CompoundHandler : public IClass, virtual void startInnerFile(const QXmlAttributes& attrib); virtual void startInnerGroup(const QXmlAttributes& attrib); virtual void startParam(const QXmlAttributes& attrib); + virtual void startTitle(const QXmlAttributes& attrib); + virtual void startTemplateParamList(const QXmlAttributes& attrib); virtual void addref() { m_refCount++; } CompoundHandler(const QString &dirName); @@ -126,39 +129,48 @@ class CompoundHandler : public IClass, IRelatedCompoundIterator *derivedCompounds() const; ICompoundIterator *nestedCompounds() const; ICompoundIterator *nestedGroup() const; + const IString *locationFile() const { return &m_defFile; } + int locationLine() const { return m_defLine; } + int locationBodyStartLine() const { return m_defBodyStart; } + int locationBodyEndLine() const { return m_defBodyEnd; } // IFile implementation IGraph *includeDependencyGraph() const; IGraph *includedByDependencyGraph() const; IDocProgramListing *source() const; + + // IPage implementation + const IDocTitle *title() const; private: - QList m_superClasses; - QList m_subClasses; - QList m_sections; - QList m_templateParams; - DocHandler *m_brief; - DocHandler *m_detailed; - ProgramListingHandler *m_programListing; - StringImpl m_id; - StringImpl m_kindString; - CompoundKind m_kind; - StringImpl m_name; - QString m_defFile; - int m_defLine; - QString m_xmlDir; - int m_refCount; - QDict m_memberDict; - QDict > m_memberNameDict; - MainHandler *m_mainHandler; - GraphHandler *m_inheritanceGraph; - GraphHandler *m_collaborationGraph; - GraphHandler *m_includeDependencyGraph; - GraphHandler *m_includedByDependencyGraph; - QList m_innerCompounds; - ProgramListingHandler *m_source; - bool m_hasTemplateParams; - + QList m_superClasses; + QList m_subClasses; + QList m_sections; + QList m_params; + DocHandler* m_brief; + DocHandler* m_detailed; + ProgramListingHandler* m_programListing; + StringImpl m_id; + StringImpl m_kindString; + CompoundKind m_kind; + StringImpl m_name; + StringImpl m_defFile; + int m_defLine; + int m_defBodyStart; + int m_defBodyEnd; + QString m_xmlDir; + int m_refCount; + QDict m_memberDict; + QDict > m_memberNameDict; + MainHandler* m_mainHandler; + GraphHandler* m_inheritanceGraph; + GraphHandler* m_collaborationGraph; + GraphHandler* m_includeDependencyGraph; + GraphHandler* m_includedByDependencyGraph; + QList m_innerCompounds; + ProgramListingHandler* m_source; + TemplateParamListHandler* m_templateParamList; + TitleHandler* m_titleHandler; }; void compoundhandler_init(); diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index 6a37f7a..b822a90 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -117,9 +117,6 @@ MarkupHandler::MarkupHandler(QList &children,QString &curString) addStartHandler("superscript",this,&MarkupHandler::startSuperscript); addEndHandler("superscript",this,&MarkupHandler::endSuperscript); - - addStartHandler("preformatted",this,&MarkupHandler::startPreformatted); - addEndHandler("preformatted",this,&MarkupHandler::endPreformatted); } MarkupHandler::~MarkupHandler() @@ -234,20 +231,6 @@ void MarkupHandler::endSuperscript() m_curMarkup &= ~IDocMarkup::Superscript; } -void MarkupHandler::startPreformatted(const QXmlAttributes & /*attrib*/) -{ - addTextNode(); - m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,TRUE)); - m_curMarkup |= IDocMarkup::Preformatted; -} - -void MarkupHandler::endPreformatted() -{ - addTextNode(); - m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,FALSE)); - m_curMarkup &= ~IDocMarkup::Preformatted; -} - //---------------------------------------------------------------------- // ListItemHandler //---------------------------------------------------------------------- @@ -1314,6 +1297,69 @@ IDocIterator *TableHandler::rows() const return new TableIterator(*this); } +//---------------------------------------------------------------------- +// PreformattedHandler +//---------------------------------------------------------------------- + +PreformattedHandler::PreformattedHandler(IBaseHandler *parent) + : m_parent(parent) +{ + m_children.setAutoDelete(TRUE); + addEndHandler("preformatted",this,&PreformattedHandler::endPreformatted); +} + +PreformattedHandler::~PreformattedHandler() +{ +} + +void PreformattedHandler::startPreformatted(const QXmlAttributes&) +{ + m_parent->setDelegate(this); +} + +void PreformattedHandler::endPreformatted() +{ + m_parent->setDelegate(0); +} + +IDocIterator *PreformattedHandler::contents() const +{ + return new PreformattedIterator(*this); +} + +//---------------------------------------------------------------------- +// SymbolHandler +//---------------------------------------------------------------------- + +SymbolHandler::SymbolHandler(IBaseHandler *parent,Types type) + : m_parent(parent), m_letter('\0'), m_type(type) +{ + addEndHandler("symbol"); + switch (type) + { + case IDocSymbol::Invalid: m_typeString="invalid"; break; + case IDocSymbol::Umlaut: m_typeString="umlaut"; break; + case IDocSymbol::Acute: m_typeString="acute"; break; + case IDocSymbol::Grave: m_typeString="grave"; break; + case IDocSymbol::Circ: m_typeString="circ"; break; + case IDocSymbol::Tilde: m_typeString="tilde"; break; + case IDocSymbol::Szlig: m_typeString="szlig"; break; + case IDocSymbol::Cedil: m_typeString="cedil"; break; + case IDocSymbol::Ring: m_typeString="ring"; break; + case IDocSymbol::Nbsp: m_typeString="nbsp"; break; + case IDocSymbol::Copy: m_typeString="copy"; break; + } +} + +SymbolHandler::~SymbolHandler() +{ +} + +void SymbolHandler::startSymbol(const QXmlAttributes& attrib) +{ + QString ls = attrib.value("char"); + if (!ls.isEmpty()) m_letter = ls.latin1()[0]; +} //---------------------------------------------------------------------- // ParagraphHandler @@ -1346,6 +1392,17 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent) addStartHandler("dotfile",this,&ParagraphHandler::startDotFile); addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry); addStartHandler("table",this,&ParagraphHandler::startTable); + addStartHandler("preformatted",this,&ParagraphHandler::startPreformatted); + addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut); + addStartHandler("acute",this,&ParagraphHandler::startAcute); + addStartHandler("grave",this,&ParagraphHandler::startGrave); + addStartHandler("circ",this,&ParagraphHandler::startCirc); + addStartHandler("tilde",this,&ParagraphHandler::startTilde); + addStartHandler("szlig",this,&ParagraphHandler::startSzlig); + addStartHandler("cedil",this,&ParagraphHandler::startCedil); + addStartHandler("ring",this,&ParagraphHandler::startRing); + addStartHandler("nbsp",this,&ParagraphHandler::startNbsp); + addStartHandler("copy",this,&ParagraphHandler::startCopy); } ParagraphHandler::~ParagraphHandler() @@ -1502,6 +1559,94 @@ void ParagraphHandler::startTable(const QXmlAttributes& attrib) m_children.append(th); } +void ParagraphHandler::startPreformatted(const QXmlAttributes& attrib) +{ + addTextNode(); + PreformattedHandler *ph = new PreformattedHandler(this); + ph->startPreformatted(attrib); + m_children.append(ph); +} + +void ParagraphHandler::startUmlaut(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Umlaut); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startAcute(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Acute); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startGrave(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Grave); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCirc(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Circ); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startTilde(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Tilde); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startSzlig(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Szlig); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCedil(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Cedil); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startRing(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Ring); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startNbsp(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Nbsp); + sh->startSymbol(attrib); + m_children.append(sh); +} + +void ParagraphHandler::startCopy(const QXmlAttributes& attrib) +{ + addTextNode(); + SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Copy); + sh->startSymbol(attrib); + m_children.append(sh); +} + void ParagraphHandler::addTextNode() { if (!m_curString.isEmpty()) @@ -1587,12 +1732,17 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent) addEndHandler("briefdescription",this,&DocHandler::endDoc); addEndHandler("detaileddescription",this,&DocHandler::endDoc); + addEndHandler("internal"); addStartHandler("para",this,&DocHandler::startParagraph); addStartHandler("sect1",this,&DocHandler::startSect1); addStartHandler("sect2",this,&DocHandler::startSect2); addStartHandler("sect3",this,&DocHandler::startSect3); + addStartHandler("sect4",this,&DocHandler::startSect4); + addStartHandler("sect5",this,&DocHandler::startSect5); + addStartHandler("sect6",this,&DocHandler::startSect6); addStartHandler("title",this,&DocHandler::startTitle); + addStartHandler("internal"); } DocHandler::~DocHandler() @@ -1639,6 +1789,27 @@ void DocHandler::startSect3(const QXmlAttributes& attrib) m_children.append(secHandler); } +void DocHandler::startSect4(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,4); + secHandler->startDocSection(attrib); + m_children.append(secHandler); +} + +void DocHandler::startSect5(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,5); + secHandler->startDocSection(attrib); + m_children.append(secHandler); +} + +void DocHandler::startSect6(const QXmlAttributes& attrib) +{ + DocSectionHandler *secHandler = new DocSectionHandler(this,6); + secHandler->startDocSection(attrib); + m_children.append(secHandler); +} + void DocHandler::startTitle(const QXmlAttributes& attrib) { TitleHandler *titleHandler = new TitleHandler(this); diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h index 7b24458..0e657f1 100644 --- a/addon/doxmlparser/src/dochandler.h +++ b/addon/doxmlparser/src/dochandler.h @@ -64,6 +64,8 @@ DEFINE_CLS_IMPL(DocTable); DEFINE_CLS_IMPL(DocRow); DEFINE_CLS_IMPL(DocEntry); DEFINE_CLS_IMPL(DocSection); +DEFINE_CLS_IMPL(DocPreformatted); +DEFINE_CLS_IMPL(DocSymbol); DEFINE_CLS_IMPL(DocRoot); //----------------------------------------------------------------------------- @@ -138,8 +140,6 @@ class MarkupHandler : public BaseFallBackHandler virtual void endSubscript(); virtual void startSuperscript(const QXmlAttributes &attrib); virtual void endSuperscript(); - virtual void startPreformatted(const QXmlAttributes &attrib); - virtual void endPreformatted(); private: @@ -189,6 +189,17 @@ class ParagraphHandler : public DocParaImpl, virtual void startDotFile(const QXmlAttributes& attrib); virtual void startIndexEntry(const QXmlAttributes& attrib); virtual void startTable(const QXmlAttributes& attrib); + virtual void startPreformatted(const QXmlAttributes& attrib); + virtual void startUmlaut(const QXmlAttributes& attrib); + virtual void startAcute(const QXmlAttributes& attrib); + virtual void startGrave(const QXmlAttributes& attrib); + virtual void startCirc(const QXmlAttributes& attrib); + virtual void startTilde(const QXmlAttributes& attrib); + virtual void startSzlig(const QXmlAttributes& attrib); + virtual void startCedil(const QXmlAttributes& attrib); + virtual void startRing(const QXmlAttributes& attrib); + virtual void startNbsp(const QXmlAttributes& attrib); + virtual void startCopy(const QXmlAttributes& attrib); ParagraphHandler(IBaseHandler *parent); virtual ~ParagraphHandler(); @@ -975,6 +986,64 @@ class TableIterator : public BaseIteratorVia(handler.m_children) {} }; +//----------------------------------------------------------------------------- + +/*! \brief Node representing an preformatted section + */ +class PreformattedHandler : public DocPreformattedImpl, + public BaseHandler +{ + friend class PreformattedIterator; + public: + PreformattedHandler(IBaseHandler *parent); + virtual ~PreformattedHandler(); + void startPreformatted(const QXmlAttributes& attrib); + void endPreformatted(); + + // IDocPreformatted + virtual IDocIterator *contents() const; + virtual Kind kind() const { return DocImpl::Preformatted; } + + private: + IBaseHandler *m_parent; + QList m_children; +}; + +class PreformattedIterator : + public BaseIteratorVia +{ + public: + PreformattedIterator(const PreformattedHandler &handler) : + BaseIteratorVia(handler.m_children) {} +}; + +//----------------------------------------------------------------------------- + +/*! \brief Node representing an special symbol. + * + */ +// children: - +class SymbolHandler : public DocSymbolImpl, public BaseHandler +{ + public: + SymbolHandler(IBaseHandler *parent,Types type); + virtual ~SymbolHandler(); + void startSymbol(const QXmlAttributes& attrib); + void endSymbol(); + + // IDocSymbol + virtual Kind kind() const { return DocImpl::Symbol; } + virtual Types type() const { return m_type; } + virtual const IString *typeString() const { return &m_typeString; } + virtual char letter() const { return m_letter; } + + private: + IBaseHandler *m_parent; + char m_letter; + Types m_type; + StringImpl m_typeString; +}; + //----------------------------------------------------------------------------- @@ -1033,6 +1102,9 @@ class DocHandler : public DocRootImpl, public BaseHandler virtual void startSect1(const QXmlAttributes& attrib); virtual void startSect2(const QXmlAttributes& attrib); virtual void startSect3(const QXmlAttributes& attrib); + virtual void startSect4(const QXmlAttributes& attrib); + virtual void startSect5(const QXmlAttributes& attrib); + virtual void startSect6(const QXmlAttributes& attrib); virtual void startTitle(const QXmlAttributes& attrib); DocHandler(IBaseHandler *parent); @@ -1054,6 +1126,8 @@ class DocIterator : public BaseIteratorVia BaseIteratorVia(handler.m_children) {} }; +//----------------------------------------------------------------------------- + void dochandler_init(); void dochandler_exit(); diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h index d0d3c2a..55eb946 100644 --- a/addon/doxmlparser/src/doxmlintf.h +++ b/addon/doxmlparser/src/doxmlintf.h @@ -131,8 +131,8 @@ class IDoc enum Kind { Invalid = 0, // 0 - Para = 1, // 1 -> IDocPara - Text = 2, // 2 -> IDocText + Para, // 1 -> IDocPara + Text, // 2 -> IDocText MarkupModifier, // 3 -> IDocMarkupModifier ItemizedList, // 4 -> IDocItemizedList OrderedList, // 5 -> IDocOrderedList @@ -160,7 +160,9 @@ class IDoc Row, // 27 -> IDocRow Entry, // 28 -> IDocEntry Section, // 29 -> IDocSection - Root, // 30 -> IDocRoot + Preformatted, // 30 -> IDocPreformatted + Symbol, // 31 -> IDocSymbol + Root // 32 -> IDocRoot }; virtual Kind kind() const = 0; }; @@ -177,10 +179,8 @@ class IDocMarkup : public IDoc Subscript = 0x08, Superscript = 0x10, SmallFont = 0x20, - Center = 0x40, - Preformatted = 0x80 + Center = 0x40 }; - }; class IDocPara : public IDoc @@ -393,6 +393,24 @@ class IDocSection : public IDoc virtual IDocIterator *title() const = 0; }; +class IDocPreformatted : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocSymbol : public IDoc +{ + public: + enum Types + { Invalid = 0, + Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual char letter() const = 0; +}; + class IDocRoot : public IDoc { public: @@ -737,15 +755,15 @@ class IClass : public ICompound virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; // TODO: // class: - // ITemplateParamListIterator *templateParamLists() // listOfAllMembers() - // locationFile() - // locationLine() - // locationBodyStartLine() - // locationBodyEndLine() }; /*! \brief The interface to a struct in the object model. @@ -756,6 +774,10 @@ class IStruct : public ICompound virtual ICompoundIterator *nestedCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; }; /*! \brief The interface to a union in the object model. @@ -822,6 +844,8 @@ class IGroup : public ICompound */ class IPage : public ICompound { + public: + virtual const IDocTitle *title() const = 0; }; /*! Root node of the object model. */ diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp index 1a130e2..16d12b3 100644 --- a/addon/doxmlparser/src/mainhandler.cpp +++ b/addon/doxmlparser/src/mainhandler.cpp @@ -228,13 +228,16 @@ ICompound *MainHandler::compoundById(const char *id) const // unchanged. MainHandler *that = (MainHandler *)this; ch->initialize(that); + printf("loading compound %s in memory\n",id); that->m_compoundsLoaded.insert(id,ch); return ch->toICompound(); } void MainHandler::unloadCompound(CompoundHandler *ch) { - m_compoundsLoaded.remove(ch->id()->latin1()); + printf("unloading compound %s from memory\n",ch->id()->latin1()); + bool result = m_compoundsLoaded.remove(ch->id()->latin1()); + if (!result) printf("Failed to unload!\n"); } ICompound *MainHandler::compoundByName(const char *name) const @@ -276,6 +279,7 @@ IDoxygen *createObjectModel() void MainHandler::release() { + //printf("MainHandler::release()\n"); QDictIterator chi(m_compoundsLoaded); CompoundHandler *ch; for (chi.toFirst();(ch=chi.current());++chi) diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp index 018dfbd..74b1e32 100644 --- a/addon/doxmlparser/src/memberhandler.cpp +++ b/addon/doxmlparser/src/memberhandler.cpp @@ -82,7 +82,7 @@ IMember *MemberReference::member() const //------------------------------------------------------------------------------ -EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent) +EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent), m_brief(0), m_detailed(0) { addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue); @@ -90,6 +90,11 @@ EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent) addEndHandler("name",this,&EnumValueHandler::endName); addStartHandler("initializer",this,&EnumValueHandler::startInitializer); addEndHandler("initializer",this,&EnumValueHandler::endInitializer); + + addStartHandler("briefdescription",this,&EnumValueHandler::startBriefDesc); + + addStartHandler("detaileddescription",this,&EnumValueHandler::startDetailedDesc); + } void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/) @@ -122,6 +127,21 @@ void EnumValueHandler::endInitializer() m_initializer = m_curString; } +void EnumValueHandler::startBriefDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_brief = docHandler; +} + +void EnumValueHandler::startDetailedDesc(const QXmlAttributes& attrib) +{ + DocHandler *docHandler = new DocHandler(this); + docHandler->startDoc(attrib); + m_detailed = docHandler; +} + + //------------------------------------------------------------------------------ MemberHandler::MemberHandler(IBaseHandler *parent) diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h index abbe27c..f76655c 100644 --- a/addon/doxmlparser/src/memberhandler.h +++ b/addon/doxmlparser/src/memberhandler.h @@ -30,6 +30,7 @@ class MainHandler; class CompoundHandler; class SectionHandler; +class ParamHandler; struct MemberReference : public IMemberReference { @@ -59,6 +60,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler virtual void endInitializer(); virtual void startEnumValue(const QXmlAttributes& attrib); virtual void endEnumValue(); + virtual void startBriefDesc(const QXmlAttributes& attrib); + virtual void startDetailedDesc(const QXmlAttributes& attrib); // IEnumValue virtual const IString *name() const { return &m_name; } @@ -67,13 +70,20 @@ class EnumValueHandler : public IEnumValue, public BaseHandler void setName(const QString &name) { m_name=name; } void setInitializer(const QString &init) { m_initializer=init; } - virtual ~EnumValueHandler() {} + virtual ~EnumValueHandler() { delete m_brief; delete m_detailed; } EnumValueHandler(IBaseHandler *parent); + virtual IDocRoot *briefDescription() const + { return m_brief; } + virtual IDocRoot *detailedDescription() const + { return m_detailed; } + private: StringImpl m_name; StringImpl m_initializer; IBaseHandler *m_parent; + DocHandler *m_brief; + DocHandler *m_detailed; }; class EnumValueIterator : public BaseIterator diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp index 8647546..ecfdda2 100644 --- a/addon/doxmlparser/src/paramhandler.cpp +++ b/addon/doxmlparser/src/paramhandler.cpp @@ -17,6 +17,39 @@ #include "memberhandler.h" #include "debug.h" +TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent) +{ + addStartHandler("param",this,&TemplateParamListHandler::startParam); + //addEndHandler("param",this,&TemplateParamListHandler::endParam); + + addEndHandler("templateparamlist",this,&TemplateParamListHandler::endTemplateParamList); + +} + +void TemplateParamListHandler::startParam(const QXmlAttributes& attrib) +{ + ParamHandler *ph = new ParamHandler(this); + ph->startParam(attrib); + m_templateParams.append(ph); +} + +void TemplateParamListHandler::endParam() +{ +} + +void TemplateParamListHandler::startTemplateParamList(const QXmlAttributes& /*attrib*/) +{ + m_parent->setDelegate(this); + debug(2,"templateparamlist\n"); +} + +void TemplateParamListHandler::endTemplateParamList() +{ + m_parent->setDelegate(0); +} + +/////////////////////////////////////////////////////////////////////////////////////////////////////// + ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent) { addEndHandler("param",this,&ParamHandler::endParam); diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h index 0ab52d9..12cda44 100644 --- a/addon/doxmlparser/src/paramhandler.h +++ b/addon/doxmlparser/src/paramhandler.h @@ -26,6 +26,7 @@ #include "baseiterator.h" #include "linkedtexthandler.h" + class ParamHandler : public IParam, public BaseHandler { public: @@ -69,5 +70,25 @@ class ParamIterator : public BaseIterator BaseIterator(list) {} }; +class TemplateParamListHandler : public BaseHandler +{ + public: + + virtual void startParam(const QXmlAttributes& attrib); + virtual void endParam(); + + virtual void startTemplateParamList(const QXmlAttributes& attrib); + virtual void endTemplateParamList(); + + TemplateParamListHandler(IBaseHandler *parent); + virtual ~TemplateParamListHandler() {} + + ParamIterator* templateParams() { return new ParamIterator(m_templateParams); } + + protected: + IBaseHandler *m_parent; + QList m_templateParams; +}; + #endif diff --git a/addon/doxmlparser/src/stringimpl.h b/addon/doxmlparser/src/stringimpl.h index 017a0b6..ac4ee12 100644 --- a/addon/doxmlparser/src/stringimpl.h +++ b/addon/doxmlparser/src/stringimpl.h @@ -9,6 +9,8 @@ class StringImpl : public QString, public IString public: StringImpl() {} StringImpl(const QString &str) : QString(str) {} + StringImpl &operator=(const QString &str) + { QString::operator=(str); return *this; } virtual ~StringImpl() {} // IString diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp index 47854b2..7ac7720 100644 --- a/addon/doxmlparser/test/main.cpp +++ b/addon/doxmlparser/test/main.cpp @@ -47,6 +47,7 @@ QString linkedTextToString(ILinkedTextIterator *ti) */ void DumpDoc(IDoc *doc,int level) { + if (doc==0) return; QString indent; indent.fill(' ',level); //printf(" doc node kind=`%d'\n",doc->kind()); @@ -374,6 +375,29 @@ void DumpDoc(IDoc *doc,int level) InPrint(("
\n")); } break; + case IDoc::Preformatted: + { + InPrint(("\n")); + IDocPreformatted *pf = dynamic_cast(doc); + ASSERT(pf!=0); + IDocIterator *di = pf->contents(); + IDoc *pdoc; + for (di->toFirst();(pdoc=di->current());di->toNext()) + { + DumpDoc(pdoc,level+1); + } + di->release(); + InPrint(("\n")); + } + break; + case IDoc::Symbol: + { + IDocSymbol *sym = dynamic_cast(doc); + ASSERT(sym!=0); + InPrint(("\n", + sym->typeString()->latin1(),sym->letter())); + } + break; case IDoc::Root: { InPrint(("\n")); @@ -391,6 +415,7 @@ void DumpDoc(IDoc *doc,int level) break; default: + printf("Found unsupported node type %d!\n",doc->kind()); break; } } @@ -463,7 +488,7 @@ int main(int argc,char **argv) IDoxygen *dox = createObjectModel(); - dox->setDebugLevel(0); + dox->setDebugLevel(4); if (!dox->readXMLDir(argv[1])) { @@ -478,6 +503,7 @@ int main(int argc,char **argv) { printf("Compound name=%s id=%s kind=%s\n", comp->name()->latin1(),comp->id()->latin1(),comp->kindString()->latin1()); + ISectionIterator *sli = comp->sections(); ISection *sec; for (sli->toFirst();(sec=sli->current());sli->toNext()) diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 0454482..43a985a 100644 --- a/packages/rpm/doxygen.spec +++ b/packages/rpm/doxygen.spec @@ -1,6 +1,6 @@ Summary: A documentation system for C/C++. Name: doxygen -Version: 1.2.18_20021013 +Version: 1.2.18_20021020 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/src/classdef.cpp b/src/classdef.cpp index 9d9f041..f4b0c9a 100644 --- a/src/classdef.cpp +++ b/src/classdef.cpp @@ -485,6 +485,7 @@ void ClassDef::internalInsertMember(MemberDef *md, if (addToAllList) { + //printf("=======> adding member %s to class %s\n",md->name().data(),name().data()); MemberInfo *mi = new MemberInfo((MemberDef *)md, prot,md->virtualness(),FALSE); MemberNameInfo *mni=0; @@ -2505,6 +2506,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) { MemberDef *xmd = 0; MemberNameInfo *mni = m_allMemberNameInfoSDict->find(name); + //printf("getMemberByName(%s)=%p\n",name.data(),mni); if (mni) { const int maxInheritanceDepth = 100000; @@ -2514,6 +2516,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) for (mnii.toFirst();(mi=mnii.current());++mnii) { ClassDef *mcd=mi->memberDef->getClassDef(); + //printf("found member in %s\n",mcd->name().data()); int m=minClassDistance(this,mcd); if (misLinkable()) { diff --git a/src/cmdmapper.cpp b/src/cmdmapper.cpp index 449d467..0f9cb76 100644 --- a/src/cmdmapper.cpp +++ b/src/cmdmapper.cpp @@ -175,6 +175,9 @@ CommandMap htmlTagMap[] = { "h1", HTML_H1 }, { "h2", HTML_H2 }, { "h3", HTML_H3 }, + { "h4", HTML_H4 }, + { "h5", HTML_H5 }, + { "h6", HTML_H6 }, { 0, 0 } }; diff --git a/src/cmdmapper.h b/src/cmdmapper.h index e9dd096..ea765d4 100644 --- a/src/cmdmapper.h +++ b/src/cmdmapper.h @@ -131,7 +131,10 @@ enum HtmlTagType HTML_P = 24, HTML_H1 = 25, HTML_H2 = 26, - HTML_H3 = 27 + HTML_H3 = 27, + HTML_H4 = 28, + HTML_H5 = 29, + HTML_H6 = 30 }; class CmdMapper diff --git a/src/code.l b/src/code.l index d6f8930..79fc82a 100644 --- a/src/code.l +++ b/src/code.l @@ -65,6 +65,7 @@ static const char * g_inputString; //!< the code fragment as text static int g_inputPosition; //!< read offset during parsing static int g_inputLines; //!< number of line in the code fragment static int g_yyLineNr; //!< current line number +static bool g_needsTermination; static bool g_exampleBlock; static QCString g_exampleName; @@ -923,7 +924,17 @@ static int countLines() const char *p=g_inputString; char c; int count=1; - while ((c=*p++)) if (c=='\n') count++; + while ((c=*p)) + { + p++ ; + if (c=='\n') count++; + } + if (p>g_inputString && *(p-1)!='\n') + { // last line does not end with a \n, so we add an extra + // line and explicitly terminate the line after parsing. + count++, + g_needsTermination=TRUE; + } return count; } @@ -1989,14 +2000,17 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s, g_inputString = s; g_inputPosition = 0; g_currentFontClass = 0; + g_needsTermination = FALSE; if (endLine!=-1) g_inputLines = endLine+1; else g_inputLines = countLines(); + if (startLine!=-1) g_yyLineNr = startLine; else g_yyLineNr = 1; + g_curlyCount = 0; g_bodyCurlyCount = 0; g_bracketCount = 0; @@ -2027,7 +2041,7 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s, codeYYrestart( codeYYin ); BEGIN( Body ); codeYYlex(); - if (g_inputLines==1) + if (g_needsTermination) { endFontClass(); g_code->endCodeLine(); diff --git a/src/defargs.l b/src/defargs.l index 7cdd523..7e08225 100644 --- a/src/defargs.l +++ b/src/defargs.l @@ -255,6 +255,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* if (*yytext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty()) { g_curArgTypeName+=*yytext; + BEGIN(FuncQual); } else { diff --git a/src/doc.h b/src/doc.h deleted file mode 100644 index a88254a..0000000 --- a/src/doc.h +++ /dev/null @@ -1,34 +0,0 @@ -/****************************************************************************** - * - * - * - * Copyright (C) 1997-2002 by Dimitri van Heesch. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software - * for any purpose. It is provided "as is" without express or implied warranty. - * See the GNU General Public License for more details. - * - * Documents produced by Doxygen are derivative works derived from the - * input used in their production; they are not affected by this license. - * - */ - -#ifndef DOC_H -#define DOC_H - -#include "qtbc.h" - -class OutputDocInterface; -class MemberDef; - -extern void parseDoc(OutputDocInterface &ol, - const char *fileName,int startLine, - const char *clName, MemberDef *md, - const QCString &docString); -extern void parseExample(OutputDocInterface &ol,const QCString &docString, - const char *fileName); -extern void parseText(OutputDocInterface &ol,const QCString &txtString); - -#endif diff --git a/src/doc.l b/src/doc.l deleted file mode 100644 index 2fe980f..0000000 --- a/src/doc.l +++ /dev/null @@ -1,3073 +0,0 @@ -/**************************************************************************** - * - * - * - * Copyright (C) 1997-2002 by Dimitri van Heesch. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software - * for any purpose. It is provided "as is" without express or implied warranty. - * See the GNU General Public License for more details. - * - * Documents produced by Doxygen are derivative works derived from the - * input used in their production; they are not affected by this license. - * - */ - -%{ - -/* - * includes - */ -#include -#include -#include -#include - -#include "qtbc.h" -#include -#include -#include - -// new experimental parser -#include "debug.h" - -#include "doc.h" -#include "code.h" -#include "message.h" -#include "doxygen.h" -#include "config.h" -#include "util.h" -#include "language.h" -#include "outputlist.h" -#include "reflist.h" -#include "page.h" - -#ifndef WIN32 -#include -#endif - -#define YY_NEVER_INTERACTIVE 1 - -/* ----------------------------------------------------------------- - * - * scanner's state variables - */ -static MemberDef * memberDef; -static bool hasParamCommand; -static QDict paramsFound; - -static OutputDocInterface * outDoc; -static bool insideArgumentList; -static QCString className; -static QCString linkRef; -static QCString linkText; -static QCString codeBlock; -static const char * inputString; -static int inputPosition; -static char yyFileName[4096] ; -static int yyLineNr = 1 ; -static bool exampleDoc; -static QCString exampleName; -static QCString htmlUrl,htmlText; -static QCString currentIncludeFile; -static int includeFileOffset = 0; -static int includeFileLength = 0; -static bool firstLine; -static bool inParamBlock; -static bool inRetValBlock; -static bool inExceptionBlock; -static bool inSeeBlock; -static bool inReturnBlock; -static bool inAuthorBlock; -static bool inDeprecatedBlock; -static bool inVersionBlock; -static bool inSinceBlock; -static bool inDateBlock; -static bool inBugBlock; -static bool inNoteBlock; -static bool inPreBlock; -static bool inPostBlock; -static bool inInvarBlock; -static bool inWarningBlock; -static bool inRemarkBlock; -static bool inAttentionBlock; -static bool inParBlock; -static bool insideHtmlLink; -static QCString sectionRef; -static bool insideVerbatim = FALSE; -static bool insidePre = FALSE; -static int depthIf; -static QCString curImageName; -static QCString curImageCaption; -static QCString curDotFileName; -static QCString curDotFileCaption; -static QCString internalRefFile; -static QCString internalRefAnchor; -static QCString caption; -static QCString refItemText; -static QCString addIndexWord; -static QStack currentListIndent; // indent stack of all list items -static bool insideItemList = FALSE; - -struct DocLexerContext -{ - int rule; - int position; - const char *inputString; - YY_BUFFER_STATE lexerState; -}; - -static QStack lexerStack; - -static void pushContext() -{ - DocLexerContext *ctx = new DocLexerContext; - ctx->rule = YY_START; - ctx->position = inputPosition; - ctx->inputString = inputString; - ctx->lexerState = YY_CURRENT_BUFFER; - lexerStack.push(ctx); - yy_switch_to_buffer(yy_create_buffer(docYYin, YY_BUF_SIZE)); -} - -static bool popContext() -{ - if (lexerStack.isEmpty()) return TRUE; - DocLexerContext *ctx = lexerStack.pop(); - inputPosition = ctx->position; - inputString = ctx->inputString; - yy_delete_buffer(YY_CURRENT_BUFFER); - yy_switch_to_buffer(ctx->lexerState); - BEGIN(ctx->rule); - delete ctx; - return TRUE; -} - -static QCString copyDocString; -static QCString copyDocScope; -static QList copyDocDefList; - -//----------------------------------------------------------------------------- - -static void initParser() -{ - insideArgumentList=FALSE; - className.resize(0); - linkRef.resize(0); - linkText.resize(0); - codeBlock.resize(0); - htmlUrl.resize(0); - htmlText.resize(0); - currentIncludeFile.resize(0); - includeFileOffset = 0; - includeFileLength = 0; - firstLine = TRUE; - inParamBlock = FALSE; - inRetValBlock = FALSE; - inExceptionBlock = FALSE; - inSeeBlock = FALSE; - inReturnBlock = FALSE; - inAuthorBlock = FALSE; - inDeprecatedBlock = FALSE; - inVersionBlock = FALSE; - inSinceBlock = FALSE; - inDateBlock = FALSE; - inBugBlock = FALSE; - inNoteBlock = FALSE; - inPreBlock = FALSE; - inPostBlock = FALSE; - inInvarBlock = FALSE; - inWarningBlock = FALSE; - inRemarkBlock = FALSE; - inAttentionBlock = FALSE; - inParBlock = FALSE; - insideHtmlLink = FALSE; -} - -//----------------------------------------------------------------------------- - -void scanString(const char *s); -void scanDoc(const char *s); -void internalParseDocument(const char *s); - -//----------------------------------------------------------------------------- - -class TableElem -{ - public: - TableElem(int r,int c); - ~TableElem(); - int getRow() { return row; } - int getCol() { return col; } - OutputDocInterface *outputDocInterface() { return od; } - - private: - OutputDocInterface *od; - int row; - int col; -}; - -TableElem::TableElem(int r,int c) -{ - //printf("TableElem::TableElem(%d,%d)\n",r,c); - od=outDoc->clone(); - outDoc=od; - row=r; - col=c; -} - -TableElem::~TableElem() -{ - //printf("TableElem::~TableElem(%d,%d)\n",row,col); - delete od; od=0; -} - -class Table -{ - public: - Table(); - ~Table(); - void newRow(); - void newElem(); - void setCaption(const char *s); - - private: - OutputDocInterface *m_parentDoc; - QList *m_elemList; - QCString m_caption; - int m_curRow; - int m_curCol; - int m_rows; - int m_cols; -}; - -Table::Table() -{ - m_parentDoc=outDoc; - m_elemList=new QList; - m_elemList->setAutoDelete(TRUE); - m_curRow=m_curCol=m_rows=m_cols=0; -} - -Table::~Table() -{ - //printf("Table::~Table()\n"); - // use elemList & cols & rows - if (m_cols>0 && m_rows>0) - { - m_parentDoc->startTable(!m_caption.isEmpty(),m_cols); - TableElem *e=m_elemList->first(); - while (e) - { - if (e->getRow()>0) - { - if (e->getCol()==0) - { - if (e->getRow()>1) m_parentDoc->endTableRow(); - m_parentDoc->nextTableRow(); - } - else - { - m_parentDoc->nextTableColumn(); - } - m_parentDoc->append(e->outputDocInterface()); - m_parentDoc->endTableColumn(); - } - e=m_elemList->next(); - } - if (!m_caption.isEmpty()) - { - m_parentDoc->startCaption(); - m_parentDoc->docify(m_caption); - m_parentDoc->endCaption(); - } - m_parentDoc->endTable(!m_caption.isEmpty()); - } - delete m_elemList; m_elemList=0; - outDoc=m_parentDoc; -} - -void Table::setCaption(const char *s) -{ - m_caption=s; -} - -void Table::newRow() -{ - //printf("Table::newRow()\n"); - m_curRow++; - if (m_curRow>m_rows) m_rows=m_curRow; - m_curCol=0; -} - -void Table::newElem() -{ - //printf("Table::newElem(%d,%d)\n",curRow,curCol); - TableElem *te = new TableElem(m_curRow,m_curCol); - m_elemList->append(te); - - m_curCol++; - if (m_curCol>m_cols) m_cols=m_curCol; -} - -static QStack tableStack; -static Table *curTable; - -static void startTable() -{ - //printf("startTable()\n"); - curTable=new Table; - tableStack.push(curTable); -} - -static void endTable() -{ - //printf("endTable()\n"); - delete tableStack.pop(); // the destructor adds the table to the stream! - curTable=tableStack.top(); -} - -static void forceEndTable() -{ - err("Error: More
tags found than
" - "tags in documentation block in file %s!\n",yyFileName); - while (!tableStack.isEmpty()) - { - endTable(); - } -} - -//----------------------------------------------------------------------------- - -static void includeFile(OutputDocInterface &od,const char *fileName,bool quiet) -{ - bool ambig; - FileDef *fd; - if ((fd=findFileDef(Doxygen::exampleNameDict,fileName,ambig))) - { - currentIncludeFile=fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES")); - includeFileOffset=0; - includeFileLength=currentIncludeFile.length(); - OutputDocInterface *codeFrag = od.clone(); - parseCode(*codeFrag,0,currentIncludeFile,exampleDoc,exampleName); - if (!quiet) - { - od.startCodeFragment(); - od.append(codeFrag); - od.endCodeFragment(); - } - delete codeFrag; - } - else if (ambig) - { - QCString text; - text.sprintf("Include file name %s is ambigious.\n",fileName); - text+="Possible candidates:\n"; - text+=showFileDefMatches(Doxygen::exampleNameDict,fileName); - warn(yyFileName,yyLineNr,text); - } - else - { - warn(yyFileName,yyLineNr, - "Warning: example file %s is not found. " - "Check your EXAMPLE_PATH",fileName - ); - } -} - -static void verbIncludeFile(OutputDocInterface &od,const char *name) -{ - bool ambig; - FileDef *fd; - if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig))) - { - od.startCodeFragment(); - od.codify(fileToString(fd->absFilePath(),Config_getBool("FILTER_SOURCE_FILES"))+"\n"); - od.endCodeFragment(); - } - else if (ambig) - { - QCString text; - text.sprintf("Include file name %s is ambigious.\n",name); - text+=("Possible candidates:\n"); - text+=showFileDefMatches(Doxygen::exampleNameDict,name); - warn(yyFileName,yyLineNr,text); - } - else - { - warn(yyFileName,yyLineNr, - "Warning: example file %s is not found. " - "Check your EXAMPLE_PATH",name); - } -} - -static void rawIncludeFile(OutputDocInterface &od,const char *name) -{ - bool ambig; - FileDef *fd; - if ((fd=findFileDef(Doxygen::exampleNameDict,name,ambig))) - { - od.writeString(fileToString(fd->absFilePath())); - } - else if (ambig) - { - QCString text; - text.sprintf("Include file name %s is ambigious.\n",name); - text+=("Possible candidates:\n"); - text+=showFileDefMatches(Doxygen::exampleNameDict,name); - warn(yyFileName,yyLineNr,text); - } - else - { - warn(yyFileName,yyLineNr, - "Warning: include file %s is not found. " - "Check your EXAMPLE_PATH",name); - } -} - - - -static QCString stripQuotes(const char *s) -{ - QCString name; - if (s==0 || *s==0) return name; - name=s; - if (name.at(0)=='"' && name.at(name.length()-1)=='"') - { - name=name.mid(1,name.length()-2); - } - return name; -} - -static QCString stripKnownExtensions(const char *text) -{ - QCString result=text; - if (result.right(4)==".tex") result=result.left(result.length()-4); - else if (result.right(Doxygen::htmlFileExtension.length())==Doxygen::htmlFileExtension) - { - result=result.left(result.length()-Doxygen::htmlFileExtension.length()); - } - //printf("%s stripKnowExtensions(%s)\n",result.data(),text); - return result; -} - -static void skipLine(OutputDocInterface &od,const char *key) -{ - bool found=FALSE; - while (!found) - { - QCString s; - char c; - while ( includeFileOffsetendDescTableData(); - outDoc->endDescTable(); - outDoc->endParamList(); - } - else - { - outDoc->endSimpleSect(); - } - currentListIndent.pop(); - inParamBlock=inRetValBlock=inSeeBlock=inReturnBlock=inAuthorBlock= - inVersionBlock=inSinceBlock=inDateBlock=inBugBlock=inNoteBlock=inWarningBlock= - inParBlock=inExceptionBlock=inDeprecatedBlock=inPreBlock=inPostBlock= - inInvarBlock=inRemarkBlock=inAttentionBlock=FALSE; -} - -//----------------------------------------------------------------- - -struct IndentInfo -{ - public: - IndentInfo(int i,bool e) : indent(i), enumerated(e) {}; - ~IndentInfo() {} - void startList() - { - if (enumerated) outDoc->startEnumList(); else outDoc->startItemList(); - } - void endList() - { - if (enumerated) outDoc->endEnumList(); else outDoc->endItemList(); - } - void writeItem() - { - outDoc->writeListItem(); - } - int indent; - bool enumerated; -}; - -static QStack listIndentStack; // indent stack of - items - -static int computeIndent(const char *str,int length) -{ - int i; - int indent=0; - int tabSize=Config_getInt("TAB_SIZE"); - for (i=0;istartList(); - listIndentStack.top()->writeItem(); - insideItemList=TRUE; - } - else - { - IndentInfo *pPrevInfo = listIndentStack.top(); - if (pPrevInfo->indent==indent && pPrevInfo->enumerated==enumerated) - // new item of same kind at the same indent level - { - pPrevInfo->writeItem(); - } - else if (pPrevInfo->indent==indent) - // new item of diffent kind at the same indent level - { - // switch to a diffent list type - pPrevInfo->endList(); - pPrevInfo->enumerated=enumerated; - pPrevInfo->startList(); - pPrevInfo->writeItem(); - } - else if (pPrevInfo->indentstartList(); - listIndentStack.top()->writeItem(); - } - else // end sub item list - { - while (pPrevInfo && pPrevInfo->indent>indent) - { - pPrevInfo->endList(); - listIndentStack.pop(); - currentListIndent.pop(); - delete pPrevInfo; - pPrevInfo = listIndentStack.top(); - } - // safe guard against wrong indenting - if (listIndentStack.isEmpty()) - { - insideItemList=FALSE; - warn(yyFileName,yyLineNr, - "Warning: list item with invalid indent found!"); - } - else - { - listIndentStack.top()->writeItem(); - } - } - } -} - -static void endListMarker(const char *marker,int dotPos) -{ - int indent=computeIndent(marker,dotPos); - //printf("endListMarker indent=%d " - // "insideItemList=%d listIndentStack.count()=%d\n", - // indent,insideItemList,listIndentStack.count()); - if (insideItemList && !listIndentStack.isEmpty()) - { - IndentInfo *ii = listIndentStack.top(); - while (ii && indent<=ii->indent) - { - ii->endList(); - listIndentStack.pop(); - currentListIndent.pop(); - delete ii; - ii = listIndentStack.top(); - //printf("ending list new indent=%d\n",ii ? ii->indent : -1); - } - if (listIndentStack.isEmpty()) - { - insideItemList=FALSE; - //printf("ending last list\n"); - } - } -} - -// end the current (nested) list regardless of the nesting level. -static void forceEndItemList() -{ - IndentInfo *info; - while ((info=listIndentStack.pop())!=0) - { - delete info; - } - while (!currentListIndent.isEmpty()) - { - char c=*currentListIndent.pop(); - switch(c) - { - case 'O': outDoc->endEnumList(); break; - case 'U': outDoc->endItemList(); break; - case 'D': outDoc->endDescription(); break; - case 'P': if (inBlock()) endBlock(); break; - default: - err("Unexpected list indent token `%c'\n",c); - } - } - insideItemList=FALSE; -} - -static void endArgumentList() -{ - if (insideArgumentList) - { - insideArgumentList=FALSE; - outDoc->endItemList(); - } -} - -//----------------------------------------------------------------- - -enum ImageTypes -{ - IT_Html, - IT_Latex, - IT_RTF -}; - -/*! search for an image in the imageNameDict and if found - * copies the image to the output directory (which is the - * html directory if type==0 or the latex directory if type==1) - */ -static QCString findAndCopyImage(const char *fileName,ImageTypes type) -{ - QCString result; - bool ambig; - FileDef *fd; - //printf("Search for %s\n",fileName); - if ((fd=findFileDef(Doxygen::imageNameDict,fileName,ambig))) - { - QFile inImage(QString(fd->absFilePath().data())); - if (inImage.open(IO_ReadOnly)) - { - result = fileName; - int i; - if ((i=result.findRev('/'))!=-1 || (i=result.findRev('\\'))!=-1) - { - result.right(result.length()-i-1); - } - QCString outputDir; - switch(type) - { - case IT_Html: - if (!Config_getBool("GENERATE_HTML")) return result; - outputDir = Config_getString("HTML_OUTPUT"); - break; - case IT_Latex: - if (!Config_getBool("GENERATE_LATEX")) return result; - outputDir = Config_getString("LATEX_OUTPUT"); - break; - case IT_RTF: - if (!Config_getBool("GENERATE_RTF")) return result; - outputDir = Config_getString("RTF_OUTPUT"); - break; - } - QCString outputFile = outputDir+"/"+result; - QFile outImage(QString(outputFile.data())); - if (outImage.open(IO_WriteOnly)) // copy the image - { - char *buffer = new char[inImage.size()]; - inImage.readBlock(buffer,inImage.size()); - outImage.writeBlock(buffer,inImage.size()); - outImage.flush(); - delete buffer; - } - else - { - warn(yyFileName,yyLineNr, - "Warning: could not write output image %s",outputFile.data()); - } - } - else - { - warn(yyFileName,yyLineNr, - "Warning: could not open image %s",fileName); - } - - if (type==IT_Latex && Config_getBool("USE_PDFLATEX") && - fd->name().right(4)==".eps" - ) - { // we have an .eps image in pdflatex mode => convert it to a pdf. - QCString outputDir = Config_getString("LATEX_OUTPUT"); - QCString baseName = fd->name().left(fd->name().length()-4); - QCString epstopdfArgs(4096); - epstopdfArgs.sprintf("\"%s/%s.eps\" --outfile=\"%s/%s.pdf\"", - outputDir.data(), baseName.data(), - outputDir.data(), baseName.data()); - if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0) - { - err("Error: Problems running epstopdf. Check your TeX installation!\n"); - } - return baseName; - } - } - else if (ambig) - { - QCString text; - text.sprintf("Warning: image file name %s is ambigious.\n",fileName); - text+="Possible candidates:\n"; - text+=showFileDefMatches(Doxygen::imageNameDict,fileName); - warn(yyFileName,yyLineNr,text); - } - else - { - result=fileName; - if (result.left(5)!="http:" && result.left(6)!="https:") - { - warn(yyFileName,yyLineNr, - "Warning: image file %s is not found in IMAGE_PATH: " - "assuming external image.",fileName - ); - } - } - return result; -} - - -void writeImage(ImageTypes it,const char *size) -{ - bool hasCaption=!curImageCaption.isEmpty(); - outDoc->pushGeneratorState(); - switch(it) - { - case IT_Latex: - { - outDoc->disableAllBut(OutputGenerator::Latex); - outDoc->startImage(curImageName,size,hasCaption); - if (hasCaption) - { - scanString(curImageCaption); - } - outDoc->endImage(hasCaption); - } - break; - case IT_Html: - { - outDoc->disableAllBut(OutputGenerator::Html); - outDoc->startImage(curImageName,0,hasCaption); - if (hasCaption) - { - scanString(curImageCaption); - } - outDoc->endImage(hasCaption); - } - break; - case IT_RTF: - { - outDoc->disableAllBut(OutputGenerator::RTF); - outDoc->startImage(curImageName,0,hasCaption); - if (hasCaption) - { - scanString(curImageCaption); - } - outDoc->endImage(hasCaption); - } - } - outDoc->popGeneratorState(); -} - -// search for a dot file in the dotFileNameDict, and if found -// generates the graph in the output directories. -static void writeDotFile(const char *fileName, const char *captionText) -{ - bool ambig; - FileDef *fd; - bool hasCaption = captionText!=0; - - if ((fd=findFileDef(Doxygen::dotFileNameDict,fileName,ambig))) - { - outDoc->startDotFile(fd->absFilePath(),hasCaption); - if (hasCaption) - { - scanString(captionText); - } - outDoc->endDotFile(hasCaption); - } - else if (ambig) - { - QCString text; - text.sprintf("Warning: dot file name %s is ambigious.\n",fileName); - text+="Possible candidates:\n"; - text+=showFileDefMatches(Doxygen::dotFileNameDict,fileName); - warn(yyFileName,yyLineNr,text); - } - else - { - warn(yyFileName,yyLineNr, - "Warning: dot file %s is not found in DOTFILE_DIRS! ",fileName - ); - } -} - -/* ----------------------------------------------------------------- */ - -static void checkArgName(const QCString &name,bool isParam) -{ - hasParamCommand=TRUE; - if (memberDef==0) return; // not a member - ArgumentList *al=memberDef->isDocsForDefinition() ? - memberDef->argumentList() : - memberDef->declArgumentList(); - if (al==0) return; // no argument list - if (!Config_getBool("WARN_IF_UNDOCUMENTED")) return; - - //printf("name=%s\n",name.data()); - static QRegExp re("[a-zA-Z0-9_]+\\.*"); - int p=0,i=0,l; - while ((i=re.match(name,p,&l))!=-1) - { - QCString aName=name.mid(i,l); - //printf("aName=%s\n",aName.data()); - ArgumentListIterator ali(*al); - Argument *a; - bool found=FALSE; - for (ali.toFirst();(a=ali.current());++ali) - { - QCString argName = memberDef->isDefine() ? a->type : a->name; - if (argName.right(3)=="...") argName=argName.left(argName.length()-3); - if (aName==argName) - { - //printf("adding `%s'\n",aName.data()); - paramsFound.insert(aName,(void *)(0x8)); - found=TRUE; - break; - } - } - if (!found && isParam) - { - //printf("member type=%d\n",memberDef->memberType()); - QCString scope=memberDef->getScopeString(); - if (!scope.isEmpty()) scope+="::"; else scope=""; - warn(memberDef->docFile(),memberDef->docLine(), - "Warning: argument `%s' of command @param " - "is not found in the argument list of %s%s%s", - aName.data(),scope.data(),memberDef->name().data(), - argListToString(al).data() - ); - } - p=i+l; - } -} - -/* ----------------------------------------------------------------- */ - -/*! Looks for a documentation block with name commandName in the current - * context (copyDocScope). The resulting documentation string is - * put in pDoc, the definition in which the documentation was found is - * put in pDef. - * @retval TRUE if name was found. - * @retval FALSE if name was not found. - */ -static bool findDocsForMemberOrCompound(const char *commandName, - QCString *pDoc, - Definition **pDef) -{ - pDoc->resize(0); - *pDef=0; - QCString cmdArg=commandName; - int l=cmdArg.length(); - if (l==0) return FALSE; - - int funcStart=cmdArg.find('('); - if (funcStart==-1) funcStart=l; - //int lastScopeStart=cmdArg.findRev("::",funcStart); - //int lastScopeEnd = lastScopeStart==-1 ? 0 : lastScopeStart+2; - //QCString scope=cmdArg.left(QMAX(lastScopeStart,0)); - //QCString name=cmdArg.mid(lastScopeEnd,funcStart-lastScopeEnd); - QCString name=cmdArg.left(funcStart); - QCString args=cmdArg.right(l-funcStart); - - // try if the link is to a member - MemberDef *md=0; - ClassDef *cd=0; - FileDef *fd=0; - NamespaceDef *nd=0; - GroupDef *gd=0; - PageInfo *pi=0; - bool found = getDefs(copyDocScope,name,args,md,cd,fd,nd,gd,FALSE,0,TRUE); - if (found && md) - { - *pDoc=md->documentation(); - *pDef=md; - return TRUE; - } - - - int scopeOffset=copyDocScope.length(); - do // for each scope - { - QCString fullName=cmdArg; - if (scopeOffset>0) - { - fullName.prepend(copyDocScope.left(scopeOffset)+"::"); - } - //printf("Trying fullName=`%s'\n",fullName.data()); - - // try class, namespace, group, page, file reference - cd = Doxygen::classSDict[fullName]; - if (cd) // class - { - *pDoc=cd->documentation(); - *pDef=cd; - return TRUE; - } - nd = Doxygen::namespaceSDict[fullName]; - if (nd) // namespace - { - *pDoc=nd->documentation(); - *pDef=nd; - return TRUE; - } - gd = Doxygen::groupSDict[cmdArg]; - if (gd) // group - { - *pDoc=gd->documentation(); - *pDef=gd; - return TRUE; - } - pi = Doxygen::pageSDict->find(cmdArg); - if (pi) // page - { - *pDoc=pi->doc; - *pDef=(Definition *)pi; - return TRUE; - } - bool ambig; - fd = findFileDef(Doxygen::inputNameDict,cmdArg,ambig); - if (fd && !ambig) // file - { - *pDoc=fd->documentation(); - *pDef=fd; - return TRUE; - } - - if (scopeOffset==0) - { - scopeOffset=-1; - } - else - { - scopeOffset = copyDocScope.findRev("::",scopeOffset-1); - if (scopeOffset==-1) scopeOffset=0; - } - } while (scopeOffset>=0); - - - return FALSE; -} - -/* ----------------------------------------------------------------- */ - -static void writeSpecialItem(const char *commandString) -{ - QCString cmd = commandString; // format "\test 20" or "\todo 4" - int sepPos=cmd.find(' '); - QCString listName = cmd.mid(1,cmd.length()-sepPos-1); // i.e. "test" or "todo" - RefList *refList = Doxygen::specialLists->find(cmd.mid(1,sepPos-1)); - ASSERT(refList!=0); - if (Config_getBool(refList->optionName())) - { - QCString numStr=cmd.right(cmd.length()-sepPos-1); // i.e. "20" or "4" - bool ok; int num = numStr.toUInt(&ok); - RefItem *item = refList->getRefItem(num); - ASSERT(item!=0); - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (inBlock()) endBlock(); - currentListIndent.push("P"); - outDoc->startSimpleSect(refList->sectionType(), - refList->listName(), - item->listAnchor, - refList->sectionTitle()+": " - ); - outDoc->writeDescItem(); - internalParseDocument(item->text); - outDoc->endSimpleSect(); - currentListIndent.pop(); - } -} - -/* ----------------------------------------------------------------- */ -#undef YY_INPUT -#define YY_INPUT(buf,result,max_size) result=yyread(buf,max_size); - -static int yyread(char *buf,int max_size) -{ - int c=0; - while ( c < max_size && inputString[inputPosition] ) - { - *buf = inputString[inputPosition++] ; - //printf("%d (%c)\n",*buf,*buf); - c++; buf++; - } - return c; -} - - //LINKMASK [a-z_A-Z0-9:#.,~&*/\[\]<>()\-\+]+({B}*("const"|"volatile"))? - //ATTR ((({BN}+[^\>]+)/">")?) -%} - -CMD ("\\"|"@") -BN [ \t\n\r] -BL [ \t\r]*"\n" -BSEP [ \t\r]*([ \t\r]|"\n")({BL}{0,100}) -B [ \t] -BS ^(({B}*"//")?)(({B}*"*"+)?){B}* -FILESCHAR [a-z_A-Z0-9\\:\\\/\-\+] -FILEECHAR [a-z_A-Z0-9\-\+] -FILEMASK {FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)+ -FILE ({FILESCHAR}*{FILEECHAR}+("."{FILESCHAR}*{FILEECHAR}+)*)|("\""[^\n\"]+"\"") -ID [a-z_A-Z][a-z_A-Z0-9]* -SCOPENAME (({ID}?{BN}*"::"{BN}*)*)((~{BN}*)?{ID}) -SCOPEMASK {ID}?(("::"|"#")?(~)?{ID})+ -URLCHAR [a-z_A-Z0-9\!\~\:\;\'\$\?\@\&\%\#\.\-\+\/\=] -URLMASK (([a-z_A-Z][^\>\"\n]*{URLCHAR})|({URLCHAR}+))([({]{URLCHAR}*[)}])? -NONTERM [\{\}\[\]\`\~\@\|\-\+\#\$\/\\\!\%\^\&\*()a-z_A-Z<>0-9\x80-\xff] -WORD ({NONTERM}+([^\n\t ]*{NONTERM}+)?)|("\""[^\n\"]*"\"") -ATTR ({B}+[^>\n]*)? -A [aA] -BOLD [bB] -BODY [bB][oO][dD][yY] -BR [bB][rR] -EM [eE][mM] -CENTER [cC][eE][nN][tT][eE][rR] -CODE [cC][oO][dD][eE] -DL [dD][lL] -DD [dD][dD] -DT [dD][tT] -DFN [dD][fF][nN] -FORM [fF][oO][rR][mM] -H1 [hH]1 -H2 [hH]2 -H3 [hH][3-6] -HEAD [hH][eE][aA][dD] -HR [hH][rR] -HREF [hH][rR][eE][fF] -I [iI] -IMG [iI][mM][gG] -INPUT [iI][nN][pP][uU][tT] -KBD [kK][bB][dD] -LI [lL][iI] -META [mM][eE][tT][aA] -MULTICOL [mM][uU][lL][tT][iI][cC][oO][lL] -NAME [nN][aA][mM][eE] -OL [oO][lL] -P [pP] -PRE [pP][rR][eE] -SMALL [sS][mM][aA][lL][lL] -STRONG [sS][tT][rR][oO][nN][gG] -SUB [sS][uU][bB] -SUP [sS][uU][pP] -SRC [sS][rR][cC] -TABLE [tT][aA][bB][lL][eE] -CAPTION [cC][aA][pP][tT][iI][oO][nN] -TITLE [tT][iI][tT][lL][eE] -TD [tT][dD] -TR [tT][rR] -TT [tT][tT] -UL [uU][lL] -VAR [vV][aA][rR] -BLOCKQUOTE [bB][lL][oO][cC][kK][qQ][uU][oO][tT][eE] -DOCPARAM ("#")?([a-z_A-Z0-9:\!\<\~\>\^\&\=\.\-]+)|("\"".*"\"") -OPNEW {B}+"new"({B}*"[]")? -OPDEL {B}+"delete"({B}*"[]")? -OPARG "("[a-z_A-Z0-9,\<\> \t\*\&]*")" -OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()" -OPCAST {B}+[^(\r\n.,]+ -OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) -LINKMASK [^ \t\n\r\\@<&$]+("("[^\n)]*")")?({B}*("const"|"volatile"))? - -%option noyywrap - -%x Text -%x DocScan -%x DocParam -%x DocException -%x DocHtmlScan -%x DocLatexScan -%x DocEmphasis -%x DocBold -%x DocCode -%x DocCodeBlock -%x DocInternal -%x DocLink -%x DocJavaLink -%x DocLinkText -%x DocJavaLinkText -%x DocSkipWord -%x DocInclude -%x DocDontInclude -%x DocHtmlLink -%x DocHtmlAnchor -%x DocHtmlHref -%x DocSkiplineKey -%x DocSkipKey -%x DocLineKey -%x DocUntilKey -%x DocKeyEnd -%x DocPar -%x DocRefName -%x DocVerbatim -%x DocVerbInc -%x DocHtmlInc -%x DocIndexWord -%x DocRefArg -%x DocRefArgStart -%x DocRefItem -%x DocRefItemName -%x DocInternalRef -%x DocInternalRefText -%x DocImage -%x DocCaption -%x DocHtmlImageName -%x DocHtmlImageOpt -%x DocLatexImageName -%x DocLatexImageOpt -%x DocRtfImageName -%x DocRtfImageOpt -%x DocDotFile -%x DocDotFileOpt -%x DocSkipLanguage -%x DocCopyFind -%x DocCopyArg -%x DocCopySkipVerb - -%% - -<*>\x0d -^{B}*(("//"{B}*)?)"*"*{B}*"-"("#")?{B}+ { /* found list item marker */ - QCString text=yytext; - int dashPos = text.findRev('-'); - //printf("dashPos=%d char='%c'\n",dashPos,text.at(dashPos+1)); - bool isEnumerated = text.at(dashPos+1)=='#'; - addListItemMarker(yytext,dashPos+1,isEnumerated); - } -^{B}*(("//"{B}*)?)"*"*{B}*"."{B}*/\n { /* found end list marker */ - QCString text=yytext; - int dotPos = text.findRev('.'); - endListMarker(yytext,dotPos+1); - } -\n{B}*(("//"{B}*)?)"*"*{B}*"-"("#")?{B}+ { /* found list item marker */ - QCString text=yytext; - int dashPos = text.findRev('-'); - //printf("dashPos=%d char='%c'\n",dashPos,text.at(dashPos+1)); - bool isEnumerated = text.at(dashPos+1)=='#'; - addListItemMarker(yytext+1,dashPos,isEnumerated); - } -\n{B}*(("//"{B}*)?)"*"*{B}*"."{B}*/\n { /* found end list marker */ - QCString text=yytext; - int dotPos = text.findRev('.'); - endListMarker(yytext+1,dotPos); - } -"©" { outDoc->writeCopyright(); } -"<" { outDoc->docify("<"); } -">" { outDoc->docify(">"); } -"&" { outDoc->docify("&"); } -"'" { outDoc->docify("'"); } -""" { outDoc->docify("\""); } -"&"[AEIOUYaeiouy]"uml;" { outDoc->writeUmlaut(yytext[1]); } -"&"[AEIOUYaeiouy]"acute;" { outDoc->writeAcute(yytext[1]); } -"&"[AEIOUaeiou]"grave;" { outDoc->writeGrave(yytext[1]); } -"&"[AEIOUaeiou]"circ;" { outDoc->writeCirc(yytext[1]); } -"&"[ANOano]"tilde;" { outDoc->writeTilde(yytext[1]); } -"ß" { outDoc->writeSharpS(); } -"&"[cC]"cedil;" { outDoc->writeCCedil(yytext[1]); } -"&"[aA]"ring;" { outDoc->writeRing(yytext[1]); } -" " { outDoc->writeNonBreakableSpace(1); } -"$("[a-z_A-Z]+")" { - QCString envvar=&yytext[2]; - envvar=envvar.left(envvar.length()-1); - outDoc->docify(getenv(envvar)); - } -{CMD}"htmlonly"/[^a-z_A-Z0-9] { - outDoc->startHtmlOnly(); - outDoc->pushGeneratorState(); - outDoc->disableAllBut(OutputGenerator::Html); - BEGIN(DocHtmlScan); - } -{CMD}"endhtmlonly"/[^a-z_A-Z0-9] { - outDoc->popGeneratorState(); - outDoc->endHtmlOnly(); - BEGIN(DocScan); - } -{CMD}"latexonly"/[^a-z_A-Z0-9] { - outDoc->startLatexOnly(); - outDoc->pushGeneratorState(); - outDoc->disableAllBut(OutputGenerator::Latex); - BEGIN(DocLatexScan); - } -{CMD}"endlatexonly"/[^a-z_A-Z0-9] { - outDoc->popGeneratorState(); - outDoc->endLatexOnly(); - BEGIN(DocScan); - } -"//"|"/*"|"*/" { - outDoc->writeString(yytext); - } -.|\n { - outDoc->writeString(yytext); - } -"\\postheader"/{BN} -"\\functionindex"/{BN} { /* writeMemberList(*outDoc,FALSE);*/ } -"\\classhierarchy"/{BN} { /* writeClassHierarchy(*outDoc); */ } -"\\annotatedclasslist"/{BN} { /* writeAnnotatedClassList(*outDoc); */ } -"\\headerfilelist"/{BN} { /* writeHeaderFileList(*outDoc); */ } -"\\header"/{BN} { BEGIN( DocSkipWord ); } -"\\define"/{BN} { BEGIN( DocSkipWord ); } -{CMD}"verbinclude"/{BN} { BEGIN( DocVerbInc ); } -{FILE} { - verbIncludeFile(*outDoc,stripQuotes(yytext)); - BEGIN( DocScan ); - } -{CMD}"htmlinclude"/{BN} { BEGIN( DocHtmlInc ); } -{FILE} { - outDoc->pushGeneratorState(); - outDoc->disableAllBut(OutputGenerator::Html); - rawIncludeFile(*outDoc,stripQuotes(yytext)); - outDoc->popGeneratorState(); - BEGIN( DocScan ); - } -{CMD}"verbatim"/[^a-z_A-Z0-9] { - outDoc->startVerbatimFragment(); - insideVerbatim=TRUE; - BEGIN(DocVerbatim); - } -{CMD}"endverbatim"/[^a-z_A-Z0-9] { - outDoc->endVerbatimFragment(); - insideVerbatim=FALSE; - BEGIN(DocScan); - } -[^\n\\\@]*"\n" { - //printf("docifying: %s\n",yytext); - outDoc->codify(yytext); - } -"\n"|"//"|"/*"|"*/" { - outDoc->codify(yytext); - } -. { - //printf("char %c\n",*yytext); - char c[2];c[0]=*yytext;c[1]='\0'; - outDoc->codify(c); - } -{CMD}"~"[a-z_A-Z0-9]*/{BN} { - if (yytext[2]) - { - if (theTranslator->idLanguage()!=&yytext[2]) // not current language - { - BEGIN(DocSkipLanguage); - } - } - } -{CMD}"~"[a-z_A-Z0-9]*/{BN} { - if (yytext[2]) - { - if (theTranslator->idLanguage()==&yytext[2]) - { - BEGIN( DocScan ); // current language => include - } - } - else // back to "all language" processing. - { - BEGIN( DocScan ); - } - } -[^\\\@\~\n]+ -{CMD}"internal"/{BN} { - outDoc->newParagraph(); - outDoc->startBold(); - scanString(theTranslator->trForInternalUseOnly()+"\n"); - outDoc->endBold(); - outDoc->newParagraph(); - } -"\\reimp"/{BN} { - outDoc->newParagraph(); - scanString(theTranslator->trReimplementedForInternalReasons()+"\n"); - } -{CMD}"link"/{BN} { BEGIN( DocLink ); } -"{"{CMD}"link"{BN}+ { BEGIN( DocJavaLink ); } -[a-z_A-Z0-9.:()]+ { BEGIN( DocScan ); } -{LINKMASK} { // TODO: support operators as well! - linkRef = stripKnownExtensions(yytext); - linkText = ""; - BEGIN( DocLinkText ); - } -{LINKMASK} { // TODO: support operators as well! - linkRef = yytext; - linkText = ""; - BEGIN( DocJavaLinkText ); - } -"}" { - //printf("Trying to link `%s'\n",linkRef.data()); - if (!generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace())) - { - warn(yyFileName,yyLineNr,"Warning: link to unknown entity `%s' in the documentation of this entity!",linkRef.data()); - } - BEGIN( DocScan ); - } -. { linkText += *yytext; } -"\n" { linkText += " "; } -{CMD}"endlink" { // <- needed for things like \endlink. - //printf("GenerateLink className=`%s' linkRef=`%s' linkText=`%s'\n", - // className.data(),linkRef.data(),linkText.data()); - if (!generateLink(*outDoc,className,linkRef,inSeeBlock,linkText.stripWhiteSpace())) - { - warn(yyFileName,yyLineNr,"Warning: link to unknown entity `%s' in the documentation of this entity!",linkRef.data()); - } - BEGIN( DocScan ); - } -{CMD}"endlink"/[^a-z_A-Z0-9] { warn(yyFileName,yyLineNr, - "Warning: \\endlink without \\link " - "in documentation of this entity." - ); - } -{CMD}"addindex"{B}+ { - addIndexWord.resize(0); - BEGIN(DocIndexWord); - } -"\\form#"[0-9]+ { - Formula *formula=Doxygen::formulaNameDict[yytext]; - if (formula) - { - QCString formName; - formName.sprintf("form_%d",formula->getId()); - outDoc->writeFormula(formName,formula->getFormulaText()); - } - } -"\\&" { addIndexWord+='&'; } -"\\>" { addIndexWord+='>'; } -"\\<" { addIndexWord+='<'; } -"\\@" { addIndexWord+='@'; } -"\\$" { addIndexWord+='$'; } -"\\#" { addIndexWord+='#'; } -"\\\\" { addIndexWord+='\\'; } -. { addIndexWord+=*yytext; } -\n { - //printf("Adding %s to index\n",yytext); - outDoc->addIndexItem(addIndexWord,0); - BEGIN(DocScan); - } -{CMD}("arg"|"li")/{BN} { - if (insideItemList) - { - forceEndItemList(); - } - if (insideArgumentList) - { - outDoc->writeListItem(); - } - else - { - outDoc->startItemList(); - outDoc->writeListItem(); - insideArgumentList=TRUE; - } - } -(({B}*"\n"){2,}{B}*)?{CMD}"par"{B}* { - QCString t=yytext; - if (/*t.contains('\n')>1 &&*/ insideItemList) - { - forceEndItemList(); - } - BEGIN(DocPar); - } -[^\n]*{BSEP} { - QCString title=QCString(yytext).stripWhiteSpace(); - bool b = inBlock(); - if (!title.isEmpty()) - { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (b) endBlock(); - inParBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Par,0,0,title); - outDoc->writeDescItem(); - } - else - { - outDoc->newParagraph(); - } - BEGIN(DocScan); - } -{CMD}"warning"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inWarningBlock) - { - if (inBlock()) endBlock(); - inWarningBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Warning,0,0,theTranslator->trWarning()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"remark"[s]?{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inRemarkBlock) - { - if (inBlock()) endBlock(); - inRemarkBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Remark,0,0,theTranslator->trRemarks()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"attention"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inAttentionBlock) - { - if (inBlock()) endBlock(); - inAttentionBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Attention,0,0,theTranslator->trAttention()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"note"[s]?{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inNoteBlock) - { - if (inBlock()) endBlock(); - inNoteBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Note,0,0,theTranslator->trNote()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"pre"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inPreBlock) - { - if (inBlock()) endBlock(); - inPreBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Pre,0,0,theTranslator->trPrecondition()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"post"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inPostBlock) - { - if (inBlock()) endBlock(); - inPostBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Post,0,0,theTranslator->trPostcondition()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"invariant"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inInvarBlock) - { - if (inBlock()) endBlock(); - inInvarBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Invar,0,0,theTranslator->trInvariant()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"version"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inVersionBlock) - { - if (inBlock()) endBlock(); - inVersionBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Version,0,0,theTranslator->trVersion()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"since"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inSinceBlock) - { - if (inBlock()) endBlock(); - inSinceBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Since,0,0,theTranslator->trSince()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -{CMD}"date"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inDateBlock) - { - if (inBlock()) endBlock(); - inDateBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Date,0,0,theTranslator->trDate()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } -"\\todo "[0-9]+ | /* generated labels */ -"\\test "[0-9]+ | -"\\bug "[0-9]+ | -"\\deprecated "[0-9]+ { - writeSpecialItem(yytext); - } - /* -{CMD}"deprecated"{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inDeprecatedBlock) - { - if (inBlock()) endBlock(); - inDeprecatedBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Deprecated,0,0,theTranslator->trDeprecated()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->writeDescItem(); - } - } - */ -"$"[a-zA-Z_0-9]+":"[^\n\$]+"$" { // RCS tag - QCString tagName(&yytext[1]); - int i=tagName.find(':'); - tagName=tagName.left(i); - QCString tagText=&yytext[i+2]; - tagText=tagText.left(tagText.length()-1); - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (inBlock()) endBlock(); - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::RCS,0,0,tagName+": "); - outDoc->writeDescItem(); - scanString(tagText); - outDoc->endSimpleSect(); - currentListIndent.pop(); - } -{CMD}"author"[s]?{BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inAuthorBlock) - { - if (inBlock()) endBlock(); - inAuthorBlock=TRUE; - currentListIndent.push("P"); - bool singular = ((QString)yytext).find('s')==-1; - outDoc->startSimpleSect(BaseOutputDocInterface::Author, - 0,0,theTranslator->trAuthor(TRUE,singular)+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->docify(", "); - } - } -{CMD}("return"([s])?|"result"){BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inReturnBlock) - { - if (inBlock()) endBlock(); - inReturnBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::Return,0,0,theTranslator->trReturns()+": "); - outDoc->writeDescItem(); - } - } -{CMD}("sa"|"see"){BSEP} { - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inSeeBlock) - { - if (inBlock()) endBlock(); - inSeeBlock=TRUE; - currentListIndent.push("P"); - outDoc->startSimpleSect(BaseOutputDocInterface::See,0,0,theTranslator->trSeeAlso()+": "); - outDoc->writeDescItem(); - } - else - { - outDoc->docify(", "); - } - } -(({B}*"\n"){2,}{B}*)?{CMD}"param"{BSEP} { - QCString t=yytext; - if (insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inParamBlock) - { - if (inBlock()) endBlock(); - inParamBlock=TRUE; - currentListIndent.push("P"); - outDoc->startParamList(BaseOutputDocInterface::Param,theTranslator->trParameters()+": "); - outDoc->writeDescItem(); - outDoc->startDescTable(); - } - else - { - outDoc->endDescTableData(); - } - BEGIN(DocParam); - } -(({B}*"\n"){2,}{B}*)?{CMD}"retval"{BSEP} { - QCString t=yytext; - if (/*t.contains('\n')>1 &&*/ insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inRetValBlock) - { - if (inBlock()) endBlock(); - inRetValBlock=TRUE; - currentListIndent.push("P"); - outDoc->startParamList(BaseOutputDocInterface::RetVal,theTranslator->trReturnValues()+": "); - outDoc->writeDescItem(); - outDoc->startDescTable(); - } - else - { - outDoc->endDescTableData(); - } - BEGIN(DocParam); - } -(({B}*"\n"){2,}{B}*)?{CMD}("exception"|"throw")s?{BSEP} { - QCString t=yytext; - if (/*t.contains('\n')>1 &&*/ insideItemList) - { - forceEndItemList(); - } - endArgumentList(); - if (!inExceptionBlock) - { - if (inBlock()) endBlock(); - inExceptionBlock=TRUE; - currentListIndent.push("P"); - outDoc->startParamList(BaseOutputDocInterface::Exception,theTranslator->trExceptions()+": "); - outDoc->writeDescItem(); - outDoc->startDescTable(); - } - else - { - outDoc->endDescTableData(); - } - BEGIN(DocException); - } -"\\capt".* -({DOCPARAM}{BN}*","{BN}*)*{DOCPARAM}{BSEP}* { - QCString argName = substitute(yytext,"\"","").stripWhiteSpace(); - if (inParamBlock) - { - checkArgName(argName,TRUE); - } - else if (inRetValBlock) - { - checkArgName(argName,FALSE); - } - outDoc->startDescTableTitle(); - scanDoc(argName); - outDoc->endDescTableTitle(); - outDoc->startDescTableData(); - BEGIN(DocScan); - } -{SCOPENAME} { - outDoc->startDescTableTitle(); - generateRef(*outDoc,className,yytext,FALSE); - outDoc->endDescTableTitle(); - outDoc->startDescTableData(); - BEGIN(DocScan); - } -{CMD}"section "{ID}" " { - QCString secName=&yytext[9]; // skip "\section " - secName=secName.left(secName.length()-1); // remove \n - //printf("SectionName %s found\n",secName.data()); - SectionInfo *sec; - if ((sec=Doxygen::sectionDict[secName])) - { - //printf("Title %s\n",sec->title.data()); - outDoc->startSection(sec->label,sec->title,sec->type); - scanString(sec->title); - outDoc->endSection(sec->label,sec->type); - } - else - { - warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext); - } - } -{CMD}"anchor "{ID}" " { - QCString secName=&yytext[8]; - secName=secName.left(secName.length()-1); - SectionInfo *sec; - //printf("secName=%s\n",secName.data()); - if ((sec=Doxygen::sectionDict[secName])) - { - //printf("writeAnchor %s_%s\n",sec->fileName.data(),sec->label.data()); - outDoc->writeAnchor(sec->fileName,sec->label); - } - else - { - //printf("Section %s not found!\n",secName.data()); - } - } -"\\_internalref"{B}+ { // for internal use only! - internalRefFile.resize(0); - internalRefAnchor.resize(0); - BEGIN(DocInternalRef); - } -[A-Z_a-z0-9.:#\-\+]+ { - internalRefFile=yytext; - int i = internalRefFile.find('#'); - if (i!=-1) - { - internalRefAnchor=internalRefFile.right(internalRefFile.length()-i-1); - internalRefFile=internalRefFile.left(i); - } - //printf("InternalRef yytext=`%s' file=`%s' anchor=`%s'\n",yytext,internalRefFile.data(),internalRefAnchor.data()); - BEGIN(DocInternalRefText); - } -\"[^\n\"]*\" { - QCString text=substitute(yytext,"\"",""); - outDoc->writeObjectLink(0,internalRefFile,internalRefAnchor,text); - BEGIN(DocScan); - } -{CMD}"ref"/{BN} { - BEGIN(DocRefName); - } -{CMD}"secreflist"/{BN} { - outDoc->startSectionRefList(); - } -{CMD}"endsecreflist"/{BN} { - outDoc->endSectionRefList(); - } -{CMD}"refitem"/{BN} { - BEGIN(DocRefItem); - } - /* -{CMD}"if"/{BN} { - outDoc->pushGeneratorState(); - depthIf++; - BEGIN(DocIf); - } -{CMD}"endif"/[^a-z_A-Z0-9] { - if (--depthIf<0) - { - warn(yyFileName,yyLineNr, - "Warning: documentation block contains \\endif without " - "matching \\if found in documentation of this entity." - ); - } - else - { - outDoc->popGeneratorState(); - } - } -[^\n\t ]+ { - if (Config_getList("ENABLED_SECTIONS").find(yytext)==-1) - { - outDoc->disableAll(); - } - BEGIN(DocScan); - } - */ -{SCOPENAME}|{FILE} { - QCString ref=yytext; - SectionInfo *sec; - //printf(">>> ref `%s'\n",yytext); - if ((sec=Doxygen::sectionDict[ref])) - { - //printf("Is a section!\n"); - QCString text; - if (sec->title.isEmpty()) - text=sec->label; - else - text=sec->title; - if (sec->type==SectionInfo::Anchor) - { - outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text); - if (sec->ref.isEmpty()) - { - writePageRef(*outDoc,sec->label,0); - } - } - else - { - //printf(" ref sec=%p sec->fileName=%s text=%s\n",sec,sec->fileName.data(),text.data()); - outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text); - } - } - else if (!generateLink(*outDoc,className,yytext,TRUE,0)) - { - warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",yytext); - } - BEGIN(DocScan); - } -({SCOPENAME}|{FILE}){B}+/"\"" { - //printf(">>> ref `%s'\n",yytext); - sectionRef=yytext; - sectionRef=sectionRef.stripWhiteSpace(); - BEGIN(DocRefArgStart); - } -"\"" { - BEGIN(DocRefArg); - } -[^\"\n]+[\n\"] { - yytext[yyleng-1]='\0'; - QCString text=substitute(yytext,"\\\\","\\"); - SectionInfo *sec; - if ((sec=Doxygen::sectionDict[sectionRef])) - { - //printf("Is a section!\n"); - if (sec->type==SectionInfo::Anchor) - { - outDoc->writeObjectLink(sec->ref,sec->fileName,sec->label,text); - if (sec->ref.isEmpty()) - { - writePageRef(*outDoc,sec->label,0); - } - } - else - { - outDoc->writeSectionRef(sec->ref,sec->fileName,sec->label,text); - } - } - else if (!generateLink(*outDoc,className,sectionRef,TRUE,text)) - { - warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data()); - outDoc->startBold(); - outDoc->writeString(" unknown reference! "); - outDoc->endBold(); - } - BEGIN(DocScan); - } -{ID} { - sectionRef=yytext; - refItemText.resize(0); - BEGIN(DocRefItemName); - } -"\\&" { refItemText+='&'; } -"\\>" { refItemText+='>'; } -"\\<" { refItemText+='<'; } -"\\@" { refItemText+='@'; } -"\\$" { refItemText+='$'; } -"\\#" { refItemText+='#'; } -"\\\\" { refItemText+='\\'; } -. { refItemText+=*yytext; } -\n { - SectionInfo *sec; - if ((sec=Doxygen::sectionDict[sectionRef])) - { - outDoc->writeSectionRefItem(sec->fileName,sec->label,refItemText.stripWhiteSpace()); - } - else - { - warn(yyFileName,yyLineNr,"Warning: reference to unknown section %s in the documentation of this entity!",sectionRef.data()); - outDoc->startBold(); - outDoc->writeString(" unknown reference! "); - outDoc->endBold(); - } - BEGIN(DocScan); - } -{CMD}"image"{B}+ { - BEGIN(DocImage); - } -[hH][tT][mM][lL] { - BEGIN(DocHtmlImageName); - } -[lL][aA][tT][eE][xX] { - BEGIN(DocLatexImageName); - } -[rR][tT][fF] { - BEGIN(DocRtfImageName); - } -[^ \t\n]+ { - curImageName = findAndCopyImage(stripQuotes(yytext),IT_Html); - curImageCaption.resize(0); - if (curImageName.isEmpty()) - { - BEGIN(DocScan); - } - else - { - BEGIN(DocHtmlImageOpt); - } - } -\n { - writeImage(IT_Html,0); - BEGIN(DocScan); - } -\"[^\n"]*\" { - curImageCaption=stripQuotes(yytext); - } -{FILE} { - curImageName = findAndCopyImage(stripQuotes(yytext),IT_RTF); - curImageCaption.resize(0); - if (curImageName.isEmpty()) - { - BEGIN(DocScan); - } - else - { - BEGIN(DocRtfImageOpt); - } - } -\n { - writeImage(IT_RTF,0); - BEGIN(DocScan); - } -\"[^\n"]*\" { - curImageCaption=stripQuotes(yytext); - } -{FILE} { - curImageName = findAndCopyImage(stripQuotes(yytext),IT_Latex); - curImageCaption.resize(0); - if (curImageName.isEmpty()) - BEGIN(DocScan); - else - BEGIN(DocLatexImageOpt); - } -\n { // no width specified - writeImage(IT_Latex,0); - BEGIN(DocScan); - } -\"[^\n"]*\" { - curImageCaption=stripQuotes(yytext); - } -("width"{B}*"="{B}*)(([0-9\.]+({B}*{ID})?)|("\\"{ID})) { - writeImage(IT_Latex,yytext); - BEGIN(DocScan); - } -("height"{B}*"="{B}*)(([0-9\.]+({B}*{ID})?)|("\\"{ID})) { - writeImage(IT_Latex,yytext); - BEGIN(DocScan); - } -[a-z_A-Z0-9\.\-]+ { - warn(yyFileName,yyLineNr,"Warning: %s is an unsupported output format for \\image in the documentation of the entity",yytext); - } -\n { - warn(yyFileName,yyLineNr,"Warning: invalid \\image command found in the documentation of this entity!"); - outDoc->enableAll(); - BEGIN(DocScan); - } -{CMD}"dotfile"{B}* { - BEGIN(DocDotFile); - } -{FILE} { - curDotFileName = stripQuotes(yytext); - curDotFileCaption.resize(0); - if (curDotFileName.isEmpty()) - { - BEGIN(DocScan); - } - else - { - BEGIN(DocDotFileOpt); - } - } -\n { - writeDotFile(curDotFileName,curDotFileCaption); - BEGIN(DocScan); - } -\"[^\n"]*\" { - curDotFileCaption = stripQuotes(yytext); - writeDotFile(curDotFileName,curDotFileCaption); - BEGIN(DocScan); - } -{CMD}"code"({BN}*"\n"|{B}*) { - outDoc->startCodeFragment(); - codeBlock.resize(0); - BEGIN( DocCodeBlock ); - } -{CMD}"endcode"/[^a-z_A-Z0-9] { - warn(yyFileName,yyLineNr,"Warning: \\endcode without \\code " - "in the documentation of this entity."); - } - -{ID}"<"[^>\ \t\n]*">"("::"{ID})+"("?[a-z_A-Z0-9,:\<\> \t\*\&]*")"? { - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - BEGIN(DocScan); - } -{SCOPEMASK}"("[a-z_A-Z0-9,:\<\> \t\*\&]+")"({B}*("const"|"volatile"))? { - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - BEGIN(DocScan); - } -{SCOPEMASK}("()"({B}*("const"|"volatile"))?)? { - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - BEGIN(DocScan); - } -({SCOPEMASK}"::")?"operator"{OPMASK} { - QCString oName=yytext; - if (!insideHtmlLink) - { - generateRef(*outDoc,className, - removeRedundantWhiteSpace(oName),inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - BEGIN(DocScan); - } -("http:"|"https:"|"ftp:"|"file:"){URLMASK} { outDoc->startHtmlLink(yytext); - outDoc->docify(yytext); - outDoc->endHtmlLink(); - } -[a-zA-Z_0-9\.\-]+"@"[0-9a-z_A-Z\.\-]+ { outDoc->writeMailLink(yytext); } -{FILESCHAR}*{FILEECHAR}+/".\\n" { // special exception that is otherwise matches by FILEMASK - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - } -{FILEMASK} { - if (!insideHtmlLink) - { - generateFileRef(*outDoc,yytext); - } - else - { - outDoc->docify(yytext); - } - } -{BN}*{CMD}"endcode"/[^a-z_A-Z0-9] { // needed to match things like \endcode. (note the dot) - codeBlock+="\n"; - parseCode(*outDoc,className,codeBlock,exampleDoc,exampleName); - //printf("Code block\n-------------\n%s\n--------------\n",codeBlock.data()); - outDoc->endCodeFragment(); - BEGIN( DocScan ); - } -{CMD}("e"|"em"|"a"){BN}+ { BEGIN( DocEmphasis ); } -{CMD}"b"{BN}+ { BEGIN( DocBold ); } -{CMD}("c"|"p"){BN}+ { BEGIN( DocCode ); } -{CMD}"l"{BN}+ -"\\n"/[^a-z_A-Z0-9] { outDoc->lineBreak(); } -{CMD}"include"{BN}+ { BEGIN( DocInclude ); } -{CMD}"dontinclude"{BN}+ { BEGIN( DocDontInclude ); } -{CMD}"skip"{BN}+ { BEGIN( DocSkipKey ); } -{CMD}"skipline"{BN}+ { BEGIN( DocSkiplineKey ); firstLine=TRUE; } -{CMD}"line"{BN}+ { BEGIN( DocLineKey ); firstLine=TRUE; } -{CMD}"until"{BN}+ { BEGIN( DocUntilKey ); firstLine=TRUE; } -[^\r\n]+ { - if (includeFileLength>0) - { - QCString pattern=yytext; - skipUntil(pattern.stripWhiteSpace()); - } - BEGIN( DocScan ); - } -[^\r\n]+ { - if (includeFileLength>0) - { - QCString pattern=yytext; - if (firstLine) outDoc->startCodeFragment(); - firstLine=FALSE; - showLine(*outDoc,pattern.stripWhiteSpace()); - BEGIN( DocKeyEnd ); - } - else - { - BEGIN( DocScan ); - } - } -[^\r\n]+ { - if (includeFileLength>0) - { - QCString pattern=yytext; - if (firstLine) outDoc->startCodeFragment(); - firstLine=FALSE; - skipLine(*outDoc,pattern.stripWhiteSpace()); - BEGIN( DocKeyEnd ); - } - else - { - BEGIN( DocScan ); - } - } -[^\r\n]+ { - if (includeFileLength>0) - { - QCString pattern=yytext; - if (firstLine) outDoc->startCodeFragment(); - firstLine=FALSE; - showUntil(*outDoc,pattern.stripWhiteSpace()); - BEGIN( DocKeyEnd ); - } - else - { - BEGIN( DocScan ); - } - } -{CMD}"line"{BN}+ { BEGIN(DocLineKey); } -{CMD}"until"{BN}+ { BEGIN(DocUntilKey); } -{CMD}"skipline"{BN}+ { BEGIN(DocSkiplineKey); } -\n -<> { - if (!firstLine) outDoc->endCodeFragment(); - yyterminate(); - } -. { - unput(*yytext); - if (!firstLine) outDoc->endCodeFragment(); - BEGIN( DocScan ); - } -"<"{MULTICOL}{ATTR}">" -"" -"<"{STRONG}{ATTR}">" { outDoc->startBold(); } -"" { outDoc->endBold(); } -"<"{CENTER}{ATTR}">" { outDoc->startCenter(); } -"" { outDoc->endCenter(); } -"<"{TABLE}{ATTR}">" { startTable(); } -"" { endTable(); } -"<"{CAPTION}{ATTR}">" { caption.resize(0); - BEGIN( DocCaption ); - } -[^\n\<\>\/]+ { - caption+=yytext; - } -\n { caption+=" "; } -. { caption+=*yytext; } -"" { if (curTable) - { - curTable->setCaption(caption); - } - BEGIN( DocScan ); - } -"<"{INPUT}{ATTR}">" -"<"{SMALL}{ATTR}">" { outDoc->startSmall(); } -"" { outDoc->endSmall(); } -"<"{META}{ATTR}">" -"<"{FORM}{ATTR}">" -"" -"<"{HEAD}{ATTR}">" -"" -"<"{BODY}{ATTR}">" -"" -"<"{BLOCKQUOTE}{ATTR}">" -"" -"<"{CODE}{ATTR}">" { outDoc->startTypewriter(); } -"" { outDoc->endTypewriter(); } -"<"{DFN}{ATTR}">" { outDoc->startTypewriter(); } -"" { outDoc->endTypewriter(); } -"<"{VAR}{ATTR}">" { outDoc->startEmphasis(); } -"" { outDoc->endEmphasis(); } -"<"{IMG}{ATTR}">" { - /*storeOutputListState();*/ - outDoc->pushGeneratorState(); - outDoc->disableAllBut(OutputGenerator::Html); - outDoc->writeString(yytext); - /*restoreOutputListState();*/ - outDoc->popGeneratorState(); - } -"<"{PRE}{ATTR}">" { - if (insidePre) - { - warn(yyFileName,yyLineNr,"Warning in the documentation of this entity:\nNested
 found in the documentation of this entity!");
-					  }
-  					  outDoc->startPreFragment(); 
-					  insidePre=TRUE;
-					}
-""	        { 
-  					  outDoc->endPreFragment(); 
-					  insidePre=FALSE;
-					}
-"<"{SUB}{ATTR}">"		{ outDoc->startSubscript(); }
-""		{ outDoc->endSubscript(); }
-"<"{SUP}{ATTR}">"		{ outDoc->startSuperscript(); }
-""		{ outDoc->endSuperscript(); }
-"<"{TR}{ATTR}">"		{ if (curTable) curTable->newRow(); }
-""			
-"<"{TD}{ATTR}">"		{ if (curTable) curTable->newElem(); }
-""
-"<"{OL}{ATTR}">"{BN}*		{ outDoc->startEnumList(); 
-  					  currentListIndent.push("O");
-					}
-""{BN}*		{ 
-					  if (currentListIndent.isEmpty())
-					  {
-					    warn(yyFileName,yyLineNr,
-                                                 "Warning in the documentation of this entity:\nMore  tags than 
    tags in the documentation of this entity." - ); - } - else if (*currentListIndent.top()!='O') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
tag does not end a
    tag." - ); - } - else - { - outDoc->endEnumList(); - currentListIndent.pop(); - } - } -"<"{UL}{ATTR}">"{BN}* { outDoc->startItemList(); - currentListIndent.push("U"); - } -""{BN}* { - if (currentListIndent.isEmpty()) - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nMore tags than
      tags." - ); - } - else if (*currentListIndent.top()!='U') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
    tag does not end a
      tag." - ); - } - else - { - outDoc->endItemList(); - currentListIndent.pop(); - } - } -"<"{LI}{ATTR}">" { - if (/*currentListIndent.isEmpty() ||*/ //DvH: I removed this check because I use this in the manual (the
        is in a \htmlonly block!) - !currentListIndent.isEmpty() && *currentListIndent.top()=='D') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
      • tag can only be used inside a
          ...
        or a
          ...
        block." - ); - } - else - { - outDoc->writeListItem(); - } - } -"" -"<"{TT}{ATTR}">" { outDoc->startTypewriter(); } -"" { outDoc->endTypewriter(); } -"<"{KBD}{ATTR}">" { outDoc->startTypewriter(); } -"" { outDoc->endTypewriter(); } -"<"{EM}{ATTR}">" { outDoc->startEmphasis(); } -"" { outDoc->endEmphasis(); } -"<"{HR}{ATTR}">" { outDoc->writeRuler(); } -"<"{DL}{ATTR}">" { outDoc->startDescription(); - currentListIndent.push("D"); - } -"" { - if (currentListIndent.isEmpty()) - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nMore tags than
        tags in the documentation." - ); - } - else if (*currentListIndent.top()!='D') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
        tag does not end a
        tag in the documentation." - ); - } - else - { - outDoc->endDescription(); - currentListIndent.pop(); - } - } -"<"{DT}{ATTR}">" { - if (currentListIndent.isEmpty() || - *currentListIndent.top()!='D') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
        tag can only be used inside a
        ...
        block." - ); - } - else - { - outDoc->startDescItem(); - } - } -"" -"<"{DD}{ATTR}">" { - if (currentListIndent.isEmpty() || - *currentListIndent.top()!='D') - { - warn(yyFileName,yyLineNr, - "Warning in the documentation of this entity:\nThe
        tag can only be used inside a
        ...
        block." - ); - } - else - { - outDoc->endDescItem(); - } - } -"" -"<"{BR}{ATTR}">" { outDoc->lineBreak(); } -"<"{I}{ATTR}">" { outDoc->startEmphasis(); } -"" { outDoc->endEmphasis(); } -"" { if (insideHtmlLink) - { - outDoc->endHtmlLink(); - insideHtmlLink=FALSE; - } - } -"<"{A}{BN}+ { BEGIN(DocHtmlLink); } -"<"{BOLD}{ATTR}">" { outDoc->startBold(); } -"" { outDoc->endBold(); } -"<"{P}{ATTR}">" { - if (inBlock()) endBlock(); - outDoc->newParagraph(); } -"" -"<"{H1}{ATTR}">" { outDoc->startTitle(); } -"" { outDoc->endTitle(); } -"<"{H2}{ATTR}">" { outDoc->startSubsection(); } -"" { outDoc->endSubsection(); } -"<"{H3}{ATTR}">" { outDoc->startSubsubsection(); } -"" { outDoc->endSubsubsection(); } -{NAME}{BN}*"="{BN}*("\""?) { BEGIN(DocHtmlAnchor); } -[a-z_A-Z0-9.\-\+\/]+ { outDoc->writeAnchor(0,yytext); } -{HREF}{BN}*"="{BN}*("\""?) { - htmlUrl.resize(0); - htmlText.resize(0); - BEGIN(DocHtmlHref); - } -{URLMASK} { - htmlUrl=yytext; - } -">" { - outDoc->startHtmlLink(htmlUrl); - insideHtmlLink=TRUE; - BEGIN(DocScan); - } -">" { BEGIN(DocScan); } -{CMD}("\\"|"@"|"<"|">"|"&"|"$"|"#"|"%") { - outDoc->docify(&yytext[1]); - } -"%"[a-z_A-Z][a-z_A-Z0-9:\-]* { - outDoc->docify(yytext+1); - } -{FILEMASK} { - outDoc->startEmphasis(); - if (!insideHtmlLink) - { - generateFileRef(*outDoc,yytext); - } - else - { - outDoc->docify(yytext); - } - outDoc->endEmphasis(); - BEGIN( DocScan ); - } -[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { - outDoc->startEmphasis(); - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - outDoc->endEmphasis(); - BEGIN( DocScan ); - } -{WORD} { - outDoc->startEmphasis(); - if (!insideHtmlLink) - { - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,TRUE); - } - else - { - outDoc->docify(yytext); - } - outDoc->endEmphasis(); - BEGIN( DocScan ); - } -{FILEMASK} { - outDoc->startBold(); - if (!insideHtmlLink) - { - generateFileRef(*outDoc,yytext); - } - else - { - outDoc->docify(yytext); - } - outDoc->endBold(); - BEGIN( DocScan ); - } -[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()|\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { - outDoc->startBold(); - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - outDoc->endBold(); - BEGIN( DocScan ); - } -{WORD} { - outDoc->startBold(); - if (!insideHtmlLink) - { - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,TRUE); - } - else - { - outDoc->docify(yytext); - } - outDoc->endBold(); - BEGIN( DocScan ); - } -{FILEMASK} { - outDoc->startTypewriter(); - if (!insideHtmlLink) - { - generateFileRef(*outDoc,yytext); - } - else - { - outDoc->docify(yytext); - } - outDoc->endTypewriter(); - BEGIN( DocScan ); - } -[a-z_A-Z][a-z_A-Z:0-9<>&\-=^%~!\[\]()!\*/]*"("[a-z_A-Z0-9,:\<\> \t\*\&]*")" { - outDoc->startTypewriter(); - if (!insideHtmlLink) - { - generateRef(*outDoc,className,yytext,inSeeBlock); - } - else - { - outDoc->docify(yytext); - } - outDoc->endTypewriter(); - BEGIN( DocScan ); - } -{WORD} { - outDoc->startTypewriter(); - if (!insideHtmlLink) - { - linkifyText(TextGeneratorOLImpl(*outDoc),className,0,yytext,FALSE,TRUE); - } - else - { - outDoc->docify(yytext); - } - outDoc->endTypewriter(); - BEGIN( DocScan ); - } -{FILE} { - includeFile(*outDoc,stripQuotes(yytext),FALSE); - BEGIN( DocScan ); - } -{FILE} { - includeFile(*outDoc,stripQuotes(yytext),TRUE); - BEGIN( DocScan ); - } -"//" { codeBlock += yytext; } -"/*" { codeBlock += yytext; } -\n { codeBlock += '\n'; } -[^\/\\\<\n]* { codeBlock += yytext; } -. { codeBlock += *yytext; } -"//" { - outDoc->docify(yytext); - } -"/*" { - outDoc->docify(yytext); - } -"\n" { outDoc->writeChar('\n'); } -({B}*"\n"){2,}{B}*"*"*{B}*"-"("#")?{B}+ { // new paragraph & start of a list - QCString text=yytext; - int dashPos = text.findRev('-'); - bool isEnumerated = text.at(dashPos+1)=='#'; - if (insideArgumentList) - { - insideArgumentList=FALSE; - outDoc->endItemList(); - } - else if (insideItemList) - { - forceEndItemList(); - } - else - { - outDoc->newParagraph(); - } - if (inBlock()) endBlock(); - addListItemMarker(yytext,dashPos+1,isEnumerated); - } -({B}*"\n"){2,}{B}* { // new paragraph - bool ib = inBlock(); - if (insideArgumentList) - { - insideArgumentList=FALSE; - outDoc->endItemList(); - if (ib) endBlock(); - } - else if (insideItemList) - { - forceEndItemList(); - } - else - { - if (insidePre) - { - outDoc->docify(yytext); - } - else if (!ib) - { - outDoc->newParagraph(); - } - if (ib && *currentListIndent.top()=='P') - { // inside paragraph block - endBlock(); - } - } - } -{BN}+/\n { - outDoc->writeChar(' '); - } -\n?{B}* { - if (insidePre) - { - outDoc->docify(yytext); - } - else - { - outDoc->writeChar(' '); - } - } -[a-z_A-Z0-9]+ { - outDoc->docify(yytext); - } -. { - outDoc->writeChar(*yytext); - } -{CMD}"copydoc"{B}+ { // found copydoc command - BEGIN(DocCopyArg); - } -{CMD}"verbatim"/[^a-z_A-Z0-9] { // skip verbatim sections - copyDocString+=yytext; - BEGIN(DocCopySkipVerb); - } -[^@\\\n]+ { copyDocString+=yytext; } -"\\\\"|"@@" { copyDocString+=yytext; /* skip escaped commands */ } -[^@\\\n]+ { copyDocString+=yytext; } -{CMD}"endverbatim" { copyDocString+=yytext; - BEGIN(DocCopyFind); - } -\n { copyDocString+=yytext; } -. { copyDocString+=yytext; } -{LINKMASK} { //printf("found @copydoc with arg `%s'\n",yytext); - QCString doc; - Definition *def; - if (findDocsForMemberOrCompound(yytext,&doc,&def)) - { - //printf("found docs `%s'\n",doc.data()); - if (copyDocDefList.findRef(def)!=-1) - { - warn(yyFileName,yyLineNr,"Recursive @copydoc relation!"); - } - else - { - copyDocDefList.append(def); - pushContext(); - inputString = doc; - inputPosition = 0; - BEGIN(DocCopyFind); - docYYlex(); - popContext(); - copyDocDefList.remove(def); - BEGIN(DocCopyFind); - } - } - else // reference not found! - { - warn(yyFileName,yyLineNr,"Argument `%s' of @copydoc command " - "could not be resolved!",yytext); - } - BEGIN(DocCopyFind); - } -<*>\n { yyLineNr++ ; } -<*>. - -%% - -//---------------------------------------------------------------------------- - -void scanString(const char *s) -{ - pushContext(); - inputString = s; - inputPosition = 0; - BEGIN( Text ); - docYYlex(); - popContext(); -} - -void scanDoc(const char *s) -{ - pushContext(); - inputString = s; - inputPosition = 0; - BEGIN( DocScan ); - docYYlex(); - popContext(); -} - -void internalParseDocument(const char *s) -{ - if (s==0) return; - pushContext(); - inputString = s; - inputPosition = 0; - BEGIN( DocScan ); - docYYlex(); - popContext(); -} - -//---------------------------------------------------------------------------- - -void parseDocument(OutputDocInterface &od,const QCString &docString) -{ - //inParamBlock=inSeeBlock=inReturnBlock=FALSE; - curTable = 0; - depthIf = 0; - outDoc = od.clone(); - currentIncludeFile.resize(0); - includeFileOffset=0; - includeFileLength=0; - currentListIndent.clear(); - listIndentStack.clear(); - if (!docString) return; - linkRef = ""; - linkText = ""; - inputString = docString; - inputPosition = 0; - docYYrestart( docYYin ); - BEGIN( DocScan ); - insideArgumentList = FALSE; - insideVerbatim = FALSE; - docYYlex(); - if (insideArgumentList) { insideArgumentList=FALSE; outDoc->endItemList(); } - if (insideItemList) { forceEndItemList(); } - if (inBlock()) endBlock(); - if (!currentListIndent.isEmpty()) - { - warn(yyFileName,yyLineNr,"Warning: Documentation ended in the middle " - "of a list!"); - warn_cont("Missing: "); - while (!currentListIndent.isEmpty()) - { - char c; - switch((c=*currentListIndent.pop())) - { - case 'O': warn_cont("
"); break; - case 'U': warn_cont(""); break; - case 'D': warn_cont(""); break; - } - } - warn_cont("\n"); - } - if (depthIf!=0) - { - warn(yyFileName,yyLineNr,"Warning: Documentation block contains \\if " - "without matching \\endif: nesting level is %d",depthIf); - } - if (!tableStack.isEmpty()) - { - forceEndTable(); - } - if (insideVerbatim) - { - warn(yyFileName,yyLineNr, - "Warning: file ended inside a \\verbatim block!" - ); - } - od.append(outDoc); - delete outDoc; outDoc=0; - return; -} - -//---------------------------------------------------------------------------- - -// in this pass all @copydoc commands are resolved. -void resolveCopyDocCommands(const char *scope,QCString &docString) -{ - copyDocString.resize(0); - copyDocScope = scope; - inputString = docString; - inputPosition = 0; - docYYrestart( docYYin ); - BEGIN( DocCopyFind ); - docYYlex(); - docString = copyDocString; -} - -//---------------------------------------------------------------------------- - -void parseDoc(OutputDocInterface &od,const char *fileName,int startLine, - const char *clName,MemberDef *md,const QCString &docStr) -{ - - //printf("parseDoc doc=`%s'\n",docStr.data()); - - if (Debug::isFlagSet(Debug::Validate)) - { - od.parseDoc(fileName,startLine,clName,md,docStr,FALSE); - } - else - { - strcpy(yyFileName,fileName); - yyLineNr = startLine; - - QCString docString=docStr; - resolveCopyDocCommands(clName,docString); - - yyLineNr = startLine; - //printf("parseDoc(file=`%s',line=%d)\n",fileName,startLine); - initParser(); - initParseCodeContext(); - exampleDoc=FALSE; // do not cross reference with member docs - className=clName; - memberDef = md; - hasParamCommand = FALSE; - paramsFound.setAutoDelete(FALSE); - paramsFound.clear(); - parseDocument(od,docString); - - if (md && hasParamCommand && Config_getBool("WARN_IF_UNDOCUMENTED")) - { - ArgumentList *al=memberDef->isDocsForDefinition() ? - memberDef->argumentList() : - memberDef->declArgumentList(); - if (al) - { - ArgumentListIterator ali(*al); - Argument *a; - bool found=FALSE; - for (ali.toFirst();(a=ali.current());++ali) - { - QCString argName = memberDef->isDefine() ? a->type : a->name; - if (argName.right(3)=="...") argName=argName.left(argName.length()-3); - if (!argName.isEmpty() && paramsFound.find(argName)==0) - { - found = TRUE; - break; - } - } - if (found) - { - QCString scope=memberDef->getScopeString(); - if (!scope.isEmpty()) scope+="::"; else scope=""; - warn(memberDef->docFile(),memberDef->docLine(), - "Warning: The following parameters of " - "%s%s%s are not documented:", - scope.data(),memberDef->name().data(), - argListToString(al).data()); - for (ali.toFirst();(a=ali.current());++ali) - { - QCString argName = memberDef->isDefine() ? a->type : a->name; - if (!argName.isEmpty() && paramsFound.find(argName)==0) - { - warn_cont( " parameter %s\n",argName.data()); - } - } - } - } - } - } -} - -//---------------------------------------------------------------------------- - -void parseText(OutputDocInterface &od,const QCString &txtString) -{ - if (txtString.isEmpty()) return; - if (Debug::isFlagSet(Debug::Validate)) - { - od.parseText(txtString); - } - else - { - inputString = txtString; - outDoc = od.clone(); - inputPosition = 0; - docYYrestart( docYYin ); - BEGIN( Text ); - docYYlex(); - od.append(outDoc); - delete outDoc; outDoc=0; - return; - } -} - -//---------------------------------------------------------------------------- - -void parseExample(OutputDocInterface &od,const QCString &docString, - const char *fileName) -{ - if (Debug::isFlagSet(Debug::Validate)) - { - od.parseDoc(fileName,/*startLine*/1,/*clName*/0,/*md*/0,docString,TRUE); - } - else - { - initParser(); - initParseCodeContext(); - exampleDoc=TRUE; // cross reference with member docs - exampleName=fileName; - strcpy(yyFileName,fileName); - parseDocument(od,docString); - } -} - -//---------------------------------------------------------------------------- -extern "C" { // some bogus code to keep the compiler happy - void docYYdummy() { yy_flex_realloc(0,0); } -} diff --git a/src/docparser.cpp b/src/docparser.cpp index 729dab4..097b30d 100644 --- a/src/docparser.cpp +++ b/src/docparser.cpp @@ -1740,6 +1740,33 @@ int DocHtmlHeader::parse() } goto endheader; } + else if (tagId==HTML_H4 && g_token->endTag) // found tag + { + if (m_level!=4) + { + warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + m_level); + } + goto endheader; + } + else if (tagId==HTML_H5 && g_token->endTag) // found tag + { + if (m_level!=5) + { + warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + m_level); + } + goto endheader; + } + else if (tagId==HTML_H6 && g_token->endTag) // found tag + { + if (m_level!=6) + { + warn(g_fileName,doctokenizerYYlineno,"Error: ended with ", + m_level); + } + goto endheader; + } else { warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within context", @@ -3504,6 +3531,27 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag retval = header->parse(); } break; + case HTML_H4: + { + DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,4); + m_children.append(header); + retval = header->parse(); + } + break; + case HTML_H5: + { + DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,5); + m_children.append(header); + retval = header->parse(); + } + break; + case HTML_H6: + { + DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,6); + m_children.append(header); + retval = header->parse(); + } + break; case HTML_IMG: { HtmlAttribListIterator li(tagHtmlAttribs); diff --git a/src/docparser.h b/src/docparser.h index ba3e3fe..1a79812 100644 --- a/src/docparser.h +++ b/src/docparser.h @@ -987,7 +987,7 @@ class DocSimpleListItem : public DocNode DocPara *m_paragraph; }; -/*! @brief Node representing a Html list item */ +/*! @brief Node representing a HTML list item */ class DocHtmlListItem : public CompAccept, public DocNode { public: @@ -1006,7 +1006,7 @@ class DocHtmlListItem : public CompAccept, public DocNode int m_itemNum; }; -/*! @brief Node representing a Html description data */ +/*! @brief Node representing a HTML description data */ class DocHtmlDescData : public CompAccept, public DocNode { public: @@ -1024,7 +1024,7 @@ class DocHtmlDescData : public CompAccept, public DocNode }; -/*! @brief Node representing a Html list item */ +/*! @brief Node representing a preformatted HTML section */ class DocHtmlPre : public CompAccept, public DocNode { public: @@ -1041,7 +1041,7 @@ class DocHtmlPre : public CompAccept, public DocNode HtmlAttribList m_attribs; }; -/*! @brief Node representing a Html table cell */ +/*! @brief Node representing a HTML table cell */ class DocHtmlCell : public CompAccept, public DocNode { public: @@ -1067,7 +1067,7 @@ class DocHtmlCell : public CompAccept, public DocNode HtmlAttribList m_attribs; }; -/*! @brief Node representing a Html table caption */ +/*! @brief Node representing a HTML table caption */ class DocHtmlCaption : public CompAccept, public DocNode { public: @@ -1084,7 +1084,7 @@ class DocHtmlCaption : public CompAccept, public DocNode HtmlAttribList m_attribs; }; -/*! @brief Node representing a Html table row */ +/*! @brief Node representing a HTML table row */ class DocHtmlRow : public CompAccept, public DocNode { public: @@ -1102,7 +1102,7 @@ class DocHtmlRow : public CompAccept, public DocNode HtmlAttribList m_attribs; }; -/*! @brief Node representing a Html table */ +/*! @brief Node representing a HTML table */ class DocHtmlTable : public CompAccept, public DocNode { public: diff --git a/src/doctokenizer.l b/src/doctokenizer.l index ab6e1b2..4f34a00 100644 --- a/src/doctokenizer.l +++ b/src/doctokenizer.l @@ -234,13 +234,17 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")? OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()" OPCAST {BLANK}+[^(\r\n.,]+ OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) -LNKWORD1 {SCOPEMASK}({FUNCARG}({BLANK}*("const"|"volatile"))?)? +LNKWORD1 {SCOPEMASK} +CVSPEC {BLANK}*("const"|"volatile") LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} WORD1 [^ \t\n\r\\@<>&$#,.]+ WORD2 "."|"," WORD1NQ [^ \t\n\r\\@<>&$#,."]+ WORD2NQ "."|"," 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" +HTMLKEYU "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" +HTMLKEYW {HTMLKEYL}|{HTMLKEYU} %option noyywrap %option yylineno @@ -354,11 +358,29 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" g_token->name = yytext; return TK_SYMBOL; } -{LNKWORD1}/[^a-z_A-Z0-9] | + + /********* patterns for linkable words ******************/ + +{ID}/"<"{HTMLKEYW}">" { /* this rule is to prevent opening html + * tag to be recognized as a templated classes + */ + g_token->name = yytext; + return TK_LNKWORD; + } +{LNKWORD1} | +{LNKWORD1}{FUNCARG} | {LNKWORD2} { g_token->name = yytext; return TK_LNKWORD; } +{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] { + g_token->name = yytext; + g_token->name = g_token->name.left(g_token->name.length()-1); + unput(yytext[yyleng-1]); + return TK_LNKWORD; + } + /********* patterns for normal words ******************/ + {WORD1} | {WORD2} { /* function call */ g_token->name = yytext; @@ -370,6 +392,9 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" */ goto find_rule; } + + /*******************************************************/ + {BLANK}+ | {BLANK}*\n{BLANK}* { /* white space */ g_token->chars=yytext; diff --git a/src/dot.cpp b/src/dot.cpp index 58c05d3..bccf249 100644 --- a/src/dot.cpp +++ b/src/dot.cpp @@ -76,7 +76,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName) if (strncmp(buf,"rect",4)==0) { // obtain the url and the coordinates in the order used by graphviz-1.5 - sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1); + sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2); // later versions of graphviz corrected the y coordinate order // the rule is that y2>=y1, so test and switch if needed if (y2brief.data(),root->doc.data()); QCString tagName; QCString refFileName; @@ -1777,6 +1778,10 @@ void addMethodToClass(Entry *root,ClassDef *cd, name=name.left(i); } + //printf("root->name=`%s; root->args=`%s' root->argList=`%s'\n", + // root->name.data(),root->args.data(),argListToString(root->argList).data() + // ); + // adding class member MemberDef *md=new MemberDef( root->fileName,root->startLine, @@ -2043,6 +2048,7 @@ static void buildFunctionList(Entry *root) //} if (root->proto) { + //printf("setDeclArgumentList to %p\n",argList); md->setDeclArgumentList(argList); } else @@ -4463,7 +4469,6 @@ static void findMember(Entry *root, // ); md->setDefinitionTemplateParameterLists(root->tArgLists); - //md->setMemberDefTemplateArguments(root->mtArgList); md->setArgumentList(argList); } else // no match -> delete argument list @@ -5377,7 +5382,7 @@ static void buildCompleteMemberLists() ClassSDict::Iterator cli(Doxygen::classSDict); for (cli.toFirst();(cd=cli.current());++cli) { - if (!cd->isReference() && // not an external class + if (// !cd->isReference() && // not an external class cd->subClasses()->count()==0 && // is a root of the hierarchy cd->baseClasses()->count()>0) // and has at least one base class { diff --git a/src/htmlgen.cpp b/src/htmlgen.cpp index bed90c4..fd2ef70 100644 --- a/src/htmlgen.cpp +++ b/src/htmlgen.cpp @@ -110,11 +110,11 @@ HtmlGenerator::~HtmlGenerator() //printf("HtmlGenerator::~HtmlGenerator()\n"); } -void HtmlGenerator::append(const OutputGenerator *g) -{ - t << g->getContents(); - col+=((HtmlGenerator *)g)->col; -} +//void HtmlGenerator::append(const OutputGenerator *g) +//{ +// t << g->getContents(); +// col+=((HtmlGenerator *)g)->col; +//} void HtmlGenerator::init() { diff --git a/src/htmlgen.h b/src/htmlgen.h index aac81f6..5f8c13c 100644 --- a/src/htmlgen.h +++ b/src/htmlgen.h @@ -33,9 +33,6 @@ class HtmlGenerator : public OutputGenerator static void writeHeaderFile(QFile &f); static void writeFooterFile(QFile &f); - OutputGenerator *copy() { return new HtmlGenerator; } - //OutputGenerator *clone() { return new HtmlGenerator(*this); } - void append(const OutputGenerator *o); void enable() { active=TRUE; } void disable() { active=FALSE; } void enableIf(OutputType o) { if (o==Html) active=TRUE; } @@ -46,15 +43,12 @@ class HtmlGenerator : public OutputGenerator void printDoc(DocNode *); - - //void generateExternalIndex(); void startFile(const char *name,const char *manName, const char *title,bool external); void writeFooter(int,bool); void endFile(); void clearBuffer(); - //void writeIndex(); void startIndexSection(IndexSections) {} void endIndexSection(IndexSections) {} void startProjectNumber(); @@ -75,11 +69,6 @@ class HtmlGenerator : public OutputGenerator void endIndexValue(const char *,bool); void startItemList() { t << "
    " << endl; } void endItemList() { t << "
" << endl; } - //void startEnumList() { t << "
    " << endl; } - //void endEnumList() { t << "
" << endl; } - //void startAlphabeticalIndexList(); - //void endAlphabeticalIndexList(); - //void writeIndexHeading(const char *s); void writeIndexItem(const char *ref,const char *file,const char *name); void docify(const char *text); void codify(const char *text); @@ -91,7 +80,6 @@ class HtmlGenerator : public OutputGenerator void endTextLink(); void startHtmlLink(const char *url); void endHtmlLink(); - //void writeMailLink(const char *url); void startTypewriter() { t << ""; } void endTypewriter() { t << ""; } void startGroupHeader(); @@ -125,15 +113,9 @@ class HtmlGenerator : public OutputGenerator { t << ""; } void startCodeFragment() { t << "
"; }
     void endCodeFragment()   { t << "
"; } - //void startPreFragment() { t << "
"; }
-    //void endPreFragment()   { t << "
"; } - //void startVerbatimFragment() { t << "
"; }
-    //void endVerbatimFragment()   { t << "
"; } void writeLineNumber(const char *,const char *,const char *,int); void startCodeLine() { col=0; } void endCodeLine() { codify("\n"); } - //void writeBoldString(const char *text) - // { t << ""; docify(text); t << ""; } void startEmphasis() { t << ""; } void endEmphasis() { t << ""; } void startBold() { t << ""; } @@ -146,15 +128,12 @@ class HtmlGenerator : public OutputGenerator void writeChar(char c); void startMemberDoc(const char *,const char *,const char *,const char *); void endMemberDoc(); - //void writeDoxyAnchor(const char *fName,const char *clName, - // const char *anchor,const char *name); void startDoxyAnchor(const char *fName,const char *manName, const char *anchor,const char *name); void endDoxyAnchor(const char *fName,const char *anchor); void startCodeAnchor(const char *label) { t << ""; } void endCodeAnchor() { } void writeLatexSpacing() {} - //void writeLatexLabel(const char *,const char *) {} void writeStartAnnoItem(const char *type,const char *file, const char *path,const char *name); void writeEndAnnoItem(const char *) { t << endl; } @@ -166,63 +145,26 @@ class HtmlGenerator : public OutputGenerator void endCenter() { t << "" << endl; } void startSmall() { t << "" << endl; } void endSmall() { t << "" << endl; } - //void startSubscript() { t << ""; } - //void endSubscript() { t << ""; } - //void startSuperscript() { t << ""; } - //void endSuperscript() { t << ""; } - //void startTable(bool,int) - // { t << ""; } - //void endTable(bool hasCaption) - // { if (!hasCaption) t << ""; - // t << "
" << endl; - // } - //void startCaption() { t << ""; } - //void endCaption() { t << "" << endl; } - //void nextTableRow() { t << ""; } - //void endTableRow() { t << "" << endl; } - //void nextTableColumn() { t << ""; } - //void endTableColumn() { t << ""; } - //void writeCopyright() { t << "©"; } - //void writeQuote() { t << """; } - //void writeUmlaut(char c) { t << "&" << c << "uml;"; } - //void writeAcute(char c) { t << "&" << c << "acute;"; } - //void writeGrave(char c) { t << "&" << c << "grave;"; } - //void writeCirc(char c) { t << "&" << c << "circ;"; } - //void writeTilde(char c) { t << "&" << c << "tilde;"; } - //void writeRing(char c) { t << "&" << c << "ring;"; } - //void writeSharpS() { t << "ß"; } - //void writeCCedil(char c) { t << "&" << c << "cedil;"; } void startDescList(SectionTypes) { t << "
" << endl; } void endDescList() { t << "
"; } void startSimpleSect(SectionTypes,const char *,const char *,const char *); void endSimpleSect(); void startParamList(ParamListTypes,const char *); void endParamList(); - //void endDescTitle() { t << ""; } void writeDescItem() { t << "
" << endl; } void startSection(const char *,const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType); - //void writeSectionRef(const char *,const char *,const char *,const char *); - //void writeSectionRefItem(const char *,const char *,const char *); - //void writeSectionRefAnchor(const char *,const char *,const char *); void addIndexItem(const char *,const char *); void startIndent(); void endIndent(); void writeSynopsis() {} void startClassDiagram(); void endClassDiagram(ClassDiagram &,const char *,const char *); - //void startColorFont(uchar r,uchar g,uchar b); - //void endColorFont(); void startPageRef() {} void endPageRef(const char *,const char *) {} void startQuickIndexItem(const char *,const char *); void endQuickIndexItem(); - //void writeFormula(const char *,const char *); void writeNonBreakableSpace(int); - //void startImage(const char *,const char *,bool); - //void endImage(bool); - //void startDotFile(const char *,bool); - //void endDotFile(bool); void startDescTable() { t << "" << endl; } @@ -236,7 +178,6 @@ class HtmlGenerator : public OutputGenerator { t << "" << endl; } - //static void docifyStatic(QTextStream &t,const char *str); void startDotGraph(); void endDotGraph(DotClassGraph &g); @@ -262,14 +203,6 @@ class HtmlGenerator : public OutputGenerator void startFontClass(const char *s) { t << ""; } void endFontClass() { t << ""; } - //void startHtmlOnly() {} - //void endHtmlOnly() {} - //void startLatexOnly() {} - //void endLatexOnly() {} - - //void startSectionRefList(); - //void endSectionRefList(); - void writeCodeAnchor(const char *anchor) { t << ""; } diff --git a/src/latexdocvisitor.cpp b/src/latexdocvisitor.cpp index a6c2c9c..ce71479 100644 --- a/src/latexdocvisitor.cpp +++ b/src/latexdocvisitor.cpp @@ -623,18 +623,21 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header) { switch(header->level()) { - case 1: m_t << "\\subsection*{"; break; - case 2: m_t << "\\subsubsection*{"; break; - case 3: m_t << "\\paragraph*{"; break; + case 1: m_t << "\\subsection*{"; break; + case 2: m_t << "\\subsubsection*{"; break; + case 3: m_t << "\\paragraph*{"; break; + default: m_t << "\\subparagraph*{"; break; } } else { switch(header->level()) { - case 1: m_t << "\\section*{"; break; - case 2: m_t << "\\subsection*{"; break; - case 3: m_t << "\\subsubsection*{"; break; + case 1: m_t << "\\section*{"; break; + case 2: m_t << "\\subsection*{"; break; + case 3: m_t << "\\subsubsection*{"; break; + case 4: m_t << "\\paragraph*{"; break; + default: m_t << "\\subparagraph*{"; break; } } } diff --git a/src/latexgen.cpp b/src/latexgen.cpp index ec74944..09ecae4 100644 --- a/src/latexgen.cpp +++ b/src/latexgen.cpp @@ -113,24 +113,24 @@ LatexGenerator::~LatexGenerator() // col=g.col; //} -void LatexGenerator::append(const OutputGenerator *g) -{ - t << g->getContents(); - col+=((LatexGenerator *)g)->col; - insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing; - firstDescItem = ((LatexGenerator *)g)->firstDescItem; - insidePre = insidePre || ((LatexGenerator *)g)->insidePre; - //printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), - // insideTabbing ? "TRUE" : "FALSE" ); -} +//void LatexGenerator::append(const OutputGenerator *g) +//{ +// t << g->getContents(); +// col+=((LatexGenerator *)g)->col; +// insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing; +// firstDescItem = ((LatexGenerator *)g)->firstDescItem; +// insidePre = insidePre || ((LatexGenerator *)g)->insidePre; +// //printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), +// // insideTabbing ? "TRUE" : "FALSE" ); +//} -OutputGenerator *LatexGenerator::copy() -{ - LatexGenerator *result = new LatexGenerator; - result->insideTabbing=insideTabbing; - result->insidePre=insidePre; - return result; -} +//OutputGenerator *LatexGenerator::copy() +//{ +// LatexGenerator *result = new LatexGenerator; +// result->insideTabbing=insideTabbing; +// result->insidePre=insidePre; +// return result; +//} void LatexGenerator::init() { @@ -1295,62 +1295,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) //void LatexGenerator::docifyStatic(QTextStream &t,const char *str) void LatexGenerator::docify(const char *str) { -#if 0 - //static bool isCzech = theTranslator->idLanguage()=="czech"; - static bool isJapanese = theTranslator->idLanguage()=="japanese"; - //static bool isKorean = theTranslator->idLanguage()=="korean"; - //static bool isRussian = theTranslator->idLanguage()=="russian"; - //static bool isUkrainian = theTranslator->idLanguage()=="ukrainian"; - //static bool isChinese = theTranslator->idLanguage()=="chinese" || - // theTranslator->idLanguage()=="chinese-traditional"; - //static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2"; - //static bool isGreek = theTranslator->idLanguage()=="greek"; - if (str) - { - const unsigned char *p=(const unsigned char *)str; - unsigned char c; - unsigned char pc='\0'; - bool multiByte = FALSE; - while (*p) - { - c=*p++; - - if( isJapanese) - { - if (multiByte) - { - t << (char)c; - multiByte = FALSE; - pc = c; - continue; - } - if (c>=0x80) - { - multiByte = TRUE; - t << (char)c; - pc = c; - continue; - } - } - - if (insidePre) - { - switch(c) - { - case '\\': t << "\\(\\backslash\\)"; break; - case '{': t << "\\{"; break; - case '}': t << "\\}"; break; - default: t << (char)c; break; - } - } - else - { - filterLatexChar(t,c,insideTabbing); - } - pc = c; - } - } -#endif filterLatexString(t,str,insideTabbing,insidePre); } @@ -1377,7 +1321,7 @@ void LatexGenerator::codify(const char *str) MultiByte = FALSE; continue; } - if ( c<0 ) // char in range [0x80..0xff] + if ( (uchar)c>=0x80 || (uchar)c<=0xff) // char in range [0x80..0xff] { t << (char)c; MultiByte = TRUE; diff --git a/src/latexgen.h b/src/latexgen.h index d6c9d67..e03177b 100644 --- a/src/latexgen.h +++ b/src/latexgen.h @@ -31,9 +31,9 @@ class LatexGenerator : public OutputGenerator static void writeStyleSheetFile(QFile &f); static void writeHeaderFile(QFile &f); - OutputGenerator *copy(); + //OutputGenerator *copy(); //OutputGenerator *clone() { return new LatexGenerator(*this); } - void append(const OutputGenerator *o); + //void append(const OutputGenerator *o); void enable() { active=TRUE; } void disable() { active=FALSE; } void enableIf(OutputType o) { if (o==Latex) active=TRUE; } diff --git a/src/mangen.cpp b/src/mangen.cpp index cc55ebe..8712328 100644 --- a/src/mangen.cpp +++ b/src/mangen.cpp @@ -62,21 +62,21 @@ ManGenerator::~ManGenerator() { } -void ManGenerator::append(const OutputGenerator *g) -{ - QCString r=g->getContents(); - if (upperCase) - t << r.upper(); - else - t << r; - if (!r.isEmpty()) - firstCol = r.at(r.length()-1)=='\n'; - else - firstCol = ((ManGenerator *)g)->firstCol; - col+=((ManGenerator *)g)->col; - inHeader=((ManGenerator *)g)->inHeader; - paragraph=FALSE; -} +//void ManGenerator::append(const OutputGenerator *g) +//{ +// QCString r=g->getContents(); +// if (upperCase) +// t << r.upper(); +// else +// t << r; +// if (!r.isEmpty()) +// firstCol = r.at(r.length()-1)=='\n'; +// else +// firstCol = ((ManGenerator *)g)->firstCol; +// col+=((ManGenerator *)g)->col; +// inHeader=((ManGenerator *)g)->inHeader; +// paragraph=FALSE; +//} void ManGenerator::init() { diff --git a/src/mangen.h b/src/mangen.h index 72f9b02..12af60b 100644 --- a/src/mangen.h +++ b/src/mangen.h @@ -28,9 +28,9 @@ class ManGenerator : public OutputGenerator ManGenerator(); ~ManGenerator(); - OutputGenerator *copy() { return new ManGenerator; } + //OutputGenerator *copy() { return new ManGenerator; } //OutputGenerator *clone() { return new ManGenerator(*this); } - void append(const OutputGenerator *o); + //void append(const OutputGenerator *o); void enable() { active=TRUE; } void disable() { active=FALSE; } void enableIf(OutputType o) { if (o==Man) active=TRUE; } diff --git a/src/memberdef.cpp b/src/memberdef.cpp index 9c38344..7e2e454 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -262,7 +262,8 @@ MemberDef::MemberDef(const char *df,int dl, const ArgumentList *tal,const ArgumentList *al ) : Definition(df,dl,na) { - //printf("++++++ MemberDef(%s file=%s,line=%d static=%d) ++++++ \n",na,df,dl,s); + //printf("++++++ MemberDef(%s file=%s,line=%d static=%d) ++++++ \n", + // na,df,dl,s); classDef=0; fileDef=0; redefines=0; @@ -345,6 +346,7 @@ MemberDef::MemberDef(const char *df,int dl, defArgList->constSpecifier = al->constSpecifier; defArgList->volatileSpecifier = al->volatileSpecifier; defArgList->pureSpecifier = al->pureSpecifier; + //printf("defArgList(%p)->constSpecifier=%d\n",defArgList,defArgList->constSpecifier); } else { @@ -355,6 +357,8 @@ MemberDef::MemberDef(const char *df,int dl, { declArgList = new ArgumentList; stringToArgumentList(args,declArgList); + //printf("setDeclArgList %s to %p const=%d\n",args.data(), + // declArgList,declArgList->constSpecifier); } else { @@ -1922,3 +1926,13 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, } } +void MemberDef::setArgumentList(ArgumentList *al) +{ + if (defArgList) delete defArgList; + defArgList = al; +} +void MemberDef::setDeclArgumentList(ArgumentList *al) +{ + if (declArgList) delete declArgList; + declArgList = al; +} diff --git a/src/memberdef.h b/src/memberdef.h index 5be5285..7a8aba3 100644 --- a/src/memberdef.h +++ b/src/memberdef.h @@ -200,16 +200,8 @@ class MemberDef : public Definition // argument related members ArgumentList *argumentList() const { return defArgList; } ArgumentList *declArgumentList() const { return declArgList; } - void setArgumentList(ArgumentList *al) - { - if (defArgList) delete defArgList; - defArgList = al; - } - void setDeclArgumentList(ArgumentList *al) - { - if (declArgList) delete declArgList; - declArgList = al; - } + void setArgumentList(ArgumentList *al); + void setDeclArgumentList(ArgumentList *al); ArgumentList *templateArguments() const { return tArgList; } void setDefinitionTemplateParameterLists(QList *lists); QList *definitionTemplateParameterLists() const diff --git a/src/outputgen.h b/src/outputgen.h index 104a09b..b82c0af 100644 --- a/src/outputgen.h +++ b/src/outputgen.h @@ -254,8 +254,6 @@ class OutputGenerator : public BaseOutputDocInterface /////////////////////////////////////////////////////////////// // generic generator methods /////////////////////////////////////////////////////////////// - virtual OutputGenerator *copy() = 0; - //virtual void append(const OutputGenerator *) = 0; virtual void enable() = 0; virtual void disable() = 0; virtual void enableIf(OutputType o) = 0; @@ -263,8 +261,6 @@ class OutputGenerator : public BaseOutputDocInterface virtual void disableIfNot(OutputType o) = 0; virtual bool isEnabled(OutputType o) = 0; virtual OutputGenerator *get(OutputType o) = 0; - //void clear() { b.close(); a.resize(0); b.setBuffer(a); - // b.open(IO_WriteOnly); t.setDevice(&b); } void startPlainFile(const char *name); void endPlainFile(); QCString getContents() const; @@ -370,8 +366,8 @@ class OutputGenerator : public BaseOutputDocInterface /*! \brief Interface used for generating documentation. * - * This abstract class is used by the documentation block - * parser to generate the output for a specific format. + * This abstract class is used by several functions + * to generate the output for a specific format. * This interface contains some state saving and changing * functions for dealing with format specific output. */ @@ -383,7 +379,7 @@ class OutputDocInterface : public BaseOutputDocInterface /*! Create a new output generator. This can later by appended * to the current one using append(). */ - virtual OutputDocInterface *clone() = 0; + //virtual OutputDocInterface *clone() = 0; /*! Disables all output formats except format \a o * (useful for OutputList only) diff --git a/src/outputlist.cpp b/src/outputlist.cpp index b580a58..5826cca 100644 --- a/src/outputlist.cpp +++ b/src/outputlist.cpp @@ -36,23 +36,23 @@ OutputList::OutputList(bool) outputs->setAutoDelete(TRUE); } -OutputList::OutputList(const OutputList *olist) -{ - //printf("OutputList::OutputList() deep copy\n"); - outputs = new QList; - outputs->setAutoDelete(TRUE); - - QList *ol=olist->outputs; - OutputGenerator *og=ol->first(); - while (og) - { - OutputGenerator *ogc=og->copy(); - outputs->append(ogc); - if (og->isEnabled()) ogc->enable(); else ogc->disable(); - og=ol->next(); - } - //printf("OutputList::OutputList dst=%d res=%d\n",ol->count(),outputs->count()); -} +//OutputList::OutputList(const OutputList *olist) +//{ +// //printf("OutputList::OutputList() deep copy\n"); +// outputs = new QList; +// outputs->setAutoDelete(TRUE); +// +// QList *ol=olist->outputs; +// OutputGenerator *og=ol->first(); +// while (og) +// { +// OutputGenerator *ogc=og->copy(); +// outputs->append(ogc); +// if (og->isEnabled()) ogc->enable(); else ogc->disable(); +// og=ol->next(); +// } +// //printf("OutputList::OutputList dst=%d res=%d\n",ol->count(),outputs->count()); +//} OutputList::~OutputList() { @@ -60,23 +60,23 @@ OutputList::~OutputList() delete outputs; } -OutputList &OutputList::operator=(const OutputList &olist) -{ - if (this!=&olist) - { - QList *ol=olist.outputs; - OutputGenerator *ogsrc=ol->first(); - OutputGenerator *ogdst=outputs->first(); - //printf("OutputList::operator= src=%d dst=%d\n",outputs->count(),ol->count()); - while (ogdst) - { - ogdst=ogsrc->copy(); - ogsrc=ol->next(); - ogdst=outputs->next(); - } - } - return *this; -} +//OutputList &OutputList::operator=(const OutputList &olist) +//{ +// if (this!=&olist) +// { +// QList *ol=olist.outputs; +// OutputGenerator *ogsrc=ol->first(); +// OutputGenerator *ogdst=outputs->first(); +// //printf("OutputList::operator= src=%d dst=%d\n",outputs->count(),ol->count()); +// while (ogdst) +// { +// ogdst=ogsrc->copy(); +// ogsrc=ol->next(); +// ogdst=outputs->next(); +// } +// } +// return *this; +//} void OutputList::add(const OutputGenerator *og) { diff --git a/src/outputlist.h b/src/outputlist.h index 3bdf21e..fc49f1e 100644 --- a/src/outputlist.h +++ b/src/outputlist.h @@ -42,10 +42,6 @@ class OutputList : public OutputDocInterface public: OutputList(bool); virtual ~OutputList(); - OutputList(const OutputList *ol); - OutputList &operator=(const OutputList &ol); - //OutputList &operator+=(const OutputList &ol); - void add(const OutputGenerator *); @@ -68,17 +64,7 @@ class OutputList : public OutputDocInterface bool isExample); void parseText(const QCString &textStr); - OutputDocInterface *clone() - { - return new OutputList(this); - } - //void append(const OutputDocInterface *g) - //{ - // operator+=(*(OutputList *)g); - //} - //void writeIndex() - //{ forall(&OutputGenerator::writeIndex); } void startIndexSection(IndexSections is) { forall(&OutputGenerator::startIndexSection,is); } void endIndexSection(IndexSections is) @@ -124,16 +110,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startItemList); } void endItemList() { forall(&OutputGenerator::endItemList); } - //void startEnumList() - //{ forall(&OutputGenerator::startEnumList); } - //void endEnumList() - //{ forall(&OutputGenerator::endEnumList); } - //void startAlphabeticalIndexList() - //{ forall(&OutputGenerator::startAlphabeticalIndexList); } - //void endAlphabeticalIndexList() - //{ forall(&OutputGenerator::endAlphabeticalIndexList); } - //void writeIndexHeading(const char *s) - //{ forall(&OutputGenerator::writeIndexHeading,s); } void writeIndexItem(const char *ref,const char *file,const char *text) { forall(&OutputGenerator::writeIndexItem,ref,file,text); } void docify(const char *s) @@ -154,8 +130,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startHtmlLink,url); } void endHtmlLink() { forall(&OutputGenerator::endHtmlLink); } - //void writeMailLink(const char *url) - //{ forall(&OutputGenerator::writeMailLink,url); } void writeStartAnnoItem(const char *type,const char *file, const char *path,const char *name) { forall(&OutputGenerator::writeStartAnnoItem,type,file,path,name); } @@ -213,22 +187,10 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startCodeFragment); } void endCodeFragment() { forall(&OutputGenerator::endCodeFragment); } - //void startPreFragment() - //{ forall(&OutputGenerator::startPreFragment); } - //void endPreFragment() - //{ forall(&OutputGenerator::endPreFragment); } - //void startVerbatimFragment() - //{ forall(&OutputGenerator::startVerbatimFragment); } - //void endVerbatimFragment() - //{ forall(&OutputGenerator::endVerbatimFragment); } void startCodeLine() { forall(&OutputGenerator::startCodeLine); } void endCodeLine() { forall(&OutputGenerator::endCodeLine); } - //void startLineNumber() - //{ forall(&OutputGenerator::startLineNumber); } - //void endLineNumber() - //{ forall(&OutputGenerator::endLineNumber); } void writeLineNumber(const char *ref,const char *file,const char *anchor, int lineNumber) { forall(&OutputGenerator::writeLineNumber,ref,file,anchor,lineNumber); } @@ -254,8 +216,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::endCodeAnchor); } void writeLatexSpacing() { forall(&OutputGenerator::writeLatexSpacing); } - //void writeLatexLabel(const char *scope,const char *anchor) - //{ forall(&OutputGenerator::writeLatexLabel,scope,anchor); } void startDescription() { forall(&OutputGenerator::startDescription); } void endDescription() @@ -280,56 +240,12 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startSmall); } void endSmall() { forall(&OutputGenerator::endSmall); } - //void startSubscript() - //{ forall(&OutputGenerator::startSubscript); } - //void endSubscript() - //{ forall(&OutputGenerator::endSubscript); } - //void startSuperscript() - //{ forall(&OutputGenerator::startSuperscript); } - //void endSuperscript() - //{ forall(&OutputGenerator::endSuperscript); } - //void startTable(bool hasCaption,int cols) - //{ forall(&OutputGenerator::startTable,hasCaption,cols); } - //void endTable(bool hasCaption) - //{ forall(&OutputGenerator::endTable,hasCaption); } - //void startCaption() - //{ forall(&OutputGenerator::startCaption); } - //void endCaption() - //{ forall(&OutputGenerator::endCaption); } - //void nextTableRow() - //{ forall(&OutputGenerator::nextTableRow); } - //void endTableRow() - //{ forall(&OutputGenerator::endTableRow); } - //void nextTableColumn() - //{ forall(&OutputGenerator::nextTableColumn); } - //void endTableColumn() - //{ forall(&OutputGenerator::endTableColumn); } void lineBreak() { forall(&OutputGenerator::lineBreak); } void startBold() { forall(&OutputGenerator::startBold); } void endBold() { forall(&OutputGenerator::endBold); } - //void writeCopyright() - //{ forall(&OutputGenerator::writeCopyright); } - //void writeQuote() - //{ forall(&OutputGenerator::writeQuote); } - //void writeUmlaut(char c) - //{ forall(&OutputGenerator::writeUmlaut,c); } - //void writeAcute(char c) - //{ forall(&OutputGenerator::writeAcute,c); } - //void writeGrave(char c) - //{ forall(&OutputGenerator::writeGrave,c); } - //void writeCirc(char c) - //{ forall(&OutputGenerator::writeCirc,c); } - //void writeTilde(char c) - //{ forall(&OutputGenerator::writeTilde,c); } - //void writeRing(char c) - //{ forall(&OutputGenerator::writeRing,c); } - //void writeSharpS() - //{ forall(&OutputGenerator::writeSharpS); } - //void writeCCedil(char c) - //{ forall(&OutputGenerator::writeCCedil,c); } void startMemberDescription() { forall(&OutputGenerator::startMemberDescription); } void endMemberDescription() @@ -343,8 +259,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startParamList,t,title); } void endParamList() { forall(&OutputGenerator::endParamList); } - //void endDescTitle() - //{ forall(&OutputGenerator::endDescTitle); } void writeDescItem() { forall(&OutputGenerator::writeDescItem); } void startIndent() @@ -355,13 +269,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startSection,lab,title,t); } void endSection(const char *lab,SectionInfo::SectionType t) { forall(&OutputGenerator::endSection,lab,t); } - //void writeSectionRef(const char *ref,const char *file, - // const char *anchor, const char *title) - //{ forall(&OutputGenerator::writeSectionRef,ref,file,anchor,title); } - //void writeSectionRefItem(const char *page,const char *lab, const char *title) - //{ forall(&OutputGenerator::writeSectionRefItem,page,lab,title); } - //void writeSectionRefAnchor(const char *page,const char *lab, const char *title) - //{ forall(&OutputGenerator::writeSectionRefAnchor,page,lab,title); } void addIndexItem(const char *s1,const char *s2) { forall(&OutputGenerator::addIndexItem,s1,s2); } void writeSynopsis() @@ -370,10 +277,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startClassDiagram); } void endClassDiagram(ClassDiagram &d,const char *f,const char *n) { forall(&OutputGenerator::endClassDiagram,d,f,n); } - //void startColorFont(uchar r,uchar g,uchar b) - //{ forall(&OutputGenerator::startColorFont,r,g,b); } - //void endColorFont() - //{ forall(&OutputGenerator::endColorFont); } void startPageRef() { forall(&OutputGenerator::startPageRef); } void endPageRef(const char *c,const char *a) @@ -382,19 +285,8 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startQuickIndexItem,s,l); } void endQuickIndexItem() { forall(&OutputGenerator::endQuickIndexItem); } - //void writeFormula(const char *n,const char *t) - //{ forall(&OutputGenerator::writeFormula,n,t); } void writeNonBreakableSpace(int num) { forall(&OutputGenerator::writeNonBreakableSpace,num); } - //void startImage(const char *n,const char *s,bool c) - //{ forall(&OutputGenerator::startImage,n,s,c); } - //void endImage(bool c) - //{ forall(&OutputGenerator::endImage,c); } - //void startDotFile(const char *n,bool c) - //{ forall(&OutputGenerator::startDotFile,n,c); } - //void endDotFile(bool c) - //{ forall(&OutputGenerator::endDotFile,c); } - void startDescTable() { forall(&OutputGenerator::startDescTable); } void endDescTable() @@ -423,7 +315,6 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::endTextBlock); } void lastIndexPage() { forall(&OutputGenerator::lastIndexPage); } - void startMemberDocPrefixItem() { forall(&OutputGenerator::startMemberDocPrefixItem); } void endMemberDocPrefixItem() @@ -444,34 +335,12 @@ class OutputList : public OutputDocInterface { forall(&OutputGenerator::startParameterList); } void endParameterList() { forall(&OutputGenerator::endParameterList); } - void startFontClass(const char *c) { forall(&OutputGenerator::startFontClass,c); } void endFontClass() { forall(&OutputGenerator::endFontClass); } - - //void startHtmlOnly() - //{ forall(&OutputGenerator::startHtmlOnly); } - //void endHtmlOnly() - //{ forall(&OutputGenerator::endHtmlOnly); } - //void startLatexOnly() - //{ forall(&OutputGenerator::startLatexOnly); } - //void endLatexOnly() - //{ forall(&OutputGenerator::endLatexOnly); } - - //void startSectionRefList() - //{ forall(&OutputGenerator::startSectionRefList); } - //void endSectionRefList() - //{ forall(&OutputGenerator::endSectionRefList); } - void writeCodeAnchor(const char *name) { forall(&OutputGenerator::writeCodeAnchor,name); } -#if 0 - void startPlainFile(const char *name) - { forall(&OutputGenerator::startPlainFile,name); } - void endPlainFile() - { forall(&OutputGenerator::endPlainFile); } -#else // this is to work around a bug in the SGI MipsPro compiler void startPlainFile(const char *name) { OutputGenerator *og=outputs->first(); @@ -490,7 +359,6 @@ class OutputList : public OutputDocInterface og=outputs->next(); } } -#endif private: void debug(); diff --git a/src/rtfgen.cpp b/src/rtfgen.cpp index af35b80..19fc945 100644 --- a/src/rtfgen.cpp +++ b/src/rtfgen.cpp @@ -65,25 +65,25 @@ RTFGenerator::~RTFGenerator() { } -void RTFGenerator::append(const OutputGenerator *g) -{ - t << g->getContents(); - col+=((RTFGenerator *)g)->col; - //insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing; - m_listLevel=((RTFGenerator *)g)->m_listLevel; - m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph; - //printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), - // insideTabbing ? "TRUE" : "FALSE" ); -} +//void RTFGenerator::append(const OutputGenerator *g) +//{ +// t << g->getContents(); +// col+=((RTFGenerator *)g)->col; +// //insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing; +// m_listLevel=((RTFGenerator *)g)->m_listLevel; +// m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph; +// //printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), +// // insideTabbing ? "TRUE" : "FALSE" ); +//} -OutputGenerator *RTFGenerator::copy() -{ - RTFGenerator *result = new RTFGenerator; - //result->insideTabbing=insideTabbing; - result->m_listLevel=m_listLevel; - result->m_omitParagraph=m_omitParagraph; - return result; -} +//OutputGenerator *RTFGenerator::copy() +//{ +// RTFGenerator *result = new RTFGenerator; +// //result->insideTabbing=insideTabbing; +// result->m_listLevel=m_listLevel; +// result->m_omitParagraph=m_omitParagraph; +// return result; +//} void RTFGenerator::writeStyleSheetFile(QFile &file) { diff --git a/src/rtfgen.h b/src/rtfgen.h index 07f8ae7..45ec1de 100644 --- a/src/rtfgen.h +++ b/src/rtfgen.h @@ -31,9 +31,9 @@ class RTFGenerator : public OutputGenerator static void writeStyleSheetFile(QFile &f); static void writeExtensionsFile(QFile &file); - OutputGenerator *copy(); + //OutputGenerator *copy(); //OutputGenerator *clone() { return new RTFGenerator(*this); } - void append(const OutputGenerator *o); + //void append(const OutputGenerator *o); void enable() { active=TRUE; } void disable() { active=FALSE; } void enableIf(OutputType o) { if (o==RTF) active=TRUE; } diff --git a/src/scanner.l b/src/scanner.l index a3d2c76..6d055eb 100644 --- a/src/scanner.l +++ b/src/scanner.l @@ -2552,7 +2552,9 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) if ( *yytext == '{' ) { if ( !insidePHP && (current_root->section & Entry::COMPOUND_MASK) ) - previous->memSpec = previous->memSpec | Entry::Inline; + { + previous->memSpec |= Entry::Inline; + } //addToBody(yytext); curlyCount=0; BEGIN( SkipCurly ) ; @@ -2932,7 +2934,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) "/*" { current->program += yytext ; } "//" { current->program += yytext ; } [^\n\*]+ { current->program += yytext ; } -.*"*/" { current->program += yytext ; +"*/" { current->program += yytext ; BEGIN( lastContext ) ; } . { current->program += *yytext ; } diff --git a/src/translator_br.h b/src/translator_br.h index 28920ee..8549d64 100644 --- a/src/translator_br.h +++ b/src/translator_br.h @@ -11,11 +11,16 @@ * input used in their production; they are not affected by this license. * * Brazilian Portuguese version by - * Fabio "FJTC" Jun Takada Chino + * Fabio "FJTC" Jun Takada Chino * http://www.icmc.sc.usp.br/~chino - * Version: 1.2.18 (2002/07/30) + * Version: 1.2.19 (2002/10/15) * * History: + * 1.2.19: + * - Updated to Doxygen 1.2.19 + * - Translation Review (Thanks to Jorge Ramos and others) + * - Small fixes in C output. + * - Latex generation support fixed (invalid package name). * 1.2.18 (2002/07/30): * - Updated to Doxygen 1.2.18 * 1.2.17 (2002/07/10): @@ -27,7 +32,7 @@ #ifndef TRANSLATOR_BR_H #define TRANSLATOR_BR_H -class TranslatorBrazilian: public TranslatorAdapter_1_2_18 +class TranslatorBrazilian: public Translator { public: @@ -52,7 +57,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 */ virtual QCString latexLanguageSupportCommand() { - return "Brazilian"; + return ""; } /*! return the language charset. This will be used for the HTML output */ @@ -114,7 +119,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! this is the first part of a sentence that is followed by a class name */ virtual QCString trThisIsTheListOfAllMembers() - { return "Esta é a lista de todos os membros da "; } + { return "Esta é a lista de todos os membros de "; } /*! this is the remainder of the sentence after the class name */ virtual QCString trIncludingInheritedMembers() @@ -140,7 +145,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! put after an undocumented member in the list of all members */ virtual QCString trDefinedIn() - { return "definida em"; } + { return "definido(a) em"; } // quick reference sections @@ -148,7 +153,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 * compounds or files (see the \\group command). */ virtual QCString trModules() - { return "Modulos"; } + { return "Módulos"; } /*! This is put above each page as a link to the class hierarchy */ virtual QCString trClassHierarchy() @@ -159,7 +164,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - return "Estrutura de Dados"; + return "Estruturas de Dados"; } else { @@ -215,14 +220,14 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! This is an introduction to the class hierarchy. */ virtual QCString trClassHierarchyDescription() - { return "Esta lista de hierarquia está parcialmente ordenada em ordem alfabética:"; } + { return "Esta lista de hierarquias está parcialmente ordenada (ordem alfabética):"; } /*! This is an introduction to the list with all files. */ virtual QCString trFileListDescription(bool extractAll) { - QCString result="Aqui está a lista de todos os arquivos "; + QCString result="Esta é a lista de todos os arquivos "; if (!extractAll) result+="documentados "; - result+="com suas respectivas descrições:"; + result+="e suas respectivas descrições:"; return result; } @@ -243,13 +248,47 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! This is an introduction to the page with all class members. */ virtual QCString trCompoundMembersDescription(bool extractAll) { - QCString result="Esta é lista de todos os membros das classes "; - if (!extractAll) result+="documentados "; - result+="com links para "; - if (extractAll) - result+="a documentação de suas respectivas classes:"; + QCString result="Esta é a lista de "; + + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="todas as estruturas e campos de uniões "; + if (!extractAll) + { + result+="documentas"; + } + } + else + { + result+="todos os membros de classes "; + if (!extractAll) + { + result+="documentos"; + } + } + result+=" com referências para "; + if (!extractAll) + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="a documentação da estrutura/união de cada campo:"; + } + else + { + result+="a documentação da classe de cada membro:"; + } + } else - result+="suas respectivas classes:"; + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + result+="a estrutura/união a que pertencem:"; + } + else + { + result+="a classe a que pertencem:"; + } + } return result; } @@ -259,7 +298,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 QCString result="Esta é a lista de "; if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { - result+="tadas as funções, variáveis, definições, enumerações e definições de tipos "; + result+="todas as funções, variáveis, definições, enumerações e definições de tipos "; if (!extractAll) result+="documentadas "; } else @@ -267,9 +306,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 result+="todos os membros dos arquivos "; if (!extractAll) result+="documentados "; } - - - result+="com links para "; + result+="com referências para "; if (extractAll) result+="seus respectivos arquivos:"; else @@ -283,15 +320,15 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! This is an introduction to the page with the list of all examples */ virtual QCString trExamplesDescription() - { return "Esta é a lista de todos os exemplos:"; } + { return "Esta é a lista com todos os exemplos:"; } /*! This is an introduction to the page with the list of related pages */ virtual QCString trRelatedPagesDescription() - { return "Esta é a lista de toda a documentação relacionadas:"; } + { return "Esta é a lista com toda a documentação relacionadas:"; } /*! This is an introduction to the page with the list of class/file groups */ virtual QCString trModulesDescription() - { return "Esta é a lista de todos os médulos:"; } + { return "Esta é a lista com todos os módulos:"; } /*! This sentences is used in the annotated class/file lists if no brief * description is given. @@ -304,7 +341,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! This is used in HTML as the title of index.html. */ virtual QCString trDocumentation() - { return "Documentação"; } + { return "\nDocumentação"; } /*! This is used in LaTeX as the title of the chapter with the * index of all groups. @@ -349,7 +386,16 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 * the documentation of all classes, structs and unions. */ virtual QCString trClassDocumentation() - { return "Classes"; } + { + if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) + { + return "Estruturas"; + } + else + { + return "Classes"; + } + } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all files. @@ -413,7 +459,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 * list of (global) variables */ virtual QCString trEnumerationValues() - { return "Valores Enumerados"; } + { return "Valores enumerados"; } /*! This is used in the documentation of a file before the list of * documentation blocks for defines @@ -509,7 +555,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! this text is generated when the \\bug command is used. */ virtual QCString trBugsAndLimitations() - { return "Bugs e limitações"; } + { return "Problemas e Limitações"; } /*! this text is generated when the \\version command is used. */ virtual QCString trVersion() @@ -550,7 +596,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! used as an introduction to the namespace list */ virtual QCString trNamespaceListDescription(bool extractAll) { - QCString result="Aqui esta a lista de todos os Namespaces "; + QCString result="Esta é a lista de todos os Namespaces "; if (!extractAll) result+="documentados "; result+="com suas respectivas descrições:"; return result; @@ -582,7 +628,6 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 bool isTemplate) { QCString result="Referência da"; - if (isTemplate) result+=" Template de"; switch(compType) { @@ -612,13 +657,12 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 return result; } - /* these are for the member sections of a class, struct or union */ virtual QCString trPublicMembers() { return "Métodos Públicos"; } virtual QCString trPublicSlots() { return "Slots Públicos"; } virtual QCString trSignals() - { return "Signals"; } + { return "Sinais"; } virtual QCString trStaticPublicMembers() { return "Métodos Públicos Estáticos"; } virtual QCString trProtectedMembers() @@ -680,7 +724,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 */ virtual QCString trReimplementedFromList(int numEntries) { - return "Reimplementado de "+trWriteList(numEntries)+"."; + return "Reimplementação de "+trWriteList(numEntries)+"."; } /*! used in member documentation blocks to produce a list of @@ -688,7 +732,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 */ virtual QCString trReimplementedInList(int numEntries) { - return "Reimplementado em "+trWriteList(numEntries)+"."; + return "Reimplementado por "+trWriteList(numEntries)+"."; } /*! This is put above each page as a link to all members of namespaces. */ @@ -698,9 +742,9 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! This is an introduction to the page with all namespace members */ virtual QCString trNamespaceMemberDescription(bool extractAll) { - QCString result="Aqui está a lista de todos os membros do Namespace "; + QCString result="Esta é a lista com todos os membros do Namespace "; if (!extractAll) result+="documentados "; - result+="com links para "; + result+="com referências para "; if (extractAll) result+="a documentação de seus respectivos Namespaces:"; else @@ -711,7 +755,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 * index of all namespaces. */ virtual QCString trNamespaceIndex() - { return "Índice de Namespaces"; } + { return "Namespaces"; } /*! This is used in LaTeX as the title of the chapter containing * the documentation of all namespaces. @@ -851,7 +895,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! Text for the \\invariant command */ virtual QCString trInvariant() { - return "Invariável"; + return "Invariante"; } /*! Text shown before a multi-line variable/enum initialization */ virtual QCString trInitialValue() @@ -877,7 +921,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 } virtual QCString trPageIndex() { - return "Índice de Página"; + return "Índice da Página"; } ////////////////////////////////////////////////////////////////////////// @@ -886,7 +930,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 virtual QCString trNote() { - return "Nota"; + return "Observação"; } virtual QCString trPublicTypes() { @@ -905,7 +949,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 } virtual QCString trStaticPublicAttribs() { - return "Atributos Públicos Estáticos"; + return "Atributos Estáticos Públicos"; } virtual QCString trProtectedTypes() { @@ -917,7 +961,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 } virtual QCString trStaticProtectedAttribs() { - return "Atributos Protegidos Estáticos"; + return "Atributos Estáticos Protegidos"; } virtual QCString trPrivateTypes() { @@ -939,12 +983,12 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! Used as a marker that is put before a todo item */ virtual QCString trTodo() { - return "Tarefas Futuras"; + return "Futuras Atividades"; } /*! Used as the header of the todo list */ virtual QCString trTodoList() { - return "Lista de Tarefas Futuras"; + return "Lista de Futuras Atividades"; } ////////////////////////////////////////////////////////////////////////// @@ -965,8 +1009,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 } virtual QCString trInclByDepGraph() { - return "Este grafo mostra quais arquivos estão direta ou indiretamente " - "relacionados com este arquivo:"; + return "Este grafo mostra quais arquivos estão direta ou indiretamente relacionados com este arquivo:"; } virtual QCString trSince() { @@ -1120,7 +1163,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! The description of the package index page */ virtual QCString trPackageListDescription() { - return "Aqui está a lista de pacotes com suas respectivas descrições (se disponíveis):"; + return "Esta é a lista com os pacotes e suas respectivas descrições (se disponíveis):"; } /*! The link name in the Quick links header for each page */ virtual QCString trPackages() @@ -1145,12 +1188,12 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 /*! Used as a marker that is put before a \\bug item */ virtual QCString trBug() { - return "Bug"; + return "Problema"; } /*! Used as the header of the bug list */ virtual QCString trBugList() { - return "Lista de Bug"; + return "Lista de Problemas"; } ////////////////////////////////////////////////////////////////////////// @@ -1335,7 +1378,7 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 */ virtual QCString trImplementedInList(int numEntries) { - return "Implementado em "+trWriteList(numEntries)+"."; + return "Implementado por "+trWriteList(numEntries)+"."; } ////////////////////////////////////////////////////////////////////////// @@ -1362,5 +1405,22 @@ class TranslatorBrazilian: public TranslatorAdapter_1_2_18 return "Lista de Descontinuados(as)"; } +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Eventos"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Eventos"; + } + }; #endif diff --git a/src/translator_ca.h b/src/translator_ca.h index e00aec9..e232cde 100644 --- a/src/translator_ca.h +++ b/src/translator_ca.h @@ -278,7 +278,7 @@ class TranslatorCatalan : public TranslatorAdapter_1_2_17 result+="documentats "; } result+=" amb enllaços a "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_cz.h b/src/translator_cz.h index ea59973..4e241a3 100644 --- a/src/translator_cz.h +++ b/src/translator_cz.h @@ -144,6 +144,9 @@ // 2002/07/29 // - The new trDeprecatedList() implemented. // +// 2002/10/15 +// - The new trEvents() and trEventDocumentation() implemented. +// // Todo // ---- // - The trReimplementedFromList() should pass the kind of the @@ -163,7 +166,7 @@ // probably slightly faster. -class TranslatorCzech : public TranslatorAdapter_1_2_18 +class TranslatorCzech : public Translator { private: /*! The decode() inline assumes the source written in the @@ -1534,6 +1537,24 @@ class TranslatorCzech : public TranslatorAdapter_1_2_18 { return decode("Seznam zastaralých prvkù"); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return "Události"; + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return "Dokumentace událostí"; + } + }; #endif // TRANSLATOR_CZ_H diff --git a/src/translator_de.h b/src/translator_de.h index 41f2d45..9a94ae4 100644 --- a/src/translator_de.h +++ b/src/translator_de.h @@ -272,7 +272,7 @@ class TranslatorGerman : public TranslatorAdapter_1_2_17 result+="Strukturen und Varianten mit Verweisen auf "; else result+="Klassenelemente mit Verweisen auf "; - if (extractAll) { + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) result+="die Dokumentation zu jedem Element:"; else diff --git a/src/translator_dk.h b/src/translator_dk.h index 55ee6bd..2810157 100644 --- a/src/translator_dk.h +++ b/src/translator_dk.h @@ -265,7 +265,7 @@ class TranslatorDanish : public TranslatorAdapter_1_2_7 result+="klassemedlemmer"; } result+=" med links til "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_en.h b/src/translator_en.h index d89509a..b045524 100644 --- a/src/translator_en.h +++ b/src/translator_en.h @@ -278,7 +278,7 @@ class TranslatorEnglish : public Translator result+="class members"; } result+=" with links to "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_es.h b/src/translator_es.h index 73db6b7..f5b5d72 100644 --- a/src/translator_es.h +++ b/src/translator_es.h @@ -206,7 +206,7 @@ class TranslatorSpanish : public TranslatorAdapter_1_2_7 QCString result="Lista de"; if (!extractAll) result+=" toda la documentación de"; result+=" los miembros de la clase con enlaces a "; - if (extractAll) + if (!extractAll) result+=" la documentación de cada clase:"; else result+=" la clase de la que forman parte:"; diff --git a/src/translator_fi.h b/src/translator_fi.h index 635589b..98a63b2 100644 --- a/src/translator_fi.h +++ b/src/translator_fi.h @@ -241,7 +241,7 @@ class TranslatorFinnish : public TranslatorEnglish QCString result="Täällä on lista kaikista "; // "Here is a list of all " if (!extractAll) result+="dokumentoiduista "; // "documented " result+="luokan jäsenistä linkitettynä "; // "class members with links to " - if (extractAll) + if (!extractAll) result+="jokaisen jäsenen luokkadokumentaatioon:"; // "the class documentation for each member:" else result+="luokkaan johon ne kuuluvat:"; // "the classes they belong to:" diff --git a/src/translator_fr.h b/src/translator_fr.h index a30fcd8..79645eb 100644 --- a/src/translator_fr.h +++ b/src/translator_fr.h @@ -213,7 +213,7 @@ class TranslatorFrench : public TranslatorAdapter_1_2_17 QCString result="Liste de tous les membres de classe "; if (!extractAll) result+="documentés "; result+="avec les liens vers "; - if (extractAll) result+="la documentation de la classe correspondante :"; + if (!extractAll) result+="la documentation de la classe correspondante :"; else result+="les classes auxquelles ils appartiennent :"; return result; } diff --git a/src/translator_gr.h b/src/translator_gr.h index 35988b3..0e701d6 100644 --- a/src/translator_gr.h +++ b/src/translator_gr.h @@ -251,7 +251,7 @@ class TranslatorGreek : public TranslatorAdapter_1_2_11 result+="êëÜóåùí"; } result+=" ìå óõíäÝóìïõò "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_hr.h b/src/translator_hr.h index c8e511c..c3b847d 100644 --- a/src/translator_hr.h +++ b/src/translator_hr.h @@ -172,7 +172,7 @@ class TranslatorCroatian : public TranslatorAdapter_1_2_18 else result+="èlanova struktura s linkovima na "; - if (extractAll) + if (!extractAll) { result+="dokumentaciju svakog èlana:"; } diff --git a/src/translator_hu.h b/src/translator_hu.h index 7f1ea5c..2a0797c 100644 --- a/src/translator_hu.h +++ b/src/translator_hu.h @@ -195,7 +195,7 @@ class TranslatorHungarian : public TranslatorAdapter_1_2_1 QCString result="Ez az összes "; if (!extractAll) result+="dokumentált "; result+="osztály összetevõ listája "; - if (extractAll) + if (!extractAll) result+="hivatkozással a hozzájuk tartózó osztály dokumentációra:"; else result+="az õket tartalmazó osztály megjelölésével:"; diff --git a/src/translator_nl.h b/src/translator_nl.h index 14f0edb..f07e089 100644 --- a/src/translator_nl.h +++ b/src/translator_nl.h @@ -123,7 +123,7 @@ class TranslatorDutch : public Translator QCString result="Hieronder volgt de lijst met alle "; if (!extractAll) result+="gedocumenteerde "; result+="klasse members met links naar "; - if (extractAll) result+="de klasse documentatie voor elke member:"; + if (!extractAll) result+="de klasse documentatie voor elke member:"; else result+="de klassen waartoe ze behoren:"; return result; } diff --git a/src/translator_no.h b/src/translator_no.h index 65a829c..e582072 100644 --- a/src/translator_no.h +++ b/src/translator_no.h @@ -144,7 +144,7 @@ class TranslatorNorwegian : public TranslatorAdapter_1_2_2 QCString result="Her følger en liste over alle "; if (!extractAll) result+="dokumenterte "; result+="klassemedlemmer med lenker til "; - if (extractAll) result+="klassedokumentasjonen for hvert medlem:"; + if (!extractAll) result+="klassedokumentasjonen for hvert medlem:"; else result+="klassene som de tilhører:"; return result; } diff --git a/src/translator_pl.h b/src/translator_pl.h index 7d16654..3754594 100644 --- a/src/translator_pl.h +++ b/src/translator_pl.h @@ -259,7 +259,7 @@ class TranslatorPolish : public TranslatorAdapter_1_2_17 result+="sk³adowych"; } result+=" wraz z odno¶nikami do "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_pt.h b/src/translator_pt.h index affe19e..eb05d0c 100644 --- a/src/translator_pt.h +++ b/src/translator_pt.h @@ -269,7 +269,7 @@ class TranslatorPortuguese : public TranslatorAdapter_1_2_18 result+=" documentadas"; } result+=" com links para "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_ro.h b/src/translator_ro.h index cc7183c..07c2bd9 100644 --- a/src/translator_ro.h +++ b/src/translator_ro.h @@ -287,7 +287,7 @@ class TranslatorRomanian: public TranslatorAdapter_1_2_16 result+="din toate clasele "; } result+=", cu legãturi cãtre "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_ru.h b/src/translator_ru.h index 87ac3e6..7083e37 100644 --- a/src/translator_ru.h +++ b/src/translator_ru.h @@ -20,8 +20,6 @@ * Andrey V. Stolyarov released Feb 14, 2001 * Alexandr V. Chelpanov released Apr 21, 2001 * - * äÏÓÔÕÐÎÙ ÔÁË ÖÅ ÐÅÒÅ×ÏÄ ÐÒÉÍÅÒÏ× ÎÁ ÒÕÓÓËÉÊ ÑÚÙË ÐÏ email (ÓÍ. ×ÙÛÅ) - * * ðÒÉ ÐÅÒÅ×ÏÄÅ ÚÁÇÏÌÏ×ËÏ× ÓÌÏ×Á list É documentation ÕÂÒÁÎÙ. * * Modules ÐÅÒÅ×ÅÄÅÎÏ ËÁË ÇÒÕÐÐÙ, ÔÁË ËÁË ÍÏÄÕÌÉ ÞÁÝÅ ×ÓÅÇÏ × ÒÕÓÓËÏÍ @@ -50,7 +48,7 @@ #ifndef TRANSLATOR_RU_H #define TRANSLATOR_RU_H -class TranslatorRussian : public TranslatorAdapter_1_2_18 +class TranslatorRussian : public Translator { private: /*! The Decode() inline assumes the source written in the @@ -277,7 +275,7 @@ class TranslatorRussian : public TranslatorAdapter_1_2_18 result+="ÞÌÅÎÏ× ÓÔÒÕËÔÕÒ ÄÁÎÎÙÈ ÓÏ ÓÓÙÌËÁÍÉ ÎÁ "; else result+="ÞÌÅÎÏ× ËÌÁÓÓÏ× ÓÏ ÓÓÙÌËÁÍÉ ÎÁ "; - if(extractAll) + if(!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) result+="ÄÏËÕÍÅÎÔÁÃÉÀ ÐÏ ÓÔÒÕËÔÕÒÅ ÄÌÑ ËÁÖÄÏÇÏ ÞÌÅÎÁ."; @@ -1417,6 +1415,23 @@ class TranslatorRussian : public TranslatorAdapter_1_2_18 { return decode( "óÐÉÓÏË ÕÓÔÁÒÅ×ÛÉÈ ÏÐÒÅÄÅÌÅÎÉÊ É ÏÐÉÓÁÎÉÊ" ); } + +////////////////////////////////////////////////////////////////////////// +// new since 1.2.18 +////////////////////////////////////////////////////////////////////////// + + /*! Used as a header for declaration section of the events found in + * a C# program + */ + virtual QCString trEvents() + { + return decode( "óÏÂÙÔÉÑ" ); + } + /*! Header used for the documentation section of a class' events. */ + virtual QCString trEventDocumentation() + { + return decode( "CÏÂÙÔÉÑ" ); + } }; #endif diff --git a/src/translator_se.h b/src/translator_se.h index e69cdd9..5fba0d0 100644 --- a/src/translator_se.h +++ b/src/translator_se.h @@ -191,7 +191,7 @@ class TranslatorSwedish : public TranslatorEnglish QCString result="Här följer en lista över alla "; if (!extractAll) result+="dokumenterade "; result+="klassmedlemmar med länkar till "; - if (extractAll) result+="klassdokumentationen för varje medlem:"; + if (!extractAll) result+="klassdokumentationen för varje medlem:"; else result+="klasserna som de tillhör:"; return result; } diff --git a/src/translator_sk.h b/src/translator_sk.h index 1d70245..dfcb2db 100644 --- a/src/translator_sk.h +++ b/src/translator_sk.h @@ -263,7 +263,7 @@ class TranslatorSlovak : public TranslatorAdapter_1_2_18 result += "s odkazmi na "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_sr.h b/src/translator_sr.h index 17c0757..3047274 100644 --- a/src/translator_sr.h +++ b/src/translator_sr.h @@ -272,7 +272,7 @@ private: result+="èlanova klasa"; } result+=" sa linkovima na "; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/translator_tw.h b/src/translator_tw.h index f8b218f..57b9757 100644 --- a/src/translator_tw.h +++ b/src/translator_tw.h @@ -277,7 +277,7 @@ class TranslatorChinesetraditional : public TranslatorAdapter_1_2_16 result+="Ãþ§O¦¨­û"; } result+=", ¨Ã¥B±a¦³³sµ²¦Ü"; - if (extractAll) + if (!extractAll) { if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C")) { diff --git a/src/util.cpp b/src/util.cpp index 3d54f20..a265a15 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -895,7 +895,6 @@ void writeExample(OutputList &ol,ExampleSDict *ed) } - QCString argListToString(ArgumentList *al) { QCString result; diff --git a/src/xmldocvisitor.cpp b/src/xmldocvisitor.cpp index e6cbd64..ca021c6 100644 --- a/src/xmldocvisitor.cpp +++ b/src/xmldocvisitor.cpp @@ -152,9 +152,9 @@ void XmlDocVisitor::visit(DocVerbatim *s) m_t << ""; break; case DocVerbatim::Verbatim: - m_t << ""; + m_t << ""; filter(s->text()); - m_t << ""; + m_t << ""; break; case DocVerbatim::HtmlOnly: m_t << ""; @@ -193,9 +193,9 @@ void XmlDocVisitor::visit(DocInclude *inc) m_t << ""; break; case DocInclude::VerbInclude: - m_t << ""; + m_t << ""; filter(inc->text()); - m_t << ""; + m_t << ""; break; } } @@ -693,12 +693,14 @@ void XmlDocVisitor::visitPost(DocInternalRef *) m_t << " "; } -void XmlDocVisitor::visitPre(DocCopy *) +void XmlDocVisitor::visitPre(DocCopy *c) { + m_t << "link() << "\">"; } void XmlDocVisitor::visitPost(DocCopy *) { + m_t << "" << endl; } void XmlDocVisitor::visitPre(DocText *) diff --git a/src/xmlgen.cpp b/src/xmlgen.cpp index cac773f..80054c8 100644 --- a/src/xmlgen.cpp +++ b/src/xmlgen.cpp @@ -41,42 +41,11 @@ // no debug info #define XML_DB(x) do {} while(0) - // debug to stdout //#define XML_DB(x) printf x - // debug inside output //#define XML_DB(x) QCString __t;__t.sprintf x;m_t << __t -// static QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t) -// { -// switch (t) -// { -// case BaseOutputDocInterface::See: return "see"; -// case BaseOutputDocInterface::Return: return "return"; -// case BaseOutputDocInterface::Author: return "author"; -// case BaseOutputDocInterface::Version: return "version"; -// case BaseOutputDocInterface::Since: return "since"; -// case BaseOutputDocInterface::Date: return "date"; -// case BaseOutputDocInterface::Bug: return "bug"; -// case BaseOutputDocInterface::Note: return "note"; -// case BaseOutputDocInterface::Warning: return "warning"; -// case BaseOutputDocInterface::Par: return "par"; -// case BaseOutputDocInterface::Deprecated: return "deprecated"; -// case BaseOutputDocInterface::Pre: return "pre"; -// case BaseOutputDocInterface::Post: return "post"; -// case BaseOutputDocInterface::Invar: return "invariant"; -// case BaseOutputDocInterface::Remark: return "remark"; -// case BaseOutputDocInterface::Attention: return "attention"; -// case BaseOutputDocInterface::Todo: return "todo"; -// case BaseOutputDocInterface::Test: return "test"; -// case BaseOutputDocInterface::RCS: return "rcs"; -// case BaseOutputDocInterface::EnumValues: return "enumvalues"; -// case BaseOutputDocInterface::Examples: return "examples"; -// } -// return "illegal"; -// } - inline void writeXMLString(QTextStream &t,const char *s) { @@ -325,820 +294,6 @@ class XMLCodeGenerator : public BaseCodeDocInterface bool m_insideSpecialHL; }; -// /*! This class is used by the documentation parser. -// * Its methods are called when some XML text or markup -// * needs to be written. -// */ -// class XMLGenerator : public OutputDocInterface -// { -// public: -// -// // helper functions -// -// void startParMode() -// { -// if (!m_inParStack.isEmpty() && !m_inParStack.top()) -// { -// m_inParStack.top() = TRUE; -// m_t << ""; -// XML_DB(("start par at level=%d\n",m_inParStack.count())); -// } -// else if (m_inParStack.isEmpty()) -// { -// m_inParStack.push(TRUE); -// m_t << ""; -// XML_DB(("start par at level=%d\n",m_inParStack.count())); -// } -// } -// void endParMode() -// { -// if (!m_inParStack.isEmpty() && m_inParStack.top()) -// { -// m_inParStack.top() = FALSE; -// m_t << "" << endl; -// XML_DB(("end par at level=%d\n",m_inParStack.count())); -// } -// } -// void startNestedPar() -// { -// m_inParStack.push(FALSE); -// XML_DB(("enter par level=%d\n",m_inParStack.count())); -// } -// void endNestedPar() -// { -// XML_DB(("leave par level=%d\n",m_inParStack.count())); -// if (m_inParStack.pop()) -// { -// m_t << "" << endl; -// } -// else -// { -// //XML_DB(("ILLEGAL par level!\n")); -// } -// } -// -// // Standard generator functions to be implemented by all generators -// -// void docify(const char *s) -// { -// if (m_outputEnabled) -// { -// XML_DB(("(docify \"%s\")\n",s)); -// startParMode(); -// writeXMLString(m_t,s); -// } -// } -// void writeChar(char c) -// { -// char s[2];s[0]=c;s[1]=0; -// docify(s); -// } -// void writeString(const char *text) -// { -// //m_t << text; -// docify(text); -// } -// void startItemList() -// { -// XML_DB(("(startItemList)\n")); -// startParMode(); -// m_t << "" << endl;; -// m_inListStack.push(TRUE); -// } -// void startEnumList() -// { -// XML_DB(("(startEnumList)\n")); -// startParMode(); -// m_t << ""; -// m_inListStack.push(TRUE); -// } -// void writeListItem() -// { -// XML_DB(("(writeListItem)\n")); -// if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element -// { -// m_inListStack.top()=FALSE; -// } -// else // not first element, end previous element first -// { -// endParMode(); -// endNestedPar(); -// m_t << "" << endl; -// } -// m_t << ""; -// startNestedPar(); -// } -// void endItemList() -// { -// XML_DB(("(endItemList)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endParMode(); -// endNestedPar(); -// m_t << "" << endl; -// } -// m_t << "" << endl; -// } -// void endEnumList() -// { -// XML_DB(("(endEnumList)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endParMode(); -// m_t << "" << endl; -// endNestedPar(); -// } -// m_t << "" << endl; -// } -// void newParagraph() -// { -// XML_DB(("(newParagraph)\n")); -// endParMode(); -// startParMode(); -// } -// void startBold() -// { -// XML_DB(("(startBold)\n")); -// startParMode(); -// m_t << ""; // non DocBook -// } -// void endBold() -// { -// XML_DB(("(endBold)\n")); -// m_t << ""; // non DocBook -// } -// void startTypewriter() -// { -// XML_DB(("(startTypewriter)\n")); -// startParMode(); -// m_t << ""; -// } -// void endTypewriter() -// { -// XML_DB(("(endTypewriter)\n")); -// m_t << ""; -// } -// void startEmphasis() -// { -// XML_DB(("(startEmphasis)\n")); -// startParMode(); -// m_t << ""; -// } -// void endEmphasis() -// { -// XML_DB(("(endEmphasis)\n")); -// m_t << ""; -// } -// void startCodeFragment() -// { -// XML_DB(("(startCodeFragment)\n")); -// startParMode(); -// m_t << ""; -// } -// void endCodeFragment() -// { -// XML_DB(("(endCodeFragment)\n")); -// m_t << ""; -// } -// void startPreFragment() -// { -// XML_DB(("(startPreFragment)\n")); -// startParMode(); -// m_t << ""; -// } -// void endPreFragment() -// { -// XML_DB(("(endPreFragment)\n")); -// m_t << ""; -// } -// void startVerbatimFragment() -// { -// XML_DB(("(startVerbatimFragment)\n")); -// startParMode(); -// m_t << ""; -// } -// void endVerbatimFragment() -// { -// XML_DB(("(endVerbatimFragment)\n")); -// m_t << ""; -// } -// void writeRuler() -// { -// XML_DB(("(startParMode)\n")); -// startParMode(); -// m_t << ""; -// } -// void startDescription() -// { -// XML_DB(("(startDescription)\n")); -// startParMode(); -// m_t << ""; -// m_inListStack.push(TRUE); -// } -// void endDescription() -// { -// XML_DB(("(endDescription)\n")); -// if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element -// { -// endNestedPar(); -// m_t << "" << endl; -// } -// m_t << ""; -// if (!m_inListStack.isEmpty()) m_inListStack.pop(); -// } -// void startDescItem() -// { -// XML_DB(("(startDescItem)\n")); -// if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element -// { -// m_inListStack.top()=FALSE; -// } -// else // not first element, end previous element first -// { -// endNestedPar(); -// m_t << ""; -// } -// m_t << ""; -// } -// void endDescItem() -// { -// XML_DB(("(endDescItem)\n")); -// m_t << ""; -// startNestedPar(); -// } -// void startDescList(SectionTypes st) -// { -// XML_DB(("(startDescList)\n")); -// endParMode(); -// m_t << ""; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endDescList() -// { -// XML_DB(("(endDescList)\n")); -// endNestedPar(); -// m_t << "</simplesect>"; -// } -// void startSimpleSect(SectionTypes st,const char *,const char *,const char *) -// { -// XML_DB(("(startSimpleSect)\n")); -// m_t << "<simplesect kind=\"" << sectionTypeToString(st) << "\">"; -// startNestedPar(); -// } -// void endSimpleSect() -// { -// XML_DB(("(endSimpleSect)\n")); -// endNestedPar(); -// m_t << "</simplesect>"; -// } -// void startParamList(ParamListTypes t,const char *) -// { -// XML_DB(("(startParamList)\n")); -// startParMode(); -// QCString kind; -// switch(t) -// { -// case Param: kind="param"; break; -// case RetVal: kind="retval"; break; -// case Exception: kind="exception"; break; -// } -// m_t << "<parameterlist kind=\"" << kind << "\">"; // non DocBook -// startNestedPar(); -// m_inParStack.top() = TRUE; -// m_inParamList = TRUE; -// } -// void endParamList() -// { -// XML_DB(("(endParamList)\n")); -// m_inParamList = FALSE; -// m_t << "</parameterlist>"; -// } -// void endDescTitle() -// { -// m_inParStack.top() = FALSE; -// endNestedPar(); -// XML_DB(("(endDescTitle)\n")); -// m_t << ""; -// if (!m_inParamList) startNestedPar(); -// } -// void writeDescItem() -// { -// XML_DB(("(writeDescItem)\n")); -// } -// void startDescTable() -// { -// XML_DB(("(startDescTable)\n")); -// } -// void endDescTable() -// { -// XML_DB(("(endDescTable)\n")); -// } -// void startDescTableTitle() -// { -// XML_DB(("(startDescTableTitle)\n")); -// m_t << ""; // non docbook -// } -// void endDescTableTitle() -// { -// XML_DB(("(endDescTableTitle)\n")); -// m_t << ""; // non docbook -// } -// void startDescTableData() -// { -// XML_DB(("(startDescTableData)\n")); -// m_t << ""; // non docbook -// startNestedPar(); -// } -// void endDescTableData() -// { -// XML_DB(("(endDescTableData)\n")); -// endNestedPar(); -// m_t << ""; // non docbook -// } -// void lineBreak() -// { -// XML_DB(("(lineBreak)\n")); -// startParMode(); -// m_t << ""; // non docbook -// } -// void writeNonBreakableSpace(int num) -// { -// XML_DB(("(writeNonBreakableSpace)\n")); -// int i;for (i=0;i"; -// } -// void endHtmlLink() -// { -// XML_DB(("(endHtmlLink)\n")); -// m_t << ""; -// } -// void writeMailLink(const char *url) -// { -// XML_DB(("(writeMailLink)\n")); -// startParMode(); -// m_t << ""; -// docify(url); -// m_t << ""; -// } -// void startSection(const char *id,const char *,SectionInfo::SectionType type) -// { -// XML_DB(("(startSection)\n")); -// endParMode(); -// m_t << ""; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSection(const char *,SectionInfo::SectionType type) -// { -// XML_DB(("(endSection)\n")); -// m_t << ""; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startSubsection() -// { -// XML_DB(("(startSubsection)\n")); -// endParMode(); -// m_t << ""; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSubsection() -// { -// XML_DB(("(endSubsection)\n")); -// m_t << ""; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startSubsubsection() -// { -// XML_DB(("(startSubsubsection)\n")); -// endParMode(); -// m_t << ""; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endSubsubsection() -// { -// XML_DB(("(endSubsubsection)\n")); -// m_t << ""; -// m_inParStack.top() = FALSE; -// endNestedPar(); -// } -// void startCenter() -// { -// XML_DB(("(startCenter)\n")); -// startParMode(); -// m_t << "
"; // non docbook -// } -// void endCenter() -// { -// XML_DB(("(endCenter)\n")); -// m_t << "
"; // non docbook -// } -// void startSmall() -// { -// XML_DB(("(startSmall)\n")); -// startParMode(); -// m_t << ""; // non docbook -// } -// void endSmall() -// { -// XML_DB(("(endSmall)\n")); -// m_t << ""; // non docbook -// } -// void startSubscript() -// { -// XML_DB(("(startSubscript)\n")); -// startParMode(); -// m_t << ""; -// } -// void endSubscript() -// { -// XML_DB(("(endSubscript)\n")); -// m_t << ""; -// } -// void startSuperscript() -// { -// XML_DB(("(startSuperscript)\n")); -// startParMode(); -// m_t << ""; -// } -// void endSuperscript() -// { -// XML_DB(("(endSuperscript)\n")); -// m_t << ""; -// } -// void startTable(bool,int cols) -// { -// XML_DB(("startTable\n")); -// startParMode(); -// m_t << "
" << endl; } void endDescTableData() { t << "
\n"; -// } -// void endTable(bool hasCaption) -// { -// XML_DB(("endTable\n")); -// if (!hasCaption) m_t << "\n"; -// m_t << "
"; -// } -// void startCaption() -// { -// XML_DB(("startCaption")); -// m_t << ""; -// } -// void endCaption() -// { -// XML_DB(("encCaption")); -// m_t << ""; -// } -// void nextTableRow() -// { -// XML_DB(("(nextTableRow)\n")); -// m_t << ""; -// -// // we need manually add a para here because cells are -// // parsed before the table is generated, and thus -// // are already parsed as if they are inside a paragraph. -// m_t << ""; -// } -// void endTableRow() -// { -// XML_DB(("(endTableRow)\n")); -// m_t << "" << endl; -// } -// void nextTableColumn() -// { -// XML_DB(("(nextTableColumn)\n")); -// m_t << ""; -// -// // we need manually add a para here because cells are -// // parsed before the table is generated, and thus -// // are already parsed as if they are inside a paragraph. -// m_t << ""; -// } -// void endTableColumn() -// { -// XML_DB(("(endTableColumn)\n")); -// // we need manually add a para here because cells are -// // parsed before the table is generated, and thus -// // are already parsed as if they are inside a paragraph. -// m_t << ""; -// m_t << ""; -// } -// -// void writeQuote() { m_t << "\""; } -// void writeCopyright() { m_t << "©"; } -// void writeUmlaut(char c) { m_t << "&" << c << "uml;"; } -// void writeAcute(char c) { m_t << "&" << c << "acute;"; } -// void writeGrave(char c) { m_t << "&" << c << "grave;"; } -// void writeCirc(char c) { m_t << "&" << c << "circ;"; } -// void writeTilde(char c) { m_t << "&" << c << "tilde;"; } -// void writeRing(char c) { m_t << "&" << c << "ring;"; } -// void writeSharpS() { m_t << "ß"; } -// void writeCCedil(char c) { m_t << "&" << c << "cedil;"; } -// -// void startTitle() -// { -// XML_DB(("(startTitle)\n")); -// m_t << ""; -// startNestedPar(); -// m_inParStack.top() = TRUE; -// } -// void endTitle() -// { -// m_inParStack.top() = FALSE; -// endNestedPar(); -// XML_DB(("(endTitle)\n")); -// m_t << "" << endl; -// } -// void writeAnchor(const char *id,const char *name) -// { -// XML_DB(("(writeAnchor)\n")); -// startParMode(); -// m_t << ""; -// } -// void writeSectionRef(const char *,const char *id, -// const char *name,const char *text) -// { -// XML_DB(("(writeSectionRef)\n")); -// startParMode(); -// m_t << ""; -// docify(text); -// m_t << ""; -// } -// void writeSectionRefItem(const char *,const char *,const char *) -// { -// m_t << "(writeSectionRefItem)"; -// } -// void addIndexItem(const char *primaryie,const char *secondaryie) -// { -// XML_DB(("(addIndexItem)\n")); -// startParMode(); -// m_t << ""; -// docify(primaryie); -// m_t << ""; -// docify(secondaryie); -// m_t << ""; -// } -// void writeFormula(const char *id,const char *text) -// { -// XML_DB(("(writeFormula)\n")); -// startParMode(); -// m_t << ""; // non Docbook -// docify(text); -// m_t << ""; -// } -// void startImage(const char *name,const char *size,bool /*caption*/) -// { -// XML_DB(("(startImage)\n")); -// startParMode(); -// m_t << ""; // non docbook -// } -// void endImage(bool) -// { -// XML_DB(("(endImage)\n")); -// m_t << ""; -// } -// void startDotFile(const char *name,bool /*caption*/) -// { -// XML_DB(("(startDotFile)\n")); -// startParMode(); -// m_t << ""; // non docbook -// } -// void endDotFile(bool) -// { -// XML_DB(("(endDotFile)\n")); -// m_t << ""; -// } -// void startTextLink(const char *name,const char *anchor) -// { -// XML_DB(("(startTextLink)\n")); -// startParMode(); -// m_t << ""; -// } -// void endTextLink() -// { -// XML_DB(("(endTextLink)\n")); -// m_t << ""; -// } -// void startPageRef() -// { -// XML_DB(("(startPageRef)\n")); -// m_outputEnabled = FALSE; -// } -// void endPageRef(const char *,const char *) -// { -// XML_DB(("(endPageRef)\n")); -// m_outputEnabled = TRUE; -// } -// void writeLineNumber(const char *extRef,const char *compId, -// const char *anchorId,int l) -// { -// XML_DB(("(writeLineNumber)\n")); -// m_t << ""; -// } -// void startCodeLine() -// { -// XML_DB(("(startCodeLine)\n")); -// startParMode(); -// m_t << ""; // non DocBook -// } -// void endCodeLine() -// { -// XML_DB(("(endCodeLine)\n")); -// m_t << "" << endl; // non DocBook -// } -// void startCodeAnchor(const char *id) -// { -// XML_DB(("(startCodeAnchor)\n")); -// startParMode(); -// m_t << ""; -// } -// void endCodeAnchor() -// { -// XML_DB(("(endCodeAnchor)\n")); -// m_t << ""; -// } -// void startFontClass(const char *colorClass) -// { -// XML_DB(("(startFontClass)\n")); -// m_t << ""; // non DocBook -// } -// void endFontClass() -// { -// XML_DB(("(endFontClass)\n")); -// m_t << ""; // non DocBook -// } -// void codify(const char *text) -// { -// XML_DB(("(codify \"%s\")\n",text)); -// docify(text); -// } -// void startHtmlOnly() -// { -// XML_DB(("(startHtmlOnly)\n")); -// m_t << "" << endl; -// } -// void endHtmlOnly() -// { -// XML_DB(("(endHtmlOnly)\n")); -// m_t << "" << endl; -// } -// void startLatexOnly() -// { -// XML_DB(("(startLatexOnly)\n")); -// m_t << "" << endl; -// } -// void endLatexOnly() -// { -// XML_DB(("(endLatexOnly)\n")); -// m_t << "" << endl; -// } -// void startSectionRefList() -// { -// XML_DB(("(startSectionRefList)\n")); -// } -// void endSectionRefList() -// { -// XML_DB(("(endSectionRefList)\n")); -// } -// void writeCodeAnchor(const char *) -// { -// XML_DB(("(writeCodeAnchor)\n")); -// } -// -// // Generator specific functions -// -// /*! Create a clone of this generator. Uses the copy constructor */ -// OutputDocInterface *clone() -// { -// return new XMLGenerator(this); -// } -// /*! Append the output written to generator \a g to this generator */ -// void append(const OutputDocInterface *g) -// { -// const XMLGenerator *xg = (const XMLGenerator *)g; -// -// //printf("Appending \n>>>>\n`%s'\n<<<<\n and \n>>>>\n`%s'\n<<<<\n",getContents().data(),xg->getContents().data()); -// m_t << xg->getContents(); -// m_inParStack = xg->m_inParStack; -// m_inListStack = xg->m_inListStack; -// m_inParamList = xg->m_inParamList; -// } -// /*! constructor. -// */ -// XMLGenerator() -// { -// m_b.setBuffer(m_a); -// m_b.open( IO_WriteOnly ); -// m_t.setDevice(&m_b); -// m_t.setEncoding(QTextStream::Latin1); -// m_inParamList = FALSE; -// m_outputEnabled = TRUE; -// } -// /*! copy constructor */ -// XMLGenerator(const XMLGenerator *xg) -// { -// m_b.setBuffer(m_a); -// m_b.open( IO_WriteOnly ); -// m_t.setDevice(&m_b); -// m_t.setEncoding(QTextStream::Latin1); -// -// //printf("Cloning >>%s<< m_parStack.count()=%d\n", -// // xg->getContents().data(),xg->m_inParStack.count()); -// -// // copy state variables -// m_inParStack = xg->m_inParStack; -// m_inListStack = xg->m_inListStack; -// m_inParamList = xg->m_inParamList; -// m_outputEnabled = xg->m_outputEnabled; -// } -// /*! destructor */ -// virtual ~XMLGenerator() -// { -// } -// /*! Returns the output written to this generator as a string */ -// QCString getContents() const -// { -// QCString s; -// s.resize(m_a.size()+1); -// memcpy(s.data(),m_a.data(),m_a.size()); -// s.at(m_a.size())='\0'; -// return s; -// } -// -// private: -// // only one destination stream, so these do not have to be implemented -// void pushGeneratorState() {} -// void popGeneratorState() {} -// void disableAllBut(OutputGenerator::OutputType) {} -// void enableAll() {} -// void disableAll() {} -// void disable(OutputGenerator::OutputType) {} -// void enable(OutputGenerator::OutputType) {} -// bool isEnabled(OutputGenerator::OutputType) { return TRUE; } -// -// QTextStream m_t; -// QByteArray m_a; -// QBuffer m_b; -// -// ValStack m_inParStack; -// ValStack m_inListStack; -// bool m_inParamList; -// bool m_outputEnabled; -// -// friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd); -// }; static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char *name,int indent) { @@ -1212,20 +367,6 @@ static void writeXMLDocBlock(QTextStream &t, delete xmlCodeGen; delete root; -/* - XMLGenerator *xmlGen = new XMLGenerator; - //xmlGen->startParMode(); - parseDoc(*xmlGen, - fileName, // input definition file - lineNr, // input definition line - scope, // scope (which should not be linked to) - md, // member (which should not be linked to) - stext+"\n" // actual text - ); - xmlGen->endParMode(); - t << xmlGen->getContents(); - delete xmlGen; -*/ } void writeXMLCodeBlock(QTextStream &t,FileDef *fd) @@ -1264,30 +405,6 @@ static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,c } t << ">" << convertToXML(name) << "" << endl; -#if 0 - Definition *d = rmd->getOuterScope(); - if (d==Doxygen::globalScope) d=rmd->getBodyDef(); - if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef()) - // link to definition in code - { - t << " <" << tagName << " id=\""; - t << rmd->getBodyDef()->getOutputFileBase() - << "_1" // encoded `:' character (see util.cpp:convertNameToFile) - << rmd->anchor() - << "\">" << convertToXML(name) << "" << endl; - } - else if (rmd->isLinkable() && d && d->isLinkable()) - // link to declaration in documentation (in absense of a definition) - { - t << " <" << tagName << " id=\""; - t << d->getOutputFileBase() - << "_1" // encoded `:' character (see util.cpp:convertNameToFile) - << rmd->anchor() - << "\">" << convertToXML(name) - << "" << endl; - } -#endif } static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,Definition *def) @@ -2177,8 +1294,7 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &ti) QTextStream t(&f); writeXMLHeader(t); - t << " name; else t << pi->name.lower(); + t << " " << endl; t << " " << convertToXML(pi->name) << "" << endl; SectionInfo *si = Doxygen::sectionDict.find(pi->name); -- cgit v0.12