From de20cde3d47c58a69c25afe75e4c476d61dbe631 Mon Sep 17 00:00:00 2001 From: dimitri Date: Mon, 1 Apr 2002 15:21:13 +0000 Subject: Release-1.2.15 --- INSTALL | 4 +- README | 4 +- VERSION | 2 +- addon/doxmlparser/include/doxmlintf.h | 136 +++++++++++---- addon/doxmlparser/src/basehandler.h | 4 +- addon/doxmlparser/src/baseiterator.h | 15 ++ addon/doxmlparser/src/compoundhandler.cpp | 140 ++++++++++++++-- addon/doxmlparser/src/compoundhandler.h | 72 ++++++-- addon/doxmlparser/src/dochandler.cpp | 9 +- addon/doxmlparser/src/dochandler.h | 249 ++++++++++++++++------------ addon/doxmlparser/src/doxmlintf.h | 136 +++++++++++---- addon/doxmlparser/src/graphhandler.cpp | 30 +++- addon/doxmlparser/src/graphhandler.h | 18 +- addon/doxmlparser/src/linkedtexthandler.cpp | 16 +- addon/doxmlparser/src/linkedtexthandler.h | 21 ++- addon/doxmlparser/src/mainhandler.cpp | 4 +- addon/doxmlparser/src/memberhandler.cpp | 2 +- addon/doxmlparser/src/memberhandler.h | 8 +- addon/doxmlparser/src/paramhandler.h | 19 ++- addon/doxmlparser/src/sectionhandler.h | 7 +- addon/doxmlparser/test/main.cpp | 84 +++++++++- examples/enum.h | 7 + make.bat | 2 + packages/rpm/doxygen.spec | 2 +- src/code.l | 23 ++- src/doxygen.cpp | 3 +- 26 files changed, 764 insertions(+), 253 deletions(-) diff --git a/INSTALL b/INSTALL index e5d74a4..2270e91 100644 --- a/INSTALL +++ b/INSTALL @@ -1,6 +1,6 @@ -DOXYGEN Version 1.2.14-20020324 +DOXYGEN Version 1.2.15 Please read the installation section of the manual for instructions. -------- -Dimitri van Heesch (24 March 2002) +Dimitri van Heesch (01 April 2002) diff --git a/README b/README index 8cc3937..1c970be 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -DOXYGEN Version 1.2.14_20020324 +DOXYGEN Version 1.2.15 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) (24 March 2002) +Dimitri van Heesch (dimitri@stack.nl) (01 April 2002) diff --git a/VERSION b/VERSION index 2bcee3c..1fc5b82 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.2.14-20020324 +1.2.15 diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h index 880df30..92d4e2d 100644 --- a/addon/doxmlparser/include/doxmlintf.h +++ b/addon/doxmlparser/include/doxmlintf.h @@ -7,13 +7,13 @@ class IMember; class IDocIterator; class ICompound; class ISection; +class INode; class ILinkedText { public: enum Kind { Kind_Text, Kind_Ref }; virtual Kind kind() const = 0; - virtual ~ILinkedText() {} }; class ILT_Text : public ILinkedText @@ -52,7 +52,6 @@ class IParam virtual QString attrib() const = 0; virtual QString arraySpecifier() const = 0; virtual ILinkedTextIterator *defaultValue() const = 0; - virtual ~IParam() {} }; class IParamIterator @@ -71,7 +70,6 @@ class IMemberReference public: virtual IMember *member() const = 0; virtual QString memberName() const = 0; - virtual ~IMemberReference() {} }; class IMemberReferenceIterator @@ -90,7 +88,6 @@ class IEnumValue public: virtual QString name() const = 0; virtual QString initializer() const = 0; - virtual ~IEnumValue() {} }; class IEnumValueIterator @@ -142,7 +139,6 @@ class IDoc Root // 30 -> IDocRoot }; virtual Kind kind() const = 0; - virtual ~IDoc() {} }; class IDocMarkup : public IDoc @@ -232,7 +228,8 @@ class IDocSimpleSect : public IDoc Todo, Test, RCS, EnumValues, Examples }; - virtual Types sectionType() const = 0; + virtual Types type() const = 0; + virtual QString typeString() const = 0; virtual IDocTitle *title() const = 0; virtual IDocPara *description() const = 0; }; @@ -411,7 +408,7 @@ class IChildNode enum NodeRelation { PublicInheritance, ProtectedInheritance, PrivateInheritance, Usage, TemplateInstance }; - virtual QString id() const = 0; + virtual INode * node() const = 0; virtual NodeRelation relation() const = 0; virtual QString relationString() const = 0; virtual IEdgeLabelIterator *edgeLabels() const = 0; @@ -452,7 +449,6 @@ class IGraph { public: virtual INodeIterator *nodes() const = 0; - virtual ~IGraph() {} }; class IMember @@ -488,7 +484,6 @@ class IMember virtual IEnumValueIterator *enumValues() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; - virtual ~IMember() {} }; class IMemberIterator @@ -524,7 +519,6 @@ class ISection virtual bool isPublic() const = 0; virtual bool isPrivate() const = 0; virtual bool isProtected() const = 0; - virtual ~ISection() {} }; class ISectionIterator @@ -541,19 +535,43 @@ class ISectionIterator class ICompound { public: + /*! Represents the kind of compounds recognised by doxygen. */ enum CompoundKind { Invalid=0, Class, Struct, Union, Interface, Exception, - Namespace, File, Group, Page, Package + Namespace, File, Group, Page }; + /*! Returns the name of this compound */ virtual QString name() const = 0; + + /*! Returns the id of this compound. The id is a + * unique string representing a specific compound object. + */ virtual QString id() const = 0; + + /*! Returns the kind of compound. See #CompoundKind for possible + * values. + */ virtual CompoundKind kind() const = 0; + + /*! Returns a string representation of the compound kind. + * @see kind() + */ virtual QString kindString() const = 0; + + /*! Returns an iterator for the different member sections in this + * compound. + */ virtual ISectionIterator *sections() const = 0; + + /*! Returns a tree-structured representation of the brief + * description that is attached to this compound. + */ virtual IDocRoot *briefDescription() const = 0; + + /*! Returns a tree-structured representation of the detailed + * description that is attached to this compound. + */ virtual IDocRoot *detailedDescription() const = 0; - virtual IGraph *inheritanceGraph() const = 0; - virtual IGraph *collaborationGraph() const = 0; /*! Returns an interface to a member given its id. * @param id The member id. @@ -561,7 +579,8 @@ class ICompound virtual IMember *memberById(const QString &id) const = 0; /*! Returns a list of all members within the compound having a certain - * name. Overloading is the reason why there can be more than one member. + * name. Member overloading is the reason why there can be more than + * one member. * @param name The name of the member. */ virtual IMemberIterator *memberByName(const QString &name) const = 0; @@ -570,44 +589,105 @@ class ICompound * zero, the memory for the compound will be released. */ virtual void release() = 0; +}; + +class ICompoundIterator +{ + public: + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; + virtual ICompound *current() const = 0; + virtual void release() = 0; +}; + +class IRelatedCompound +{ + public: + enum Protection { Public, Protected, Private }; + enum Kind { Normal, Virtual }; + virtual ICompound *compound() const = 0; + virtual Protection protection() const = 0; + virtual Kind kind() const = 0; + +}; + +class IRelatedCompoundIterator +{ + public: + virtual IRelatedCompound *toFirst() = 0; + virtual IRelatedCompound *toLast() = 0; + virtual IRelatedCompound *toNext() = 0; + virtual IRelatedCompound *toPrev() = 0; + virtual IRelatedCompound *current() const = 0; + virtual void release() = 0; +}; + +class IClass : public ICompound +{ + public: + virtual IGraph *inheritanceGraph() const = 0; + virtual IGraph *collaborationGraph() const = 0; + virtual IRelatedCompoundIterator *baseClasses() const = 0; + virtual IRelatedCompoundIterator *derivedClasses() const = 0; + virtual ICompoundIterator *nestedClasses() const = 0; // TODO: // class: - // IRelatedCompoundIterator *baseClasses() - // IRelatedCompoundIterator *derivedClasses() - // ICompoundIterator *innerClasses() // ITemplateParamListIterator *templateParamLists() // listOfAllMembers() - // IDotGraph *inheritanceGraph() - // IDotGraph *collaborationGraph() // locationFile() // locationLine() // locationBodyStartLine() // locationBodyEndLine() +}; + +class IStruct : public ICompound +{ +}; + +class IUnion : public ICompound +{ +}; + +class IInterface : public ICompound +{ +}; + +class IException : public ICompound +{ +}; + +class INamespace : public ICompound +{ // namespace: // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +class IFile : public ICompound +{ // file: // includes() // includedBy() // IDotGraph *includeDependencyGraph() // IDotGraph *includedByDependencyGraph() // IDocProgramListing *source() + // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +class IGroup : public ICompound +{ // group: // Title() // innerFile() // innerPage() - // page: }; -class ICompoundIterator +class IPage : public ICompound { - public: - virtual void toFirst() = 0; - virtual void toLast() = 0; - virtual void toNext() = 0; - virtual void toPrev() = 0; - virtual ICompound *current() const = 0; - virtual void release() = 0; }; /*! Root node of the object model. */ diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h index c86316b..0fb59bd 100644 --- a/addon/doxmlparser/src/basehandler.h +++ b/addon/doxmlparser/src/basehandler.h @@ -75,8 +75,8 @@ template class ElementMapper Handler m_handler; }; - typedef StartElementHandler StartElementHandlerT; - typedef EndElementHandler EndElementHandlerT; + typedef StartElementHandler StartElementHandlerT; + typedef EndElementHandler EndElementHandlerT; public: ElementMapper() : m_startHandlers(67), m_endHandlers(67) diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h index 847d1ef..bbcf7cf 100644 --- a/addon/doxmlparser/src/baseiterator.h +++ b/addon/doxmlparser/src/baseiterator.h @@ -32,4 +32,19 @@ template class BaseIterator : virtual void release() { delete this; } }; +template + class BaseIteratorVia : + public Intf, public QListIterator +{ + public: + BaseIteratorVia(const QList &list) : QListIterator(list) {} + virtual ~BaseIteratorVia() {} + virtual ElemIntf *toFirst() { return static_cast(QListIterator::toFirst()); } + virtual ElemIntf *toLast() { return static_cast(QListIterator::toLast()); } + virtual ElemIntf *toNext() { return static_cast(QListIterator::operator++()); } + virtual ElemIntf *toPrev() { return static_cast(QListIterator::operator--()); } + virtual ElemIntf *current() const { return static_cast(QListIterator::current()); } + virtual void release() { delete this; } +}; + #endif diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 2873da5..ce7c852 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -20,6 +20,53 @@ #include "graphhandler.h" #include "sectionhandler.h" +//---------------------------------------------------------------------------- + +class CompoundIdIterator : public ICompoundIterator, + public QListIterator +{ + public: + CompoundIdIterator(const MainHandler *m,const QList &list) : + QListIterator(list), m_mainHandler(m) {} + virtual ~CompoundIdIterator() {} + + virtual void toFirst() + { + QListIterator::toFirst(); + } + virtual void toLast() + { + QListIterator::toLast(); + } + virtual void toNext() + { + QListIterator::operator++(); + } + virtual void toPrev() + { + QListIterator::operator--(); + } + virtual ICompound *current() const + { + QString *id = QListIterator::current(); + return id ? m_mainHandler->compoundById(*id) : 0; + } + virtual void release() + { delete this; } + + private: + const MainHandler *m_mainHandler; +}; + +//---------------------------------------------------------------------------- + +ICompound *RelatedCompound::compound() const +{ + return m_parent->m_mainHandler->compoundById(m_id); +} + +//---------------------------------------------------------------------------- + class CompoundErrorHandler : public QXmlErrorHandler { public: @@ -62,7 +109,6 @@ class CompoundTypeMap m_map.insert("file",new int(ICompound::File)); m_map.insert("group",new int(ICompound::Group)); m_map.insert("page",new int(ICompound::Page)); - m_map.insert("package",new int(ICompound::Package)); } virtual ~CompoundTypeMap() { @@ -104,6 +150,7 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) m_subClasses.setAutoDelete(TRUE); m_sections.setAutoDelete(TRUE); m_memberNameDict.setAutoDelete(TRUE); + m_innerClasses.setAutoDelete(TRUE); addStartHandler("doxygen"); addEndHandler("doxygen"); @@ -135,6 +182,9 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) addStartHandler("collaborationgraph",this,&CompoundHandler::startCollaborationGraph); + addStartHandler("innerclass",this,&CompoundHandler::startInnerClass); + addEndHandler("innerclass"); + } CompoundHandler::~CompoundHandler() @@ -143,6 +193,8 @@ CompoundHandler::~CompoundHandler() delete m_brief; delete m_detailed; delete m_programListing; + delete m_inheritanceGraph; + delete m_collaborationGraph; } void CompoundHandler::startSection(const QXmlAttributes& attrib) @@ -198,31 +250,56 @@ void CompoundHandler::endCompoundName() debug(2,"Compound name `%s'\n",m_name.data()); } +void CompoundHandler::startInnerClass(const QXmlAttributes& attrib) +{ + m_innerClasses.append(new QString(attrib.value("refid"))); +} + void CompoundHandler::addSuperClass(const QXmlAttributes& attrib) { - RelatedClass *sc=new RelatedClass( + IRelatedCompound::Protection prot = IRelatedCompound::Public; + QString protString = attrib.value("prot"); + if (protString=="protected") prot = IRelatedCompound::Protected; + else if (protString=="private") prot = IRelatedCompound::Private; + + IRelatedCompound::Kind kind = IRelatedCompound::Normal; + QString kindString = attrib.value("virt"); + if (kindString=="virtual") kind = IRelatedCompound::Virtual; + + RelatedCompound *sc=new RelatedCompound( + this, attrib.value("refid"), - attrib.value("prot"), - attrib.value("virt") + prot, + kind ); debug(2,"super class id=`%s' prot=`%s' virt=`%s'\n", - sc->m_id.data(), - sc->m_protection.data(), - sc->m_virtualness.data()); + attrib.value("refid").data(), + protString.data(), + kindString.data()); m_superClasses.append(sc); } void CompoundHandler::addSubClass(const QXmlAttributes& attrib) { - RelatedClass *sc = new RelatedClass( + IRelatedCompound::Protection prot = IRelatedCompound::Public; + QString protString = attrib.value("prot"); + if (protString=="protected") prot = IRelatedCompound::Protected; + else if (protString=="private") prot = IRelatedCompound::Private; + + IRelatedCompound::Kind kind = IRelatedCompound::Normal; + QString kindString = attrib.value("virt"); + if (kindString=="virtual") kind = IRelatedCompound::Virtual; + + RelatedCompound *sc = new RelatedCompound( + this, attrib.value("refid"), - attrib.value("prot"), - attrib.value("virt") + prot, + kind ); debug(2,"sub class id=`%s' prot=`%s' virt=`%s'\n", - sc->m_id.data(), - sc->m_protection.data(), - sc->m_virtualness.data()); + attrib.value("refid").data(), + protString.data(), + kindString.data()); m_subClasses.append(sc); } @@ -242,9 +319,9 @@ bool CompoundHandler::parseXML(const QString &compId) void CompoundHandler::initialize(MainHandler *mh) { m_mainHandler = mh; - QListIterator msi(m_sections); + QListIterator msi(m_sections); SectionHandler *sec; - for (;(sec=(SectionHandler *)msi.current());++msi) + for (;(sec=msi.current());++msi) { sec->initialize(this); } @@ -262,6 +339,24 @@ void CompoundHandler::insertMember(MemberHandler *mh) mhl->append(mh); } +ICompound *CompoundHandler::toICompound() const +{ + switch (m_kind) + { + case IClass::Class: return (IClass *)this; + case IStruct::Struct: return (IStruct *)this; + case IUnion::Union: return (IUnion *)this; + case IException::Exception: return (IException *)this; + case IInterface::Interface: return (IInterface *)this; + case INamespace::Namespace: return (INamespace *)this; + case IFile::File: return (IFile *)this; + case IGroup::Group: return (IGroup *)this; + case IPage::Page: return (IPage *)this; + default: return 0; + } + return 0; +} + void CompoundHandler::release() { debug(2,"CompoundHandler::release() %d->%d\n",m_refCount,m_refCount-1); @@ -321,3 +416,18 @@ IGraph *CompoundHandler::collaborationGraph() const return m_collaborationGraph; } +IRelatedCompoundIterator *CompoundHandler::baseClasses() const +{ + return new RelatedCompoundIterator(m_superClasses); +} + +IRelatedCompoundIterator *CompoundHandler::derivedClasses() const +{ + return new RelatedCompoundIterator(m_subClasses); +} + +ICompoundIterator *CompoundHandler::nestedClasses() const +{ + return new CompoundIdIterator(m_mainHandler,m_innerClasses); +} + diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h index c90b466..965e4c1 100644 --- a/addon/doxmlparser/src/compoundhandler.h +++ b/addon/doxmlparser/src/compoundhandler.h @@ -28,9 +28,52 @@ class DocHandler; class ProgramListingHandler; class GraphHandler; class MemberHandler; +class CompoundHandler; +class SectionHandler; -class CompoundHandler : public ICompound, public BaseHandler + +class RelatedCompound : public IRelatedCompound +{ + public: + RelatedCompound(CompoundHandler *parent, + const QString &id, + Protection prot, + Kind kind + ) : + m_parent(parent), m_id(id), m_protection(prot), m_kind(kind) {} + virtual ~RelatedCompound() {} + + virtual ICompound *compound() const; + virtual Protection protection() const { return m_protection; } + virtual Kind kind() const { return m_kind; } + + private: + CompoundHandler *m_parent; + QString m_id; + Protection m_protection; + Kind m_kind; +}; + +class RelatedCompoundIterator : public BaseIterator +{ + public: + RelatedCompoundIterator(const QList &list) : + BaseIterator(list) {} +}; + + +class CompoundHandler : public IClass, + public IStruct, + public IUnion, + public IException, + public IInterface, + public INamespace, + public IFile, + public IGroup, + public IPage, + public BaseHandler { + friend class RelatedCompound; public: virtual void startSection(const QXmlAttributes& attrib); virtual void startCompound(const QXmlAttributes& attrib); @@ -44,6 +87,7 @@ class CompoundHandler : public ICompound, public BaseHandler virtual void startProgramListing(const QXmlAttributes& attrib); virtual void startInheritanceGraph(const QXmlAttributes& attrib); virtual void startCollaborationGraph(const QXmlAttributes& attrib); + virtual void startInnerClass(const QXmlAttributes& attrib); virtual void addref() { m_refCount++; } CompoundHandler(const QString &dirName); @@ -51,6 +95,7 @@ class CompoundHandler : public ICompound, public BaseHandler bool parseXML(const QString &compId); void initialize(MainHandler *mh); void insertMember(MemberHandler *mh); + ICompound *toICompound() const; // ICompound implementation QString name() const { return m_name; } @@ -60,25 +105,21 @@ class CompoundHandler : public ICompound, public BaseHandler ISectionIterator *sections() const; IDocRoot *briefDescription() const; IDocRoot *detailedDescription() const; - IGraph *inheritanceGraph() const; - IGraph *collaborationGraph() const; IMember *memberById(const QString &id) const; IMemberIterator *memberByName(const QString &name) const; void release(); + // IClass implementation + IGraph *inheritanceGraph() const; + IGraph *collaborationGraph() const; + IRelatedCompoundIterator *baseClasses() const; + IRelatedCompoundIterator *derivedClasses() const; + ICompoundIterator *nestedClasses() const; + private: - struct RelatedClass - { - RelatedClass(const QString &id,const QString &prot,const QString &virt) : - m_id(id),m_protection(prot),m_virtualness(virt) {} - - QString m_id; - QString m_protection; - QString m_virtualness; - }; - QList m_superClasses; - QList m_subClasses; - QList m_sections; + QList m_superClasses; + QList m_subClasses; + QList m_sections; DocHandler *m_brief; DocHandler *m_detailed; ProgramListingHandler *m_programListing; @@ -95,6 +136,7 @@ class CompoundHandler : public ICompound, public BaseHandler MainHandler *m_mainHandler; GraphHandler *m_inheritanceGraph; GraphHandler *m_collaborationGraph; + QList m_innerClasses; }; diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index 8f1249f..4c91ba5 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -94,7 +94,7 @@ void dochandler_exit() // MarkupHandler //---------------------------------------------------------------------- -MarkupHandler::MarkupHandler(QList &children,QString &curString) +MarkupHandler::MarkupHandler(QList &children,QString &curString) : m_children(children), m_curString(curString), m_curMarkup(IDocMarkup::Normal) { addStartHandler("bold",this,&MarkupHandler::startBold); @@ -700,8 +700,9 @@ SimpleSectHandler::~SimpleSectHandler() void SimpleSectHandler::startSimpleSect(const QXmlAttributes& attrib) { - m_type = s_typeMapper->stringToType(attrib.value("kind")); - debug(2,"start simple section %s\n",attrib.value("kind").data()); + m_typeString = attrib.value("kind"); + m_type = s_typeMapper->stringToType(m_typeString); + debug(2,"start simple section %s\n",m_typeString.data()); m_parent->setDelegate(this); } @@ -846,7 +847,7 @@ HighlightHandler::HighlightHandler(IBaseHandler *parent) m_children.setAutoDelete(TRUE); addEndHandler("highlight",this,&HighlightHandler::endHighlight); addStartHandler("ref",this,&HighlightHandler::startRef); - m_hl = Invalid; + m_hl = IDocHighlight::Invalid; } HighlightHandler::~HighlightHandler() diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h index c3b8242..894296a 100644 --- a/addon/doxmlparser/src/dochandler.h +++ b/addon/doxmlparser/src/dochandler.h @@ -28,11 +28,50 @@ class ParagraphHandler; //----------------------------------------------------------------------------- +class DocImpl : public IDoc { public: virtual ~DocImpl() {} }; + +#define DEFINE_CLS_IMPL(cls) \ + class cls##Impl : public I##cls, public DocImpl { public: virtual ~cls##Impl() {} } + +DEFINE_CLS_IMPL(DocMarkup); +DEFINE_CLS_IMPL(DocPara); +DEFINE_CLS_IMPL(DocText); +DEFINE_CLS_IMPL(DocMarkupModifier); +DEFINE_CLS_IMPL(DocItemizedList); +DEFINE_CLS_IMPL(DocOrderedList); +DEFINE_CLS_IMPL(DocListItem); +DEFINE_CLS_IMPL(DocParameterList); +DEFINE_CLS_IMPL(DocParameter); +DEFINE_CLS_IMPL(DocTitle); +DEFINE_CLS_IMPL(DocSimpleSect); +DEFINE_CLS_IMPL(DocRef); +DEFINE_CLS_IMPL(DocVariableList); +DEFINE_CLS_IMPL(DocVariableListEntry); +DEFINE_CLS_IMPL(DocHRuler); +DEFINE_CLS_IMPL(DocLineBreak); +DEFINE_CLS_IMPL(DocULink); +DEFINE_CLS_IMPL(DocEMail); +DEFINE_CLS_IMPL(DocLink); +DEFINE_CLS_IMPL(DocProgramListing); +DEFINE_CLS_IMPL(DocCodeLine); +DEFINE_CLS_IMPL(DocHighlight); +DEFINE_CLS_IMPL(DocFormula); +DEFINE_CLS_IMPL(DocImage); +DEFINE_CLS_IMPL(DocDotFile); +DEFINE_CLS_IMPL(DocIndexEntry); +DEFINE_CLS_IMPL(DocTable); +DEFINE_CLS_IMPL(DocRow); +DEFINE_CLS_IMPL(DocEntry); +DEFINE_CLS_IMPL(DocSection); +DEFINE_CLS_IMPL(DocRoot); + +//----------------------------------------------------------------------------- + /*! \brief Node representing a piece of text. * */ -class TextNode : public IDocText +class TextNode : public DocTextImpl { public: TextNode(const QString &t,int markup) @@ -40,7 +79,7 @@ class TextNode : public IDocText virtual ~TextNode() {} // IDocText - virtual Kind kind() const { return Text; } + virtual Kind kind() const { return DocImpl::Text; } virtual QString text() const { return m_text; } virtual int markup() const { return m_markup; } @@ -54,7 +93,7 @@ class TextNode : public IDocText /*! \brief Node representing a change in the markup style. * */ -class MarkupModifierNode : public IDocMarkupModifier +class MarkupModifierNode : public DocMarkupModifierImpl { public: MarkupModifierNode(int markup,bool enabled) @@ -62,7 +101,7 @@ class MarkupModifierNode : public IDocMarkupModifier virtual ~MarkupModifierNode() {} // IDocMarkupModifier - virtual Kind kind() const { return MarkupModifier; } + virtual Kind kind() const { return DocImpl::MarkupModifier; } virtual bool enabled() const { return m_enabled; } virtual int markup() const { return m_markup; } @@ -80,7 +119,7 @@ class MarkupModifierNode : public IDocMarkupModifier class MarkupHandler : public BaseFallBackHandler { public: - MarkupHandler(QList &children,QString &curString); + MarkupHandler(QList &children,QString &curString); virtual ~MarkupHandler(); int markup() const { return m_curMarkup; } @@ -103,8 +142,8 @@ class MarkupHandler : public BaseFallBackHandler private: void addTextNode(); - QList &m_children; - QString &m_curString; + QList &m_children; + QString &m_curString; int m_curMarkup; }; @@ -122,7 +161,7 @@ class MarkupHandler : public BaseFallBackHandler // bold, computeroutput, emphasis, center, // small, subscript, superscript. // -class ParagraphHandler : public IDocPara, +class ParagraphHandler : public DocParaImpl, public BaseHandler { friend class ParagraphIterator; @@ -152,21 +191,21 @@ class ParagraphHandler : public IDocPara, virtual ~ParagraphHandler(); // IDocPara - virtual Kind kind() const { return Para; } + virtual Kind kind() const { return DocImpl::Para; } virtual IDocIterator *contents() const; private: void addTextNode(); IBaseHandler *m_parent; - QList m_children; + QList m_children; MarkupHandler *m_markupHandler; }; -class ParagraphIterator : public BaseIterator +class ParagraphIterator : public BaseIteratorVia { public: ParagraphIterator(const ParagraphHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -174,7 +213,7 @@ class ParagraphIterator : public BaseIterator /*! \brief Node representing a list item. * */ -class ListItemHandler : public IDocListItem, public BaseHandler +class ListItemHandler : public DocListItemImpl, public BaseHandler { friend class ListItemIterator; public: @@ -185,19 +224,19 @@ class ListItemHandler : public IDocListItem, public BaseHandler virtual void startParagraph(const QXmlAttributes& attrib); // IDocItem - virtual Kind kind() const { return ListItem; } + virtual Kind kind() const { return DocImpl::ListItem; } virtual IDocIterator *contents() const; private: IBaseHandler *m_parent; - QList m_children; + QList m_children; }; -class ListItemIterator : public BaseIterator +class ListItemIterator : public BaseIteratorVia { public: ListItemIterator(const ListItemHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; @@ -206,7 +245,7 @@ class ListItemIterator : public BaseIterator /*! \brief Node representing list of items. * */ -class OrderedListHandler : public IDocOrderedList, public BaseHandler +class OrderedListHandler : public DocOrderedListImpl, public BaseHandler { friend class OrderedListIterator; public: @@ -217,19 +256,19 @@ class OrderedListHandler : public IDocOrderedList, public BaseHandler m_children; + QList m_children; }; -class OrderedListIterator : public BaseIterator +class OrderedListIterator : public BaseIteratorVia { public: OrderedListIterator(const OrderedListHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; @@ -238,7 +277,7 @@ class OrderedListIterator : public BaseIterator /*! \brief Node representing list of items. * */ -class ItemizedListHandler : public IDocItemizedList, public BaseHandler +class ItemizedListHandler : public DocItemizedListImpl, public BaseHandler { friend class ItemizedListIterator; public: @@ -249,19 +288,19 @@ class ItemizedListHandler : public IDocItemizedList, public BaseHandler m_children; + QList m_children; }; -class ItemizedListIterator : public BaseIterator +class ItemizedListIterator : public BaseIteratorVia { public: ItemizedListIterator(const ItemizedListHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; @@ -269,7 +308,7 @@ class ItemizedListIterator : public BaseIterator /*! \brief Node representing a parameter. * */ -class ParameterHandler : public IDocParameter, +class ParameterHandler : public DocParameterImpl, public BaseHandler { public: @@ -282,7 +321,7 @@ class ParameterHandler : public IDocParameter, virtual void startParagraph(const QXmlAttributes& attrib); // IDocParameter - virtual Kind kind() const { return Parameter; } + virtual Kind kind() const { return DocImpl::Parameter; } virtual QString name() const { return m_name; } virtual IDocPara *description() const { return m_description; } @@ -297,7 +336,7 @@ class ParameterHandler : public IDocParameter, /* \brief Node representing a parameter list. * */ -class ParameterListHandler : public IDocParameterList, +class ParameterListHandler : public DocParameterListImpl, public BaseHandler { friend class ParameterListIterator; @@ -310,7 +349,7 @@ class ParameterListHandler : public IDocParameterList, virtual void startParameterDescription(const QXmlAttributes& attrib); // IDocParameterList - virtual Kind kind() const { return ParameterList; } + virtual Kind kind() const { return DocImpl::ParameterList; } virtual Types listType() const { return m_type; } virtual IDocIterator *params() const; @@ -321,11 +360,11 @@ class ParameterListHandler : public IDocParameterList, Types m_type; }; -class ParameterListIterator : public BaseIterator +class ParameterListIterator : public BaseIteratorVia { public: ParameterListIterator(const ParameterListHandler &handler) : - BaseIterator(handler.m_parameters) {} + BaseIteratorVia(handler.m_parameters) {} }; //----------------------------------------------------------------------------- @@ -333,7 +372,7 @@ class ParameterListIterator : public BaseIterator +class LineBreakHandler : public DocLineBreakImpl, public BaseHandler { public: LineBreakHandler(IBaseHandler *parent); @@ -343,7 +382,7 @@ class LineBreakHandler : public IDocLineBreak, public BaseHandler +class LinkHandler : public DocLinkImpl, public BaseHandler { public: LinkHandler(IBaseHandler *parent); @@ -364,7 +403,7 @@ class LinkHandler : public IDocLink, public BaseHandler void endLink(); // IDocLink - virtual Kind kind() const { return Link; } + virtual Kind kind() const { return DocImpl::Link; } virtual QString refId() const { return m_ref; } virtual QString text() const { return m_text; } @@ -380,7 +419,7 @@ class LinkHandler : public IDocLink, public BaseHandler /* \brief Node representing a link to an email address * */ -class EMailHandler : public IDocEMail, public BaseHandler +class EMailHandler : public DocEMailImpl, public BaseHandler { public: EMailHandler(IBaseHandler *parent); @@ -390,7 +429,7 @@ class EMailHandler : public IDocEMail, public BaseHandler void endEMail(); // IDocEMail - virtual Kind kind() const { return EMail; } + virtual Kind kind() const { return DocImpl::EMail; } virtual QString address() const { return m_address; } private: @@ -404,7 +443,7 @@ class EMailHandler : public IDocEMail, public BaseHandler /* \brief Node representing a link to an URL * */ -class ULinkHandler : public IDocULink, public BaseHandler +class ULinkHandler : public DocULinkImpl, public BaseHandler { public: ULinkHandler(IBaseHandler *parent); @@ -414,7 +453,7 @@ class ULinkHandler : public IDocULink, public BaseHandler void endULink(); // IDocULink - virtual Kind kind() const { return ULink; } + virtual Kind kind() const { return DocImpl::ULink; } virtual QString url() const { return m_url; } virtual QString text() const { return m_text; } @@ -429,7 +468,7 @@ class ULinkHandler : public IDocULink, public BaseHandler /* \brief Node representing a horizontal ruler * */ -class HRulerHandler : public IDocHRuler, public BaseHandler +class HRulerHandler : public DocHRulerImpl, public BaseHandler { public: HRulerHandler(IBaseHandler *parent); @@ -439,7 +478,7 @@ class HRulerHandler : public IDocHRuler, public BaseHandler void endHRuler(); // IDocHRuler - virtual Kind kind() const { return HRuler; } + virtual Kind kind() const { return DocImpl::HRuler; } private: IBaseHandler *m_parent; @@ -450,7 +489,7 @@ class HRulerHandler : public IDocHRuler, public BaseHandler /* \brief Node representing a reference to another item * */ -class RefHandler : public IDocRef, public BaseHandler +class RefHandler : public DocRefImpl, public BaseHandler { public: RefHandler(IBaseHandler *parent); @@ -459,7 +498,7 @@ class RefHandler : public IDocRef, public BaseHandler void endRef(); // IDocRef - virtual Kind kind() const { return Ref; } + virtual Kind kind() const { return DocImpl::Ref; } virtual QString refId() const { return m_refId; } virtual TargetKind targetKind() const { return m_targetKind; } virtual QString external() const { return m_extId; } @@ -482,7 +521,7 @@ class RefHandler : public IDocRef, public BaseHandler // children handled by MarkupHandler: // bold, computeroutput, emphasis, center, // small, subscript, superscript. -class TitleHandler : public IDocTitle, public BaseHandler +class TitleHandler : public DocTitleImpl, public BaseHandler { friend class TitleIterator; public: @@ -494,20 +533,20 @@ class TitleHandler : public IDocTitle, public BaseHandler void addTextNode(); // IDocTitle - virtual Kind kind() const { return Title; } + virtual Kind kind() const { return DocImpl::Title; } virtual IDocIterator *title() const; private: IBaseHandler *m_parent; - QList m_children; + QList m_children; MarkupHandler *m_markupHandler; }; -class TitleIterator : public BaseIterator +class TitleIterator : public BaseIteratorVia { public: TitleIterator(const TitleHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -516,7 +555,7 @@ class TitleIterator : public BaseIterator * */ // children: title, para -class SimpleSectHandler : public IDocSimpleSect, +class SimpleSectHandler : public DocSimpleSectImpl, public BaseHandler { public: @@ -528,8 +567,9 @@ class SimpleSectHandler : public IDocSimpleSect, virtual void startParagraph(const QXmlAttributes& attrib); // IDocSimpleSect - virtual Kind kind() const { return SimpleSect; } - virtual Types sectionType() const { return m_type; } + virtual Kind kind() const { return DocImpl::SimpleSect; } + virtual Types type() const { return m_type; } + virtual QString typeString() const { return m_typeString; } virtual IDocTitle *title() const { return m_title; } virtual IDocPara *description() const { return m_paragraph; } @@ -537,6 +577,7 @@ class SimpleSectHandler : public IDocSimpleSect, IBaseHandler *m_parent; ParagraphHandler *m_paragraph; Types m_type; + QString m_typeString; TitleHandler *m_title; }; @@ -545,7 +586,7 @@ class SimpleSectHandler : public IDocSimpleSect, /* \brief Node representing an named item of a VariableList. * */ -class VariableListEntryHandler : public IDocVariableListEntry, +class VariableListEntryHandler : public DocVariableListEntryImpl, public BaseHandler { public: @@ -561,7 +602,7 @@ class VariableListEntryHandler : public IDocVariableListEntry, virtual ~VariableListEntryHandler(); // IDocVariableListEntry - virtual Kind kind() const { return VariableListEntry; } + virtual Kind kind() const { return DocImpl::VariableListEntry; } virtual QString term() const { return m_term; } virtual IDocPara *description() const { return m_description; } @@ -577,7 +618,7 @@ class VariableListEntryHandler : public IDocVariableListEntry, * */ // children: varlistentry, listitem -class VariableListHandler : public IDocVariableList, +class VariableListHandler : public DocVariableListImpl, public BaseHandler { friend class VariableListIterator; @@ -592,7 +633,7 @@ class VariableListHandler : public IDocVariableList, virtual ~VariableListHandler(); // IDocVariableList - virtual Kind kind() const { return VariableList; } + virtual Kind kind() const { return DocImpl::VariableList; } virtual IDocIterator *entries() const; private: @@ -601,11 +642,11 @@ class VariableListHandler : public IDocVariableList, VariableListEntryHandler *m_curEntry; }; -class VariableListIterator : public BaseIterator +class VariableListIterator : public BaseIteratorVia { public: VariableListIterator(const VariableListHandler &handler) : - BaseIterator(handler.m_entries) {} + BaseIteratorVia(handler.m_entries) {} }; //----------------------------------------------------------------------------- @@ -614,7 +655,7 @@ class VariableListIterator : public BaseIterator +class HighlightHandler : public DocHighlightImpl, public BaseHandler { friend class HighlightIterator; public: @@ -625,7 +666,7 @@ class HighlightHandler : public IDocHighlight, public BaseHandler m_children; + QList m_children; }; -class HighlightIterator : public BaseIterator +class HighlightIterator : public BaseIteratorVia { public: HighlightIterator(const HighlightHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -651,7 +692,7 @@ class HighlightIterator : public BaseIterator * */ // children: linenumber, highlight, anchor, ref -class CodeLineHandler : public IDocCodeLine, public BaseHandler +class CodeLineHandler : public DocCodeLineImpl, public BaseHandler { friend class CodeLineIterator; public: @@ -667,7 +708,7 @@ class CodeLineHandler : public IDocCodeLine, public BaseHandler virtual ~CodeLineHandler(); // IDocCodeLine - virtual Kind kind() const { return CodeLine; } + virtual Kind kind() const { return DocImpl::CodeLine; } virtual int lineNumber() const { return m_lineNumber; } virtual QString refId() const { return m_refId; } virtual IDocIterator *codeElements() const; @@ -678,14 +719,14 @@ class CodeLineHandler : public IDocCodeLine, public BaseHandler IBaseHandler *m_parent; int m_lineNumber; QString m_refId; - QList m_children; + QList m_children; }; -class CodeLineIterator : public BaseIterator +class CodeLineIterator : public BaseIteratorVia { public: CodeLineIterator(const CodeLineHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -694,7 +735,7 @@ class CodeLineIterator : public BaseIterator * */ // children: codeline, linenumber -class ProgramListingHandler : public IDocProgramListing, public BaseHandler +class ProgramListingHandler : public DocProgramListingImpl, public BaseHandler { friend class ProgramListingIterator; public: @@ -707,7 +748,7 @@ class ProgramListingHandler : public IDocProgramListing, public BaseHandler +class ProgramListingIterator : public BaseIteratorVia { public: ProgramListingIterator(const ProgramListingHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -731,7 +772,7 @@ class ProgramListingIterator : public BaseIterator +class FormulaHandler : public DocFormulaImpl, public BaseHandler { public: FormulaHandler(IBaseHandler *parent); @@ -740,7 +781,7 @@ class FormulaHandler : public IDocFormula, public BaseHandler void endFormula(); // IDocFormula - virtual Kind kind() const { return Formula; } + virtual Kind kind() const { return DocImpl::Formula; } virtual QString id() const { return m_id; } virtual QString text() const { return m_text; } @@ -756,7 +797,7 @@ class FormulaHandler : public IDocFormula, public BaseHandler * */ // children: - -class ImageHandler : public IDocImage, public BaseHandler +class ImageHandler : public DocImageImpl, public BaseHandler { public: ImageHandler(IBaseHandler *parent); @@ -765,7 +806,7 @@ class ImageHandler : public IDocImage, public BaseHandler void endImage(); // IDocImage - virtual Kind kind() const { return Image; } + virtual Kind kind() const { return DocImpl::Image; } virtual QString name() const { return m_name; } virtual QString caption() const { return m_caption; } @@ -781,7 +822,7 @@ class ImageHandler : public IDocImage, public BaseHandler * */ // children: - -class DotFileHandler : public IDocDotFile, public BaseHandler +class DotFileHandler : public DocDotFileImpl, public BaseHandler { public: DotFileHandler(IBaseHandler *parent); @@ -790,7 +831,7 @@ class DotFileHandler : public IDocDotFile, public BaseHandler void endDotFile(); // IDocDotFile - virtual Kind kind() const { return DotFile; } + virtual Kind kind() const { return DocImpl::DotFile; } virtual QString name() const { return m_name; } virtual QString caption() const { return m_caption; } @@ -806,7 +847,7 @@ class DotFileHandler : public IDocDotFile, public BaseHandler * */ // children: - -class IndexEntryHandler : public IDocIndexEntry, public BaseHandler +class IndexEntryHandler : public DocIndexEntryImpl, public BaseHandler { public: IndexEntryHandler(IBaseHandler *parent); @@ -819,7 +860,7 @@ class IndexEntryHandler : public IDocIndexEntry, public BaseHandler +class EntryHandler : public DocEntryImpl, public BaseHandler { friend class EntryIterator; public: @@ -846,19 +887,19 @@ class EntryHandler : public IDocEntry, public BaseHandler void startParagraph(const QXmlAttributes& attrib); // IDocEntry - virtual Kind kind() const { return Entry; } + virtual Kind kind() const { return DocImpl::Entry; } virtual IDocIterator *contents() const; private: IBaseHandler *m_parent; - QList m_children; + QList m_children; }; -class EntryIterator : public BaseIterator +class EntryIterator : public BaseIteratorVia { public: EntryIterator(const EntryHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -867,7 +908,7 @@ class EntryIterator : public BaseIterator * */ // children: entry -class RowHandler : public IDocRow, public BaseHandler +class RowHandler : public DocRowImpl, public BaseHandler { friend class RowIterator; public: @@ -878,7 +919,7 @@ class RowHandler : public IDocRow, public BaseHandler void startEntry(const QXmlAttributes& attrib); // IDocRow - virtual Kind kind() const { return Row; } + virtual Kind kind() const { return DocImpl::Row; } virtual IDocIterator *entries() const; private: @@ -886,11 +927,11 @@ class RowHandler : public IDocRow, public BaseHandler QList m_children; }; -class RowIterator : public BaseIterator +class RowIterator : public BaseIteratorVia { public: RowIterator(const RowHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -899,7 +940,7 @@ class RowIterator : public BaseIterator * */ // children: row, caption -class TableHandler : public IDocTable, public BaseHandler +class TableHandler : public DocTableImpl, public BaseHandler { friend class TableIterator; public: @@ -912,7 +953,7 @@ class TableHandler : public IDocTable, public BaseHandler void endCaption(); // IDocTable - virtual Kind kind() const { return Table; } + virtual Kind kind() const { return DocImpl::Table; } virtual IDocIterator *rows() const; virtual int numColumns() const { return m_numColumns; } virtual QString caption() const { return m_caption; } @@ -924,11 +965,11 @@ class TableHandler : public IDocTable, public BaseHandler QString m_caption; }; -class TableIterator : public BaseIterator +class TableIterator : public BaseIteratorVia { public: TableIterator(const TableHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; @@ -941,7 +982,7 @@ class TableIterator : public BaseIterator // children handled by MarkupHandler: // bold, computeroutput, emphasis, center, // small, subscript, superscript. -class DocSectionHandler : public IDocSection, public BaseHandler +class DocSectionHandler : public DocSectionImpl, public BaseHandler { friend class DocSectionIterator; public: @@ -953,24 +994,24 @@ class DocSectionHandler : public IDocSection, public BaseHandler m_children; + QList m_children; MarkupHandler *m_markupHandler; QString m_id; int m_level; }; -class DocSectionIterator : public BaseIterator +class DocSectionIterator : public BaseIteratorVia { public: DocSectionIterator(const DocSectionHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; //----------------------------------------------------------------------------- @@ -979,7 +1020,7 @@ class DocSectionIterator : public BaseIterator * */ // children: para, title, sect1, sect2, sect3 -class DocHandler : public IDocRoot, public BaseHandler +class DocHandler : public DocRootImpl, public BaseHandler { friend class DocIterator; public: @@ -995,19 +1036,19 @@ class DocHandler : public IDocRoot, public BaseHandler virtual ~DocHandler(); // IDocRoot - virtual Kind kind() const { return Root; } + virtual Kind kind() const { return DocImpl::Root; } virtual IDocIterator *contents() const; private: IBaseHandler *m_parent; - QList m_children; + QList m_children; }; -class DocIterator : public BaseIterator +class DocIterator : public BaseIteratorVia { public: DocIterator(const DocHandler &handler) : - BaseIterator(handler.m_children) {} + BaseIteratorVia(handler.m_children) {} }; void dochandler_init(); diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h index 880df30..92d4e2d 100644 --- a/addon/doxmlparser/src/doxmlintf.h +++ b/addon/doxmlparser/src/doxmlintf.h @@ -7,13 +7,13 @@ class IMember; class IDocIterator; class ICompound; class ISection; +class INode; class ILinkedText { public: enum Kind { Kind_Text, Kind_Ref }; virtual Kind kind() const = 0; - virtual ~ILinkedText() {} }; class ILT_Text : public ILinkedText @@ -52,7 +52,6 @@ class IParam virtual QString attrib() const = 0; virtual QString arraySpecifier() const = 0; virtual ILinkedTextIterator *defaultValue() const = 0; - virtual ~IParam() {} }; class IParamIterator @@ -71,7 +70,6 @@ class IMemberReference public: virtual IMember *member() const = 0; virtual QString memberName() const = 0; - virtual ~IMemberReference() {} }; class IMemberReferenceIterator @@ -90,7 +88,6 @@ class IEnumValue public: virtual QString name() const = 0; virtual QString initializer() const = 0; - virtual ~IEnumValue() {} }; class IEnumValueIterator @@ -142,7 +139,6 @@ class IDoc Root // 30 -> IDocRoot }; virtual Kind kind() const = 0; - virtual ~IDoc() {} }; class IDocMarkup : public IDoc @@ -232,7 +228,8 @@ class IDocSimpleSect : public IDoc Todo, Test, RCS, EnumValues, Examples }; - virtual Types sectionType() const = 0; + virtual Types type() const = 0; + virtual QString typeString() const = 0; virtual IDocTitle *title() const = 0; virtual IDocPara *description() const = 0; }; @@ -411,7 +408,7 @@ class IChildNode enum NodeRelation { PublicInheritance, ProtectedInheritance, PrivateInheritance, Usage, TemplateInstance }; - virtual QString id() const = 0; + virtual INode * node() const = 0; virtual NodeRelation relation() const = 0; virtual QString relationString() const = 0; virtual IEdgeLabelIterator *edgeLabels() const = 0; @@ -452,7 +449,6 @@ class IGraph { public: virtual INodeIterator *nodes() const = 0; - virtual ~IGraph() {} }; class IMember @@ -488,7 +484,6 @@ class IMember virtual IEnumValueIterator *enumValues() const = 0; virtual IDocRoot *briefDescription() const = 0; virtual IDocRoot *detailedDescription() const = 0; - virtual ~IMember() {} }; class IMemberIterator @@ -524,7 +519,6 @@ class ISection virtual bool isPublic() const = 0; virtual bool isPrivate() const = 0; virtual bool isProtected() const = 0; - virtual ~ISection() {} }; class ISectionIterator @@ -541,19 +535,43 @@ class ISectionIterator class ICompound { public: + /*! Represents the kind of compounds recognised by doxygen. */ enum CompoundKind { Invalid=0, Class, Struct, Union, Interface, Exception, - Namespace, File, Group, Page, Package + Namespace, File, Group, Page }; + /*! Returns the name of this compound */ virtual QString name() const = 0; + + /*! Returns the id of this compound. The id is a + * unique string representing a specific compound object. + */ virtual QString id() const = 0; + + /*! Returns the kind of compound. See #CompoundKind for possible + * values. + */ virtual CompoundKind kind() const = 0; + + /*! Returns a string representation of the compound kind. + * @see kind() + */ virtual QString kindString() const = 0; + + /*! Returns an iterator for the different member sections in this + * compound. + */ virtual ISectionIterator *sections() const = 0; + + /*! Returns a tree-structured representation of the brief + * description that is attached to this compound. + */ virtual IDocRoot *briefDescription() const = 0; + + /*! Returns a tree-structured representation of the detailed + * description that is attached to this compound. + */ virtual IDocRoot *detailedDescription() const = 0; - virtual IGraph *inheritanceGraph() const = 0; - virtual IGraph *collaborationGraph() const = 0; /*! Returns an interface to a member given its id. * @param id The member id. @@ -561,7 +579,8 @@ class ICompound virtual IMember *memberById(const QString &id) const = 0; /*! Returns a list of all members within the compound having a certain - * name. Overloading is the reason why there can be more than one member. + * name. Member overloading is the reason why there can be more than + * one member. * @param name The name of the member. */ virtual IMemberIterator *memberByName(const QString &name) const = 0; @@ -570,44 +589,105 @@ class ICompound * zero, the memory for the compound will be released. */ virtual void release() = 0; +}; + +class ICompoundIterator +{ + public: + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; + virtual ICompound *current() const = 0; + virtual void release() = 0; +}; + +class IRelatedCompound +{ + public: + enum Protection { Public, Protected, Private }; + enum Kind { Normal, Virtual }; + virtual ICompound *compound() const = 0; + virtual Protection protection() const = 0; + virtual Kind kind() const = 0; + +}; + +class IRelatedCompoundIterator +{ + public: + virtual IRelatedCompound *toFirst() = 0; + virtual IRelatedCompound *toLast() = 0; + virtual IRelatedCompound *toNext() = 0; + virtual IRelatedCompound *toPrev() = 0; + virtual IRelatedCompound *current() const = 0; + virtual void release() = 0; +}; + +class IClass : public ICompound +{ + public: + virtual IGraph *inheritanceGraph() const = 0; + virtual IGraph *collaborationGraph() const = 0; + virtual IRelatedCompoundIterator *baseClasses() const = 0; + virtual IRelatedCompoundIterator *derivedClasses() const = 0; + virtual ICompoundIterator *nestedClasses() const = 0; // TODO: // class: - // IRelatedCompoundIterator *baseClasses() - // IRelatedCompoundIterator *derivedClasses() - // ICompoundIterator *innerClasses() // ITemplateParamListIterator *templateParamLists() // listOfAllMembers() - // IDotGraph *inheritanceGraph() - // IDotGraph *collaborationGraph() // locationFile() // locationLine() // locationBodyStartLine() // locationBodyEndLine() +}; + +class IStruct : public ICompound +{ +}; + +class IUnion : public ICompound +{ +}; + +class IInterface : public ICompound +{ +}; + +class IException : public ICompound +{ +}; + +class INamespace : public ICompound +{ // namespace: // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +class IFile : public ICompound +{ // file: // includes() // includedBy() // IDotGraph *includeDependencyGraph() // IDotGraph *includedByDependencyGraph() // IDocProgramListing *source() + // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +class IGroup : public ICompound +{ // group: // Title() // innerFile() // innerPage() - // page: }; -class ICompoundIterator +class IPage : public ICompound { - public: - virtual void toFirst() = 0; - virtual void toLast() = 0; - virtual void toNext() = 0; - virtual void toPrev() = 0; - virtual ICompound *current() const = 0; - virtual void release() = 0; }; /*! Root node of the object model. */ diff --git a/addon/doxmlparser/src/graphhandler.cpp b/addon/doxmlparser/src/graphhandler.cpp index 0e47f10..a11273d 100644 --- a/addon/doxmlparser/src/graphhandler.cpp +++ b/addon/doxmlparser/src/graphhandler.cpp @@ -39,19 +39,23 @@ GraphHandler::GraphHandler(IBaseHandler *parent,const char *endTag) addEndHandler(endTag,this,&GraphHandler::endGraph); addStartHandler("node",this,&GraphHandler::startNode); m_nodes.setAutoDelete(TRUE); + m_nodeDict = new QDict(1009); } GraphHandler::~GraphHandler() { + delete m_nodeDict; } void GraphHandler::startGraph(const QXmlAttributes &) { + debug(2,"startGraph\n"); m_parent->setDelegate(this); } void GraphHandler::endGraph() { + debug(2,"endGraph\n"); m_parent->setDelegate(0); } @@ -60,6 +64,7 @@ void GraphHandler::startNode(const QXmlAttributes &attrib) NodeHandler *n = new NodeHandler(this); n->startNode(attrib); m_nodes.append(n); + m_nodeDict->insert(attrib.value("id"),n); } INodeIterator *GraphHandler::nodes() const @@ -67,10 +72,15 @@ INodeIterator *GraphHandler::nodes() const return new NodeIterator(*this); } +NodeHandler *GraphHandler::getNodeById(const QString &id) const +{ + return m_nodeDict->find(id); +} + //------------------------------------------------------------------------ -NodeHandler::NodeHandler(IBaseHandler *parent) - : m_parent(parent) +NodeHandler::NodeHandler(GraphHandler *gh) + : m_parent(gh), m_graph(gh) { addEndHandler("node",this,&NodeHandler::endNode); addStartHandler("link",this,&NodeHandler::startLink); @@ -87,12 +97,14 @@ NodeHandler::~NodeHandler() void NodeHandler::startNode(const QXmlAttributes &attrib) { + debug(2,"startNode\n"); m_parent->setDelegate(this); m_id = attrib.value("id"); } void NodeHandler::endNode() { + debug(2,"endNode\n"); m_parent->setDelegate(0); } @@ -117,7 +129,7 @@ void NodeHandler::endLabel() void NodeHandler::startChildNode(const QXmlAttributes &attrib) { - ChildNodeHandler *cnh = new ChildNodeHandler(this); + ChildNodeHandler *cnh = new ChildNodeHandler(this,m_graph); cnh->startChildNode(attrib); m_children.append(cnh); } @@ -129,9 +141,10 @@ IChildNodeIterator *NodeHandler::children() const //------------------------------------------------------------------------ -ChildNodeHandler::ChildNodeHandler(IBaseHandler *parent) - : m_parent(parent) +ChildNodeHandler::ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh) + : m_parent(parent), m_graph(gh) { + addEndHandler("childnode",this,&ChildNodeHandler::endChildNode); addStartHandler("edgelabel",this,&ChildNodeHandler::startEdgeLabel); m_edgeLabels.setAutoDelete(TRUE); } @@ -142,6 +155,7 @@ ChildNodeHandler::~ChildNodeHandler() void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib) { + debug(2,"startChildNode\n"); m_id = attrib.value("id"); m_relationString = attrib.value("relation"); m_relation = s_edgeRelationMapper->stringToNodeRelation(m_relationString); @@ -150,6 +164,7 @@ void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib) void ChildNodeHandler::endChildNode() { + debug(2,"endChildNode\n"); m_parent->setDelegate(0); } @@ -166,12 +181,17 @@ IEdgeLabelIterator *ChildNodeHandler::edgeLabels() const return new EdgeLabelIterator(*this); } +INode *ChildNodeHandler::node() const +{ + return m_graph->getNodeById(m_id); +} //----------------------------------------------------------------------- EdgeLabelHandler::EdgeLabelHandler(IBaseHandler *parent) : m_parent(parent) { + addEndHandler("edgelabel",this,&EdgeLabelHandler::endEdgeLabel); } EdgeLabelHandler::~EdgeLabelHandler() diff --git a/addon/doxmlparser/src/graphhandler.h b/addon/doxmlparser/src/graphhandler.h index d9e0ae4..ebcc352 100644 --- a/addon/doxmlparser/src/graphhandler.h +++ b/addon/doxmlparser/src/graphhandler.h @@ -34,6 +34,7 @@ class GraphHandler : public IGraph, public BaseHandler void startGraph(const QXmlAttributes &attrib); void endGraph(); void startNode(const QXmlAttributes &attrib); + NodeHandler *getNodeById(const QString &id) const; // IGraph virtual INodeIterator *nodes() const; @@ -41,6 +42,7 @@ class GraphHandler : public IGraph, public BaseHandler private: IBaseHandler *m_parent; QList m_nodes; + QDict *m_nodeDict; }; //---------------------------------------------------------------------- @@ -49,7 +51,7 @@ class NodeHandler : public INode, public BaseHandler { friend class ChildNodeIterator; public: - NodeHandler(IBaseHandler *parent); + NodeHandler(GraphHandler *gh); virtual ~NodeHandler(); void startNode(const QXmlAttributes &attrib); @@ -72,6 +74,7 @@ class NodeHandler : public INode, public BaseHandler QString m_label; QString m_link; QList m_children; + GraphHandler *m_graph; }; class NodeIterator : public BaseIterator @@ -87,7 +90,7 @@ class ChildNodeHandler : public IChildNode, public BaseHandler { friend class EdgeLabelIterator; public: - ChildNodeHandler(IBaseHandler *parent); + ChildNodeHandler(IBaseHandler *parent,GraphHandler *gh); virtual ~ChildNodeHandler(); void startChildNode(const QXmlAttributes &attrib); @@ -95,17 +98,18 @@ class ChildNodeHandler : public IChildNode, public BaseHandler void startEdgeLabel(const QXmlAttributes &attrib); // IChildNode - virtual QString id() const { return m_id; } + virtual INode *node() const; virtual NodeRelation relation() const { return m_relation; } virtual QString relationString() const { return m_relationString; } virtual IEdgeLabelIterator *edgeLabels() const; private: - IBaseHandler *m_parent; - QString m_id; - NodeRelation m_relation; - QString m_relationString; + IBaseHandler *m_parent; + QString m_id; + NodeRelation m_relation; + QString m_relationString; QList m_edgeLabels; + GraphHandler *m_graph; }; class ChildNodeIterator : public BaseIterator diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp index 972e32e..2eb170f 100644 --- a/addon/doxmlparser/src/linkedtexthandler.cpp +++ b/addon/doxmlparser/src/linkedtexthandler.cpp @@ -16,7 +16,7 @@ #include "debug.h" #include -class LT_Text : public ILT_Text +class LT_Text : public LinkedTextImpl, public ILT_Text { public: LT_Text(const QString &text) : m_text(text) {} @@ -24,12 +24,12 @@ class LT_Text : public ILT_Text // ILT_Text virtual QString text() const { return m_text; } - virtual Kind kind() const { return Kind_Text; } + virtual Kind kind() const { return LinkedTextImpl::Kind_Text; } private: QString m_text; }; -class LT_Ref : public ILT_Ref +class LT_Ref : public LinkedTextImpl, public ILT_Ref { public: LT_Ref() {} @@ -44,7 +44,7 @@ class LT_Ref : public ILT_Ref virtual QString id() const { return m_refId; } virtual TargetKind targetKind() const { return m_targetKind; } virtual QString external() const { return m_extId; } - virtual Kind kind() const { return Kind_Ref; } + virtual Kind kind() const { return LinkedTextImpl::Kind_Ref; } private: QString m_refId; @@ -54,7 +54,7 @@ class LT_Ref : public ILT_Ref }; LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent, - QList &children + QList &children ) : m_parent(parent), m_children(children) { @@ -110,11 +110,11 @@ void LinkedTextHandler::endRef() m_ref=0; } -QString LinkedTextHandler::toString(const QList &list) +QString LinkedTextHandler::toString(const QList &list) { - QListIterator li(list); + QListIterator li(list); QString result; - ILinkedText *lt; + LinkedTextImpl *lt; for (li.toFirst();(lt=li.current());++li) { switch(lt->kind()) diff --git a/addon/doxmlparser/src/linkedtexthandler.h b/addon/doxmlparser/src/linkedtexthandler.h index 6055d29..c023c9f 100644 --- a/addon/doxmlparser/src/linkedtexthandler.h +++ b/addon/doxmlparser/src/linkedtexthandler.h @@ -19,29 +19,36 @@ #include "basehandler.h" class LT_Ref; - -class LinkedTextIterator : public BaseIterator +class LinkedTextImpl : public ILinkedText { public: - LinkedTextIterator(const QList &list) : - BaseIterator(list) {} + virtual ~LinkedTextImpl() {} }; class LinkedTextHandler : public BaseHandler { public: - LinkedTextHandler(IBaseHandler *parent,QList &children); + LinkedTextHandler(IBaseHandler *parent,QList &children); virtual ~LinkedTextHandler(); virtual void start(const char *endTag); virtual void end(); virtual void startRef(const QXmlAttributes& attrib); virtual void endRef(); - static QString toString(const QList &list); + static QString toString(const QList &list); + + // ILinkedText private: IBaseHandler *m_parent; - QList &m_children; + QList &m_children; LT_Ref *m_ref; }; +class LinkedTextIterator : public BaseIterator +{ + public: + LinkedTextIterator(const QList &list) : + BaseIterator(list) {} +}; + #endif diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp index aa54cda..99b1e2c 100644 --- a/addon/doxmlparser/src/mainhandler.cpp +++ b/addon/doxmlparser/src/mainhandler.cpp @@ -201,7 +201,7 @@ ICompound *MainHandler::compoundById(const QString &id) const if (ch) // compound already in memory { ch->addref(); // returning alias -> increase reference counter - return ch; + return ch->toICompound(); } CompoundEntry *ce = m_compoundDict.find(id); if (ce==0) return 0; // id not found @@ -219,7 +219,7 @@ ICompound *MainHandler::compoundById(const QString &id) const MainHandler *that = (MainHandler *)this; ch->initialize(that); that->m_compoundsLoaded.insert(id,ch); - return ch; + return ch->toICompound(); } void MainHandler::unloadCompound(CompoundHandler *ch) diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp index d98035b..31b5d84 100644 --- a/addon/doxmlparser/src/memberhandler.cpp +++ b/addon/doxmlparser/src/memberhandler.cpp @@ -360,7 +360,7 @@ void MemberHandler::setCompoundHandler(CompoundHandler *c) ICompound *MemberHandler::compound() const { m_compound->addref(); - return m_compound; + return m_compound->toICompound(); } void MemberHandler::setSectionHandler(SectionHandler *c) diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h index 3232a4c..2807ae0 100644 --- a/addon/doxmlparser/src/memberhandler.h +++ b/addon/doxmlparser/src/memberhandler.h @@ -175,13 +175,13 @@ class MemberHandler : public IMember, public BaseHandler QString m_id; QString m_protection; QString m_virtualness; - QList m_type; - QList m_initializer; - QList m_exception; + QList m_type; + QList m_initializer; + QList m_exception; QString m_name; DocHandler *m_brief; DocHandler *m_detailed; - QList m_params; + QList m_params; QList m_references; QList m_referencedBy; MemberReference *m_reimplements; diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h index ae02e96..520034a 100644 --- a/addon/doxmlparser/src/paramhandler.h +++ b/addon/doxmlparser/src/paramhandler.h @@ -25,13 +25,6 @@ #include "baseiterator.h" #include "linkedtexthandler.h" -class ParamIterator : public BaseIterator -{ - public: - ParamIterator(const QList &list) : - BaseIterator(list) {} -}; - class ParamHandler : public IParam, public BaseHandler { public: @@ -59,13 +52,21 @@ class ParamHandler : public IParam, public BaseHandler private: IBaseHandler *m_parent; - QList m_type; + QList m_type; QString m_declName; QString m_defName; QString m_attrib; QString m_array; - QList m_defVal; + QList m_defVal; LinkedTextHandler *m_linkedTextHandler; }; +class ParamIterator : public BaseIterator +{ + public: + ParamIterator(const QList &list) : + BaseIterator(list) {} +}; + + #endif diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h index 1f4b03a..71a5973 100644 --- a/addon/doxmlparser/src/sectionhandler.h +++ b/addon/doxmlparser/src/sectionhandler.h @@ -26,13 +26,12 @@ class MainHandler; - class SectionIterator : - public BaseIterator + public BaseIterator { public: - SectionIterator(const QList &list) : - BaseIterator(list) {} + SectionIterator(const QList &list) : + BaseIterator(list) {} }; diff --git a/addon/doxmlparser/test/main.cpp b/addon/doxmlparser/test/main.cpp index 9c97db9..457d881 100644 --- a/addon/doxmlparser/test/main.cpp +++ b/addon/doxmlparser/test/main.cpp @@ -140,6 +140,10 @@ void DumpDoc(IDoc *doc) { IDocSimpleSect *ss = dynamic_cast(doc); ASSERT(ss!=0); + printf(" --- simplesect type=%s --- \n",ss->typeString().data()); + DumpDoc(ss->title()); + DumpDoc(ss->description()); + printf(" --- end simplesect --- \n"); } break; case IDoc::Title: @@ -158,8 +162,12 @@ void DumpDoc(IDoc *doc) break; case IDoc::Ref: { - IDocRef *ref = dynamic_cast(ref); + IDocRef *ref = dynamic_cast(doc); ASSERT(ref!=0); + printf(" ref=%p\n",ref); + printf(" --- ref id=%s text=%s --- \n", + ref->refId().data(),ref->text().data()); + printf(" --- end ref --- \n"); } break; case IDoc::VariableList: @@ -312,6 +320,43 @@ void DumpDoc(IDoc *doc) } } +void DumpGraph(IGraph *graph) +{ + if (graph==0) { printf(" --- no graph ---\n"); return; } + printf(" --- graph ----\n"); + INodeIterator *ni = graph->nodes(); + INode *node; + for (ni->toFirst();(node=ni->current());ni->toNext()) + { + printf(" --- node id=%s label=%s linkId=%s\n", + node->id().data(), + node->label().data(), + node->linkId().data() + ); + IChildNodeIterator *cni = node->children(); + IChildNode *cn; + for (cni->toFirst();(cn=cni->current());cni->toNext()) + { + printf(" + child id=%s label=%s relation=%s\n", + cn->node()->id().data(), + cn->node()->label().data(), + cn->relationString().data() + ); + IEdgeLabelIterator *eli = cn->edgeLabels(); + IEdgeLabel *el; + for (eli->toFirst();(el=eli->current());eli->toNext()) + { + printf(" edgeLabel=%s\n",el->label().data()); + } + eli->release(); + } + cni->release(); + } + ni->release(); + printf(" --- end graph ----\n"); + +} + int main(int argc,char **argv) { if (argc!=2) @@ -322,6 +367,8 @@ int main(int argc,char **argv) IDoxygen *dox = createObjectModel(); + dox->setDebugLevel(0); + if (!dox->readXMLDir(argv[1])) { printf("Error reading %s/index.xml\n",argv[1]); @@ -422,6 +469,41 @@ int main(int argc,char **argv) printf("===== detailed description ==== \n"); DumpDoc(doc); } + + if (comp->kind()==ICompound::Class) + { + IClass *cls = dynamic_cast(comp); + ASSERT(cls!=0); + + printf("==== inheritance graph ==== \n"); + DumpGraph(cls->inheritanceGraph()); + + printf("==== collabration graph ==== \n"); + DumpGraph(cls->collaborationGraph()); + + printf("==== base classes ==== \n"); + IRelatedCompoundIterator *bcli = cls->baseClasses(); + IRelatedCompound *bClass; + for (bcli->toFirst();(bClass=bcli->current());bcli->toNext()) + { + ICompound *bc = bClass->compound(); + printf(" + class %s\n",bc->name().data()); + bc->release(); + } + bcli->release(); + + printf("==== derived classes ==== \n"); + IRelatedCompoundIterator *dcli = cls->derivedClasses(); + IRelatedCompound *dClass; + for (dcli->toFirst();(dClass=dcli->current());dcli->toNext()) + { + ICompound *dc = dClass->compound(); + printf(" + class %s\n",dc->name().data()); + dc->release(); + } + dcli->release(); + } + comp->release(); } cli->release(); diff --git a/examples/enum.h b/examples/enum.h index 1586074..4c54fab 100644 --- a/examples/enum.h +++ b/examples/enum.h @@ -2,6 +2,13 @@ class Test { public: enum TEnum { Val1, Val2 }; + + /*! Another enum, with inline docs */ + enum AnotherEnum + { + V1, /*!< value 1 */ + V2 /*!< value 2 */ + }; }; /*! \class Test diff --git a/make.bat b/make.bat index 0cdf261..56fd9e0 100644 --- a/make.bat +++ b/make.bat @@ -30,6 +30,8 @@ type makeconfig > doc\Makefile type doc\Makefile.win_%MAKE%.in >>doc\Makefile type makeconfig > addon\doxywizard\Makefile type addon\doxywizard\Makefile.win_%MAKE%.in >>addon\doxywizard\Makefile +type makeconfig > addon\doxmlparser\src\Makefile +type addon\doxmlparser\src\Makefile.in >>addon\doxmlparser\src\Makefile REM build in release or debug mode REM sed is used to replace $extraopts by either debug or release while copying diff --git a/packages/rpm/doxygen.spec b/packages/rpm/doxygen.spec index 5f54655..60f7cf3 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.14_20020324 +Version: 1.2.15 Release: 1 Epoch: 1 Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz diff --git a/src/code.l b/src/code.l index 57bbff1..9d6f285 100644 --- a/src/code.l +++ b/src/code.l @@ -606,6 +606,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst) { src->addSourceReferences(dst); } + } static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *clNameLen=0) @@ -752,6 +753,22 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c // xmd->typeString(),xmd->argsString(), // xmd->getClassDef()->name().data()); + if (g_exampleBlock) + { + QCString anchor; + anchor.sprintf("a%d",g_anchorCount); + //printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(), + // g_exampleFile.data()); + if (xmd->addExample(anchor,g_exampleName,g_exampleFile)) + { + ol.pushGeneratorState(); + ol.disable(OutputGenerator::Latex); + ol.writeAnchor(0,anchor); + ol.popGeneratorState(); + g_anchorCount++; + } + } + g_theCallContext.setClass(stripClassName(xmd->typeString())); Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ? @@ -771,6 +788,7 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c xd->getOutputFileBase(),xmd->getBodyAnchor(),memName); return TRUE; } + } } @@ -1081,7 +1099,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" g_type.resize(0); g_name.resize(0); } -"}" { +"}" { g_theVarContext.popScope(); if (g_scopeStack.pop()==SCOPEBLOCK) @@ -1099,6 +1117,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" g_currentMemberDef=0; g_currentDefinition=0; } + BEGIN(Body); } ";" { g_code->codify(yytext); @@ -1629,7 +1648,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned" generateClassOrGlobalLink(*g_code,yytext); BEGIN( MemberCall2 ); } -("("{B}*("*"{B}*)*[a-z_A-Z][a-z_A-Z0-9]*{B}*")"{B}*)/("."|"->") { +("("{B}*("*"{B}*)+[a-z_A-Z][a-z_A-Z0-9]*{B}*")"{B}*)/("."|"->") { g_code->codify(yytext); int s=0;while (!isId(yytext[s])) s++; int e=yyleng-1;while (!isId(yytext[e])) e--; diff --git a/src/doxygen.cpp b/src/doxygen.cpp index b3ea9ae..0bbe32e 100644 --- a/src/doxygen.cpp +++ b/src/doxygen.cpp @@ -3077,7 +3077,8 @@ static void computeClassRelations() { findBaseClassesForClass(root,cd,cd,DocumentedOnly,FALSE); } - if ((cd==0 || !cd->hasDocumentation()) && bName.right(2)!="::") + if ((cd==0 || (!cd->hasDocumentation() && !cd->isReference())) && + bName.right(2)!="::") { if (!root->name.isEmpty() && root->name[0]!='@') warn_undoc( -- cgit v0.12