diff options
author | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-01-22 17:56:24 (GMT) |
---|---|---|
committer | dimitri <dimitri@afe2bf4a-e733-0410-8a33-86f594647bc7> | 2002-01-22 17:56:24 (GMT) |
commit | 0df9adf5f52c9d36bb430da927684c4353b00396 (patch) | |
tree | d15a4da33ccd88d9f7ebd50a6090a12c90ccbae4 /addon/doxmlparser/src/mainhandler.h | |
parent | a66e1ada3c7467e267ff39262178fa4577f0b6ab (diff) | |
download | Doxygen-0df9adf5f52c9d36bb430da927684c4353b00396.zip Doxygen-0df9adf5f52c9d36bb430da927684c4353b00396.tar.gz Doxygen-0df9adf5f52c9d36bb430da927684c4353b00396.tar.bz2 |
Doxygen-1.2.13-20020122
Diffstat (limited to 'addon/doxmlparser/src/mainhandler.h')
-rw-r--r-- | addon/doxmlparser/src/mainhandler.h | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h index e466b6f..da7fe75 100644 --- a/addon/doxmlparser/src/mainhandler.h +++ b/addon/doxmlparser/src/mainhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2001 by Dimitri van Heesch. + * 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 @@ -22,47 +22,60 @@ #include <doxmlintf.h> #include "memberhandler.h" +struct CompoundEntry; + +struct IndexEntry +{ + QString id; + QString name; +}; + +struct MemberEntry : public IndexEntry +{ + CompoundEntry *compound; +}; + +struct CompoundEntry : public IndexEntry +{ + CompoundEntry(int size) : memberDict(size) + { memberDict.setAutoDelete(TRUE); } + QDict<MemberEntry> memberDict; +}; + class MainHandler : public IDoxygen, public BaseHandler<MainHandler> { public: virtual void startCompound(const QXmlAttributes& attrib); + virtual void startMember(const QXmlAttributes& attrib); + virtual void endMember(); + virtual void startName(const QXmlAttributes& attrib); + virtual void endName(); MainHandler(); virtual ~MainHandler(); - ICompoundIterator *compounds() const - { - return new CompoundIterator(m_compounds); - } - ICompound *compoundById(const QString &id) const - { - return m_compoundDict[id]; - } - virtual ICompound *compoundByName(const QString &name) const - { - return name.isEmpty() ? 0 : m_compoundNameDict[name]; - } - virtual IMember *memberById(const QString &id) const - { - return m_memberDict[id]; - } - virtual IMemberIterator *memberByName(const QString &name) const - { - QList<IMember> *ml = m_memberNameDict[name]; - if (ml==0) return 0; - return new MemberIterator(*ml); - } - virtual void release() { delete this; } - void insertMemberById(const QString &id,IMember *h); - void insertMemberByName(const QString &name,IMember *h); + // IDoxygen + ICompoundIterator *compounds() const; + ICompound *compoundById(const QString &id) const; + virtual ICompound *compoundByName(const QString &name) const; + virtual ICompound *memberById(const QString &id) const; + virtual ICompoundIterator *memberByName(const QString &name) const; - void initialize(); + virtual void release(); + void setDebugLevel(int level); + bool readXMLDir(const char *dirName); + void dump(); + void unloadCompound(CompoundHandler *ch); private: - QList<ICompound> m_compounds; - QDict<ICompound> m_compoundDict; - QDict<ICompound> m_compoundNameDict; - QDict<IMember> m_memberDict; - QDict<QList<IMember> > m_memberNameDict; + CompoundEntry *m_curCompound; + MemberEntry *m_curMember; + QList<CompoundEntry> m_compounds; + QDict<CompoundEntry> m_compoundDict; + QDict<CompoundEntry> m_compoundNameDict; + QDict<MemberEntry> m_memberDict; + QDict<QList<CompoundEntry> > m_memberNameDict; + QString m_xmlDirName; + QDict<CompoundHandler> m_compoundsLoaded; }; #endif |