Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/addon/doxmlparser/src/mainhandler.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id:$
4 *
5 *
6 * Copyright (C) 1997-2006 by Dimitri van Heesch.
7 *
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation under the terms of the GNU General Public License is hereby
10 * granted. No representations are made about the suitability of this software
11 * for any purpose. It is provided "as is" without express or implied warranty.
12 * See the GNU General Public License for more details.
13 *
14 */
15
16#ifndef _MAINHANDLER_H
17#define _MAINHANDLER_H
18
19#include <qlist.h>
20
21#include <doxmlintf.h>
22#include "basehandler.h"
23
24class CompoundHandler;
25struct CompoundEntry;
26
27struct IndexEntry
28{
29 QString id;
30 QString name;
31};
32
33struct MemberEntry : public IndexEntry
34{
35 CompoundEntry *compound;
36};
37
38struct CompoundEntry : public IndexEntry
39{
40 CompoundEntry(int size) : memberDict(size)
41 { memberDict.setAutoDelete(TRUE); }
42 QDict<MemberEntry> memberDict;
43};
44
45class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
46{
47 public:
48 virtual void startCompound(const QXmlAttributes& attrib);
49 virtual void startMember(const QXmlAttributes& attrib);
50 virtual void endMember();
51 virtual void startName(const QXmlAttributes& attrib);
52 virtual void endName();
53 MainHandler();
54 virtual ~MainHandler();
55
56 // IDoxygen
57 ICompoundIterator *compounds() const;
58 ICompound *compoundById(const char *id) const;
59 virtual ICompound *compoundByName(const char *name) const;
60 virtual ICompound *memberById(const char *id) const;
61 virtual ICompoundIterator *memberByName(const char *name) const;
62
63 virtual void release();
64 void setDebugLevel(int level);
65 bool readXMLDir(const char *dirName);
66 void dump();
67 void unloadCompound(CompoundHandler *ch);
68
69 private:
70 CompoundEntry *m_curCompound;
71 MemberEntry *m_curMember;
72 QList<CompoundEntry> m_compounds;
73 QDict<CompoundEntry> m_compoundDict;
74 QDict<CompoundEntry> m_compoundNameDict;
75 QDict<MemberEntry> m_memberDict;
76 QDict<QList<CompoundEntry> > m_memberNameDict;
77 QString m_xmlDirName;
78 QDict<CompoundHandler> m_compoundsLoaded;
79 bool m_insideMember;
80};
81
82#endif
83

Archive Download this file

Revision: 1322