Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/namespacedef.h

Source at commit 1322 created 12 years 8 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: namespacedef.h,v 1.18 2001/03/19 19:27:41 root Exp $
4 *
5 * Copyright (C) 1997-2011 by Dimitri van Heesch.
6 *
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation under the terms of the GNU General Public License is hereby
9 * granted. No representations are made about the suitability of this software
10 * for any purpose. It is provided "as is" without express or implied warranty.
11 * See the GNU General Public License for more details.
12 *
13 * Documents produced by Doxygen are derivative works derived from the
14 * input used in their production; they are not affected by this license.
15 *
16 */
17
18#ifndef NAMESPACEDEF_H
19#define NAMESPACEDEF_H
20
21#include "qtbc.h"
22#include <qstrlist.h>
23#include <qdict.h>
24#include "sortdict.h"
25#include "definition.h"
26#include "memberlist.h"
27
28class ClassDef;
29class ClassList;
30class OutputList;
31class ClassSDict;
32class MemberDef;
33class NamespaceList;
34class MemberGroupSDict;
35class NamespaceSDict;
36
37class NamespaceDef : public Definition
38{
39 public:
40 NamespaceDef(const char *defFileName,int defLine,
41 const char *name,const char *ref=0,
42 const char *refFile=0);
43 ~NamespaceDef();
44 DefType definitionType() const { return TypeNamespace; }
45 QCString getOutputFileBase() const;
46 void insertUsedFile(const char *fname);
47
48 void writeDocumentation(OutputList &ol);
49 void writeMemberPages(OutputList &ol);
50 void writeQuickMemberLinks(OutputList &ol,MemberDef *currentMd) const;
51
52 void insertClass(ClassDef *cd);
53 void insertNamespace(NamespaceDef *nd);
54 void insertMember(MemberDef *md);
55
56 void computeAnchors();
57 int countMembers();
58 void addUsingDirective(NamespaceDef *nd);
59 NamespaceSDict *getUsedNamespaces() const;
60 void addUsingDeclaration(Definition *def);
61 SDict<Definition> *getUsedClasses() const { return usingDeclList; }
62 void combineUsingRelations();
63 QCString displayName() const;
64
65 bool isLinkableInProject() const;
66 bool isLinkable() const;
67 void addMembersToMemberGroup();
68 void distributeMemberGroupDocumentation();
69 void findSectionsInDocumentation();
70 void sortMemberLists();
71
72 virtual Definition *findInnerCompound(const char *name);
73 void addInnerCompound(Definition *d);
74 void addListReferences();
75
76 MemberList *getMemberList(MemberList::ListType lt) const;
77 const QList<MemberList> &getMemberLists() const { return m_memberLists; }
78 MemberDef *getMemberByName(const QCString &) const;
79
80 /*! Returns the user defined member groups */
81 MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
82
83 /*! Returns the classes contained in this namespace */
84 ClassSDict *getClassSDict() const { return classSDict; }
85
86 /*! Returns the namespaces contained in this namespace */
87 NamespaceSDict *getNamespaceSDict() const { return namespaceSDict; }
88
89 bool visited;
90
91 private:
92 MemberList *createMemberList(MemberList::ListType lt);
93 void addMemberToList(MemberList::ListType lt,MemberDef *md);
94 void writeMemberDeclarations(OutputList &ol,MemberList::ListType lt,const QCString &title);
95 void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);
96 void writeDetailedDescription(OutputList &ol,const QCString &title);
97 void writeBriefDescription(OutputList &ol);
98 void startMemberDeclarations(OutputList &ol);
99 void endMemberDeclarations(OutputList &ol);
100 void writeClassDeclarations(OutputList &ol,const QCString &title);
101 void writeNamespaceDeclarations(OutputList &ol,const QCString &title);
102 void writeMemberGroups(OutputList &ol);
103 void writeAuthorSection(OutputList &ol);
104 void startMemberDocumentation(OutputList &ol);
105 void endMemberDocumentation(OutputList &ol);
106 void writeSummaryLinks(OutputList &ol);
107
108 QCString fileName;
109 QStrList files;
110
111 NamespaceSDict *usingDirList;
112 SDict<Definition> *usingDeclList;
113 SDict<Definition> *m_innerCompounds;
114
115 MemberSDict *m_allMembersDict;
116 QList<MemberList> m_memberLists;
117 MemberGroupSDict *memberGroupSDict;
118 ClassSDict *classSDict;
119 NamespaceSDict *namespaceSDict;
120 bool m_subGrouping;
121 bool m_isCSharp;
122};
123
124class NamespaceList : public QList<NamespaceDef>
125{
126 public:
127 ~NamespaceList() {}
128 int compareItems(GCI item1,GCI item2)
129 {
130 return stricmp(((NamespaceDef *)item1)->name(),
131 ((NamespaceDef *)item2)->name()
132 );
133 }
134};
135
136class NamespaceListIterator : public QListIterator<NamespaceDef>
137{
138 public:
139 NamespaceListIterator(const NamespaceList &l) :
140 QListIterator<NamespaceDef>(l) {}
141};
142
143class NamespaceDict : public QDict<NamespaceDef>
144{
145 public:
146 NamespaceDict(int size) : QDict<NamespaceDef>(size) {}
147 ~NamespaceDict() {}
148};
149
150class NamespaceSDict : public SDict<NamespaceDef>
151{
152 public:
153 NamespaceSDict(int size=17) : SDict<NamespaceDef>(size) {}
154 ~NamespaceSDict() {}
155 int compareItems(GCI item1,GCI item2)
156 {
157 return stricmp(((NamespaceDef *)item1)->name(),
158 ((NamespaceDef *)item2)->name()
159 );
160 }
161 void writeDeclaration(OutputList &ol,const char *title,bool localName=FALSE);
162 bool declVisible() const;
163};
164
165
166
167#endif
168

Archive Download this file

Revision: 1322