fixed: compile issue
[opensg.git] / Support / doxygen / 01_custom_commands.patch
blob99e764fa20633dba42b672418cf74c45d1cd2346
1 commit c253dc0a7453cb606269dba6b1361d2610b88f84
2 Author: gerrit <gerrit@feynman.camtech.ntu.edu.sg>
3 Date: Mon Aug 9 15:32:39 2010 +0800
5 fixed: some changes to clean up the html version
7 diff --git a/src/classdef.cpp b/src/classdef.cpp
8 index 355763d..e1310d7 100644
9 --- a/src/classdef.cpp
10 +++ b/src/classdef.cpp
11 @@ -174,6 +174,9 @@ class ClassDefImpl
13 /** List of titles to use for the summary */
14 SDict<QCString> vhdlSummaryTitles;
16 + bool notInHierarchy;
17 + bool includeBaseDocs;
20 void ClassDefImpl::init(const char *defFileName, const char *name,
21 @@ -213,6 +216,9 @@ void ClassDefImpl::init(const char *defFileName, const char *name,
22 membersMerged = FALSE;
23 categoryOf = 0;
24 usedOnly = FALSE;
25 + notInHierarchy = false;
26 + includeBaseDocs = false;
28 //QCString ns;
29 //extractNamespaceName(name,className,ns);
30 //printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
31 @@ -2197,7 +2203,8 @@ bool ClassDef::isVisibleInHierarchy()
32 isReference()
33 ) &&
34 // is not part of an unnamed namespace or shown anyway
35 - (!m_impl->isStatic || extractStatic);
36 + (!m_impl->isStatic || extractStatic) &&
37 + (!m_impl->notInHierarchy);
40 bool ClassDef::hasDocumentation() const
41 @@ -2264,7 +2271,6 @@ void ClassDef::mergeMembers()
42 int sepLen = sep.length();
44 m_impl->membersMerged=TRUE;
45 - //printf(" mergeMembers for %s\n",name().data());
46 bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB" );
47 if (baseClasses())
49 @@ -2278,6 +2284,11 @@ void ClassDef::mergeMembers()
50 // merge the members in the base class of this inheritance branch first
51 bClass->mergeMembers();
53 + if(m_impl->includeBaseDocs == false)
54 + {
55 + continue;
56 + }
58 MemberNameInfoSDict *srcMnd = bClass->memberNameInfoSDict();
59 MemberNameInfoSDict *dstMnd = m_impl->allMemberNameInfoSDict;
61 @@ -2389,7 +2400,7 @@ void ClassDef::mergeMembers()
62 if (bcd->prot==Protected && prot==Public) prot=bcd->prot;
63 else if (bcd->prot==Private) prot=bcd->prot;
65 - if (inlineInheritedMembers)
66 + if (inlineInheritedMembers || m_impl->includeBaseDocs == true)
68 if (!isStandardFunc(srcMd))
70 @@ -2464,7 +2475,7 @@ void ClassDef::mergeMembers()
71 Specifier virt=mi->virt;
72 if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
74 - if (inlineInheritedMembers)
75 + if (inlineInheritedMembers || m_impl->includeBaseDocs == true)
77 if (!isStandardFunc(mi->memberDef))
79 @@ -3527,6 +3538,16 @@ bool ClassDef::isUsedOnly() const
80 return m_impl->usedOnly;
83 +void ClassDef::setNotInHierarchy(bool b)
85 + m_impl->notInHierarchy = b;
88 +void ClassDef::setIncludeBaseDocs(bool b)
90 + m_impl->includeBaseDocs = b;
93 void ClassDef::reclassifyMember(MemberDef *md,MemberDef::MemberType t)
95 md->setMemberType(t);
96 diff --git a/src/classdef.h b/src/classdef.h
97 index cd5cfdc..488a9bc 100644
98 --- a/src/classdef.h
99 +++ b/src/classdef.h
100 @@ -298,6 +298,9 @@ class ClassDef : public Definition
101 void setCategoryOf(ClassDef *cd);
102 void setUsedOnly(bool b);
104 + void setNotInHierarchy (bool b);
105 + void setIncludeBaseDocs(bool b);
107 //-----------------------------------------------------------------------------------
108 // --- actions ----
109 //-----------------------------------------------------------------------------------
110 diff --git a/src/doxygen.cpp b/src/doxygen.cpp
111 index 124c980..3cc4902 100644
112 --- a/src/doxygen.cpp
113 +++ b/src/doxygen.cpp
114 @@ -1181,11 +1181,12 @@ static void addClassToContext(EntryNav *rootNav)
115 // see if the class is found inside a namespace
116 //bool found=addNamespace(root,cd);
118 + cd->setNotInHierarchy (root->notInHierarchy);
119 + cd->setIncludeBaseDocs(root->includeBaseDocs);
121 // the empty string test is needed for extract all case
122 cd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
123 cd->insertUsedFile(root->fileName);
125 // add class to the list
126 //printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
127 Doxygen::classSDict->append(fullName,cd);
128 @@ -7359,7 +7360,7 @@ static void generateClassList(ClassSDict &classSDict)
129 // template instances
130 if ( cd->isLinkableInProject() && cd->templateMaster()==0)
132 - msg("Generating docs for compound %s...\n",cd->name().data());
133 + msg("Generating docs for compound 1 %s...\n",cd->name().data());
135 cd->writeDocumentation(*g_outputList);
136 cd->writeMemberList(*g_outputList);
137 @@ -8293,7 +8294,7 @@ static void generateNamespaceDocs()
138 && !cd->isHidden()
141 - msg("Generating docs for compound %s...\n",cd->name().data());
142 + msg("Generating docs for compound 2 %s...\n",cd->name().data());
144 cd->writeDocumentation(*g_outputList);
145 cd->writeMemberList(*g_outputList);
146 diff --git a/src/entry.cpp b/src/entry.cpp
147 index 2bde394..52d755c 100644
148 --- a/src/entry.cpp
149 +++ b/src/entry.cpp
150 @@ -72,6 +72,8 @@ Entry::Entry()
151 relatesType = Simple;
152 hidden = FALSE;
153 groupDocType = GROUPDOC_NORMAL;
154 + notInHierarchy = false;
155 + includeBaseDocs = false;
156 reset();
159 @@ -153,6 +155,9 @@ Entry::Entry(const Entry &e)
160 m_sublist = new QList<Entry>;
161 m_sublist->setAutoDelete(TRUE);
163 + notInHierarchy = e.notInHierarchy;
164 + includeBaseDocs = e.includeBaseDocs;
166 // deep copy of the child entry list
167 QListIterator<Entry> eli(*e.m_sublist);
168 Entry *cur;
169 @@ -290,6 +295,9 @@ void Entry::reset()
170 subGrouping = TRUE;
171 protection = Public;
172 groupDocType = GROUPDOC_NORMAL;
173 + notInHierarchy = false;
174 + includeBaseDocs = false;
176 m_sublist->clear();
177 extends->clear();
178 groups->clear();
179 diff --git a/src/entry.h b/src/entry.h
180 index 6460fec..8f23979 100644
181 --- a/src/entry.h
182 +++ b/src/entry.h
183 @@ -363,6 +363,9 @@ class Entry
184 bool artificial; //!< Artificially introduced item
185 GroupDocType groupDocType;
187 + bool notInHierarchy;
188 + bool includeBaseDocs;
190 static int num; //!< counts the total number of entries
192 /// return the command name used to define GROUPDOC_SEC
193 diff --git a/src/marshal.cpp b/src/marshal.cpp
194 index 4f01aa4..2a58bb2 100644
195 --- a/src/marshal.cpp
196 +++ b/src/marshal.cpp
197 @@ -414,6 +414,8 @@ void marshalEntry(StorageIntf *s,Entry *e)
198 marshalBool(s,e->hidden);
199 marshalBool(s,e->artificial);
200 marshalInt(s,(int)e->groupDocType);
201 + marshalBool(s, e->notInHierarchy);
202 + marshalBool(s, e->includeBaseDocs);
205 void marshalEntryTree(StorageIntf *s,Entry *e)
206 @@ -810,6 +812,8 @@ Entry * unmarshalEntry(StorageIntf *s)
207 e->hidden = unmarshalBool(s);
208 e->artificial = unmarshalBool(s);
209 e->groupDocType = (Entry::GroupDocType)unmarshalInt(s);
210 + e->notInHierarchy = unmarshalBool(s);
211 + e->includeBaseDocs = unmarshalBool(s);
212 return e;
215 diff --git a/src/memberlist.cpp b/src/memberlist.cpp
216 index 8aeb42a..d11d225 100644
217 --- a/src/memberlist.cpp
218 +++ b/src/memberlist.cpp
219 @@ -267,8 +267,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
220 MemberListIterator mli(*this);
221 for ( ; (md=mli.current()); ++mli )
223 - //printf(">>> Member `%s' type=%d visible=%d\n",
224 - // md->name().data(),md->memberType(),md->isBriefSectionVisible());
225 +// printf(">>> Member `%s' type=%d visible=%d\n",
226 +// md->name().data(),md->memberType(),md->isBriefSectionVisible());
227 if (md->isBriefSectionVisible())
229 switch(md->memberType())
230 diff --git a/src/scanner.l b/src/scanner.l
231 index 2fdf0f2..cbb46c4 100644
232 --- a/src/scanner.l
233 +++ b/src/scanner.l
234 @@ -5338,6 +5338,8 @@ TYPEDEFPREFIX (("typedef"{BN}+)?)((("volatile"|"const"){BN}+)?)
235 REJECT;
238 +<DocBlock>{CMD}("nohierarchy") { current->notInHierarchy = true; }
239 +<DocBlock>{CMD}("includebasedoc") { current->includeBaseDocs = true; }
240 <DocBlock>[^@*\/\\\n]+ { // any character that isn't special
241 docBlock+=yytext;
243 diff --git a/src/util.cpp b/src/util.cpp
244 index d61361c..76af586 100644
245 --- a/src/util.cpp
246 +++ b/src/util.cpp
247 @@ -1779,7 +1779,7 @@ void linkifyText(const TextGeneratorIntf &out,Definition *scope,
249 if (txtStr.at(i)=='"') insideString=!insideString;
252 + autoBreak = false;
253 //printf("floatingIndex=%d strlen=%d autoBreak=%d\n",floatingIndex,strLen,autoBreak);
254 if (strLen>35 && floatingIndex>30 && autoBreak) // try to insert a split point