]>
Commit | Line | Data |
---|---|---|
74d856f7 KK |
1 | commit 55d07c7f2ca8c96a8a3ebf154d9f398e8672fd66 |
2 | Author: Kacper Kornet <draenog@pld-linux.org> | |
3 | Date: Wed Apr 2 04:57:38 2014 +0100 | |
4 | ||
5 | Revert commit " Template and context enhancements" | |
6 | ||
7 | Revert commit breaking tex files generated for struct with embedded unions. | |
8 | ||
9 | This reverts commit c5ec90d1780c95cd699225ff16627e96f993b179. | |
10 | ||
11 | diff --git a/src/classdef.cpp b/src/classdef.cpp | |
12 | index 6404431..53eabc2 100644 | |
13 | --- a/src/classdef.cpp | |
14 | +++ b/src/classdef.cpp | |
15 | @@ -337,14 +337,7 @@ QCString ClassDef::displayName(bool includeScope) const | |
16 | // n = n.left(n.length()-2); | |
17 | //} | |
18 | //printf("ClassDef::displayName()=%s\n",n.data()); | |
19 | - if (n.find('@')!=-1) | |
20 | - { | |
21 | - return removeAnonymousScopes(n); | |
22 | - } | |
23 | - else | |
24 | - { | |
25 | - return n; | |
26 | - } | |
27 | + return n; | |
28 | } | |
29 | ||
30 | // inserts a base/super class in the inheritance list | |
31 | @@ -1549,7 +1542,7 @@ void ClassDef::writeSummaryLinks(OutputList &ol) | |
32 | MemberList * ml = getMemberList(lmd->type); | |
33 | if (ml && ml->declVisible()) | |
34 | { | |
35 | - ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first); | |
36 | + ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first); | |
37 | first=FALSE; | |
38 | } | |
39 | } | |
40 | @@ -2533,14 +2526,23 @@ bool ClassDef::hasNonReferenceSuperClass() | |
41 | void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup, | |
42 | ClassDef *inheritedFrom,const char *inheritId) | |
43 | { | |
44 | + //ol.insertMemberAlign(); | |
45 | //printf("ClassName=`%s' inGroup=%d\n",name().data(),inGroup); | |
46 | ||
47 | + //if (inGroup && md && md->getClassDef()==this) return; | |
48 | + | |
49 | ol.docify(compoundTypeString()); | |
50 | - QCString cn = displayName(FALSE); | |
51 | - if (!cn.isEmpty()) | |
52 | + int ri=name().findRev("::"); | |
53 | + if (ri==-1) ri=name().length(); | |
54 | + QCString cn=name().right(name().length()-ri-2); | |
55 | + if (!cn.isEmpty() && cn.at(0)!='@' && md) | |
56 | { | |
57 | + if (cn.right(2)=="-p" /*|| cn.right(2)=="-g"*/) | |
58 | + { | |
59 | + cn = cn.left(cn.length()-2); | |
60 | + } | |
61 | ol.docify(" "); | |
62 | - if (md && isLinkable()) | |
63 | + if (isLinkable()) | |
64 | { | |
65 | ol.writeObjectLink(0,0,md->anchor(),cn); | |
66 | } | |
67 | @@ -3927,6 +3929,196 @@ void ClassDef::sortMemberLists() | |
68 | } | |
69 | } | |
70 | ||
71 | + | |
72 | +/** Computes for a given list type \a inListType, which are the | |
73 | + * the corresponding list type(s) in the base class that are to be | |
74 | + * added to this list. | |
75 | + * | |
76 | + * So for public inheritance, the mapping is 1-1, so outListType1=inListType | |
77 | + * Private members are to be hidden completely. | |
78 | + * | |
79 | + * For protected inheritance, both protected and public members of the | |
80 | + * base class should be joined in the protected member section. | |
81 | + * | |
82 | + * For private inheritance, both protected and public members of the | |
83 | + * base class should be joined in the private member section. | |
84 | + */ | |
85 | +static void convertProtectionLevel( | |
86 | + MemberListType inListType, | |
87 | + Protection inProt, | |
88 | + int *outListType1, | |
89 | + int *outListType2 | |
90 | + ) | |
91 | +{ | |
92 | + static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); | |
93 | + // default representing 1-1 mapping | |
94 | + *outListType1=inListType; | |
95 | + *outListType2=-1; | |
96 | + if (inProt==Public) | |
97 | + { | |
98 | + switch (inListType) // in the private section of the derived class, | |
99 | + // the private section of the base class should not | |
100 | + // be visible | |
101 | + { | |
102 | + case MemberListType_priMethods: | |
103 | + case MemberListType_priStaticMethods: | |
104 | + case MemberListType_priSlots: | |
105 | + case MemberListType_priAttribs: | |
106 | + case MemberListType_priStaticAttribs: | |
107 | + case MemberListType_priTypes: | |
108 | + *outListType1=-1; | |
109 | + *outListType2=-1; | |
110 | + break; | |
111 | + default: | |
112 | + break; | |
113 | + } | |
114 | + } | |
115 | + else if (inProt==Protected) // Protected inheritance | |
116 | + { | |
117 | + switch (inListType) // in the protected section of the derived class, | |
118 | + // both the public and protected members are shown | |
119 | + // as protected | |
120 | + { | |
121 | + case MemberListType_pubMethods: | |
122 | + case MemberListType_pubStaticMethods: | |
123 | + case MemberListType_pubSlots: | |
124 | + case MemberListType_pubAttribs: | |
125 | + case MemberListType_pubStaticAttribs: | |
126 | + case MemberListType_pubTypes: | |
127 | + case MemberListType_priMethods: | |
128 | + case MemberListType_priStaticMethods: | |
129 | + case MemberListType_priSlots: | |
130 | + case MemberListType_priAttribs: | |
131 | + case MemberListType_priStaticAttribs: | |
132 | + case MemberListType_priTypes: | |
133 | + *outListType1=-1; | |
134 | + *outListType2=-1; | |
135 | + break; | |
136 | + | |
137 | + case MemberListType_proMethods: | |
138 | + *outListType2=MemberListType_pubMethods; | |
139 | + break; | |
140 | + case MemberListType_proStaticMethods: | |
141 | + *outListType2=MemberListType_pubStaticMethods; | |
142 | + break; | |
143 | + case MemberListType_proSlots: | |
144 | + *outListType2=MemberListType_pubSlots; | |
145 | + break; | |
146 | + case MemberListType_proAttribs: | |
147 | + *outListType2=MemberListType_pubAttribs; | |
148 | + break; | |
149 | + case MemberListType_proStaticAttribs: | |
150 | + *outListType2=MemberListType_pubStaticAttribs; | |
151 | + break; | |
152 | + case MemberListType_proTypes: | |
153 | + *outListType2=MemberListType_pubTypes; | |
154 | + break; | |
155 | + default: | |
156 | + break; | |
157 | + } | |
158 | + } | |
159 | + else if (inProt==Private) | |
160 | + { | |
161 | + switch (inListType) // in the private section of the derived class, | |
162 | + // both the public and protected members are shown | |
163 | + // as private | |
164 | + { | |
165 | + case MemberListType_pubMethods: | |
166 | + case MemberListType_pubStaticMethods: | |
167 | + case MemberListType_pubSlots: | |
168 | + case MemberListType_pubAttribs: | |
169 | + case MemberListType_pubStaticAttribs: | |
170 | + case MemberListType_pubTypes: | |
171 | + case MemberListType_proMethods: | |
172 | + case MemberListType_proStaticMethods: | |
173 | + case MemberListType_proSlots: | |
174 | + case MemberListType_proAttribs: | |
175 | + case MemberListType_proStaticAttribs: | |
176 | + case MemberListType_proTypes: | |
177 | + *outListType1=-1; | |
178 | + *outListType2=-1; | |
179 | + break; | |
180 | + | |
181 | + case MemberListType_priMethods: | |
182 | + if (extractPrivate) | |
183 | + { | |
184 | + *outListType1=MemberListType_pubMethods; | |
185 | + *outListType2=MemberListType_proMethods; | |
186 | + } | |
187 | + else | |
188 | + { | |
189 | + *outListType1=-1; | |
190 | + *outListType2=-1; | |
191 | + } | |
192 | + break; | |
193 | + case MemberListType_priStaticMethods: | |
194 | + if (extractPrivate) | |
195 | + { | |
196 | + *outListType1=MemberListType_pubStaticMethods; | |
197 | + *outListType2=MemberListType_proStaticMethods; | |
198 | + } | |
199 | + else | |
200 | + { | |
201 | + *outListType1=-1; | |
202 | + *outListType2=-1; | |
203 | + } | |
204 | + break; | |
205 | + case MemberListType_priSlots: | |
206 | + if (extractPrivate) | |
207 | + { | |
208 | + *outListType1=MemberListType_pubSlots; | |
209 | + *outListType1=MemberListType_proSlots; | |
210 | + } | |
211 | + else | |
212 | + { | |
213 | + *outListType1=-1; | |
214 | + *outListType2=-1; | |
215 | + } | |
216 | + break; | |
217 | + case MemberListType_priAttribs: | |
218 | + if (extractPrivate) | |
219 | + { | |
220 | + *outListType1=MemberListType_pubAttribs; | |
221 | + *outListType2=MemberListType_proAttribs; | |
222 | + } | |
223 | + else | |
224 | + { | |
225 | + *outListType1=-1; | |
226 | + *outListType2=-1; | |
227 | + } | |
228 | + break; | |
229 | + case MemberListType_priStaticAttribs: | |
230 | + if (extractPrivate) | |
231 | + { | |
232 | + *outListType1=MemberListType_pubStaticAttribs; | |
233 | + *outListType2=MemberListType_proStaticAttribs; | |
234 | + } | |
235 | + else | |
236 | + { | |
237 | + *outListType1=-1; | |
238 | + *outListType2=-1; | |
239 | + } | |
240 | + break; | |
241 | + case MemberListType_priTypes: | |
242 | + if (extractPrivate) | |
243 | + { | |
244 | + *outListType1=MemberListType_pubTypes; | |
245 | + *outListType2=MemberListType_proTypes; | |
246 | + } | |
247 | + else | |
248 | + { | |
249 | + *outListType1=-1; | |
250 | + *outListType2=-1; | |
251 | + } | |
252 | + break; | |
253 | + default: | |
254 | + break; | |
255 | + } | |
256 | + } | |
257 | + //printf("convertProtectionLevel(type=%d prot=%d): %d,%d\n", | |
258 | + // inListType,inProt,*outListType1,*outListType2); | |
259 | +} | |
260 | + | |
261 | int ClassDef::countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom, | |
262 | int lt2,bool invert,bool showAlways,QPtrDict<void> *visitedClasses) | |
263 | { | |
264 | @@ -3965,7 +4157,7 @@ int ClassDef::countInheritedDecMembers(MemberListType lt, | |
265 | QPtrDict<void> *visitedClasses) | |
266 | { | |
267 | int inhCount = 0; | |
268 | - int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE); | |
269 | + int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0; | |
270 | bool process = count>0; | |
271 | //printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n", | |
272 | // name().data(),lt,process,count,invert); | |
273 | @@ -4105,7 +4297,7 @@ void ClassDef::writeInheritedMemberDeclarations(OutputList &ol, | |
274 | { | |
275 | ol.pushGeneratorState(); | |
276 | ol.disableAllBut(OutputGenerator::Html); | |
277 | - int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE); | |
278 | + int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE)>0; | |
279 | bool process = count>0; | |
280 | //printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d always=%d\n", | |
281 | // name().data(),lt,process,invert,showAlways); | |
282 | diff --git a/src/context.cpp b/src/context.cpp | |
283 | index e573dde..7e14c8b 100644 | |
284 | --- a/src/context.cpp | |
285 | +++ b/src/context.cpp | |
286 | @@ -22,10 +22,6 @@ | |
287 | #include "example.h" | |
288 | #include "membername.h" | |
289 | #include "parserintf.h" | |
290 | -#include "portable.h" | |
291 | - | |
292 | -// TODO: pass the current file to Dot*::writeGraph, so the user can put dot graphs in other | |
293 | -// files as well | |
294 | ||
295 | struct ContextGlobals | |
296 | { | |
297 | @@ -65,7 +61,7 @@ template<class T> class ScopedPtr | |
298 | void reset(T *p=0) { if (p!=m_ptr) { delete m_ptr; m_ptr = p; } } | |
299 | }; | |
300 | ||
301 | -/** @brief Template List iterator support */ | |
302 | +// iterator support | |
303 | template<class T> | |
304 | class GenericConstIterator : public TemplateListIntf::ConstIterator | |
305 | { | |
306 | @@ -108,7 +104,7 @@ class GenericConstIterator : public TemplateListIntf::ConstIterator | |
307 | ||
308 | //------------------------------------------------------------------------ | |
309 | ||
310 | -/** @brief standard template list implementation */ | |
311 | +// standard list implementation | |
312 | template<class T> | |
313 | class GenericNodeListContext : public TemplateListIntf | |
314 | { | |
315 | @@ -341,7 +337,7 @@ class TranslateContext::Private : public PropertyMapper | |
316 | } | |
317 | else | |
318 | { | |
319 | - err("tr.generateAt should take two arguments, got %d!\n",args.count()); | |
320 | + err("tr.generateAt should take two parameters, got %d!\n",args.count()); | |
321 | } | |
322 | return TemplateVariant(); | |
323 | } | |
324 | @@ -353,7 +349,7 @@ class TranslateContext::Private : public PropertyMapper | |
325 | } | |
326 | else | |
327 | { | |
328 | - err("tr.inheritanceDiagramFor should take one argument, got %d!\n",args.count()); | |
329 | + err("tr.inheritanceDiagramFor should take one parameter, got %d!\n",args.count()); | |
330 | } | |
331 | return TemplateVariant(); | |
332 | } | |
333 | @@ -365,7 +361,7 @@ class TranslateContext::Private : public PropertyMapper | |
334 | } | |
335 | else | |
336 | { | |
337 | - err("tr.collaborationDiagramFor should take one argument, got %d!\n",args.count()); | |
338 | + err("tr.collaborationDiagramFor should take one parameter, got %d!\n",args.count()); | |
339 | } | |
340 | return TemplateVariant(); | |
341 | } | |
342 | @@ -377,7 +373,7 @@ class TranslateContext::Private : public PropertyMapper | |
343 | } | |
344 | else | |
345 | { | |
346 | - err("tr.inheritsList should take one integer argument, got %d!\n",args.count()); | |
347 | + err("tr.inheritsList should take one integer parameter, got %d!\n",args.count()); | |
348 | } | |
349 | return TemplateVariant(); | |
350 | } | |
351 | @@ -389,7 +385,7 @@ class TranslateContext::Private : public PropertyMapper | |
352 | } | |
353 | else | |
354 | { | |
355 | - err("tr.inheritedByList should take one integer argument, got %d!\n",args.count()); | |
356 | + err("tr.inheritedByList should take one integer parameter, got %d!\n",args.count()); | |
357 | } | |
358 | return TemplateVariant(); | |
359 | } | |
360 | @@ -401,7 +397,7 @@ class TranslateContext::Private : public PropertyMapper | |
361 | } | |
362 | else | |
363 | { | |
364 | - err("tr.*List should take one integer argument, got %d!\n",args.count()); | |
365 | + err("tr.*List should take one integer parameter, got %d!\n",args.count()); | |
366 | } | |
367 | return TemplateVariant(); | |
368 | } | |
369 | @@ -413,7 +409,7 @@ class TranslateContext::Private : public PropertyMapper | |
370 | } | |
371 | else | |
372 | { | |
373 | - err("tr.implementedBy should take one integer argument, got %d!\n",args.count()); | |
374 | + err("tr.implementedBy should take one integer parameter, got %d!\n",args.count()); | |
375 | } | |
376 | return TemplateVariant(); | |
377 | } | |
378 | @@ -425,7 +421,7 @@ class TranslateContext::Private : public PropertyMapper | |
379 | } | |
380 | else | |
381 | { | |
382 | - err("tr.reimplementedBy should take one integer argument, got %d!\n",args.count()); | |
383 | + err("tr.reimplementedBy should take one integer parameter, got %d!\n",args.count()); | |
384 | } | |
385 | return TemplateVariant(); | |
386 | } | |
387 | @@ -437,7 +433,7 @@ class TranslateContext::Private : public PropertyMapper | |
388 | } | |
389 | else | |
390 | { | |
391 | - err("tr.sourceRefs should take one integer argument, got %d\n",args.count()); | |
392 | + err("tr.sourceRefs should take one integer parameter, got %d\n",args.count()); | |
393 | } | |
394 | return TemplateVariant(); | |
395 | } | |
396 | @@ -449,7 +445,7 @@ class TranslateContext::Private : public PropertyMapper | |
397 | } | |
398 | else | |
399 | { | |
400 | - err("tr.sourceRefBys should take one integer argument, got %d\n",args.count()); | |
401 | + err("tr.sourceRefBys should take one integer parameter, got %d\n",args.count()); | |
402 | } | |
403 | return TemplateVariant(); | |
404 | } | |
405 | @@ -661,14 +657,6 @@ class TranslateContext::Private : public PropertyMapper | |
406 | { | |
407 | return theTranslator->trCallerGraph(); | |
408 | } | |
409 | - TemplateVariant inheritedFrom() const | |
410 | - { | |
411 | - return theTranslator->trInheritedFrom("@0","@1"); | |
412 | - } | |
413 | - TemplateVariant additionalInheritedMembers() const | |
414 | - { | |
415 | - return theTranslator->trAdditionalInheritedMembers(); | |
416 | - } | |
417 | Private() | |
418 | { | |
419 | //%% string generatedBy | |
420 | @@ -757,10 +745,6 @@ class TranslateContext::Private : public PropertyMapper | |
421 | addProperty("callGraph", this,&Private::callGraph); | |
422 | //%% string callerGraph | |
423 | addProperty("callerGraph", this,&Private::callerGraph); | |
424 | - //%% markerstring inheritedFrom | |
425 | - addProperty("inheritedFrom", this,&Private::inheritedFrom); | |
426 | - //%% string addtionalInheritedMembers | |
427 | - addProperty("additionalInheritedMembers",this,&Private::additionalInheritedMembers); | |
428 | ||
429 | m_javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA"); | |
430 | m_fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN"); | |
431 | @@ -861,8 +845,6 @@ class DefinitionContext : public PropertyMapper | |
432 | addProperty("language",this,&DefinitionContext::language); | |
433 | //%% string sourceDef: A link to the source definition | |
434 | addProperty("sourceDef",this,&DefinitionContext::sourceDef); | |
435 | - //%% list[Definition] navigationPath: Breadcrumb navigation path to this item | |
436 | - addProperty("navigationPath",this,&DefinitionContext::navigationPath); | |
437 | ||
438 | if (m_def && !m_def->getSourceFileBase().isEmpty()) | |
439 | { | |
440 | @@ -1006,43 +988,14 @@ class DefinitionContext : public PropertyMapper | |
441 | return FALSE; | |
442 | } | |
443 | } | |
444 | - void fillPath(Definition *def,TemplateList *list) const | |
445 | - { | |
446 | - Definition *outerScope = def->getOuterScope(); | |
447 | - Definition::DefType type = def->definitionType(); | |
448 | - if (outerScope && outerScope!=Doxygen::globalScope) | |
449 | - { | |
450 | - fillPath(outerScope,list); | |
451 | - } | |
452 | - else if (type==Definition::TypeFile && ((const FileDef*)def)->getDirDef()) | |
453 | - { | |
454 | - fillPath(((const FileDef*)def)->getDirDef(),list); | |
455 | - } | |
456 | - NavPathElemContext *elem = new NavPathElemContext(def); | |
457 | - list->append(elem); | |
458 | - m_cache.navPathElems.append(elem); | |
459 | - } | |
460 | - TemplateVariant navigationPath() const | |
461 | - { | |
462 | - if (!m_cache.navPath) | |
463 | - { | |
464 | - TemplateList *list = new TemplateList; | |
465 | - fillPath(m_def,list); | |
466 | - m_cache.navPath.reset(list); | |
467 | - } | |
468 | - return m_cache.navPath.get(); | |
469 | - } | |
470 | ||
471 | private: | |
472 | Definition *m_def; | |
473 | struct Cachable | |
474 | { | |
475 | - Cachable() { navPathElems.setAutoDelete(TRUE); } | |
476 | ScopedPtr<TemplateVariant> details; | |
477 | ScopedPtr<TemplateVariant> brief; | |
478 | ScopedPtr<TemplateVariant> inbodyDocs; | |
479 | - ScopedPtr<TemplateList> navPath; | |
480 | - QList<NavPathElemContext> navPathElems; | |
481 | }; | |
482 | mutable Cachable m_cache; | |
483 | TemplateList m_sourceDef; | |
484 | @@ -1187,11 +1140,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
485 | addProperty("templateDecls", this,&Private::templateDecls); | |
486 | addProperty("typeConstraints", this,&Private::typeConstraints); | |
487 | addProperty("examples", this,&Private::examples); | |
488 | - addProperty("members", this,&Private::members); | |
489 | addProperty("allMembersList", this,&Private::allMembersList); | |
490 | addProperty("allMembersFileName", this,&Private::allMembersFileName); | |
491 | addProperty("memberGroups", this,&Private::memberGroups); | |
492 | - addProperty("additionalInheritedMembers",this,&Private::additionalInheritedMembers); | |
493 | } | |
494 | TemplateVariant title() const | |
495 | { | |
496 | @@ -1262,7 +1213,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
497 | FTextStream t(&result); | |
498 | cg->writeGraph(t,BITMAP, | |
499 | g_globals.outputDir, | |
500 | - g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
501 | + m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
502 | relPathAsString(),TRUE,TRUE,g_globals.dynSectionId | |
503 | ); | |
504 | } | |
505 | @@ -1307,7 +1258,7 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
506 | FTextStream t(&result); | |
507 | cg->writeGraph(t,BITMAP, | |
508 | g_globals.outputDir, | |
509 | - g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
510 | + m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
511 | relPathAsString(),TRUE,TRUE,g_globals.dynSectionId | |
512 | ); | |
513 | } | |
514 | @@ -1347,14 +1298,14 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
515 | return m_cache.inheritedByList.get(); | |
516 | } | |
517 | TemplateVariant getMemberList(ScopedPtr<MemberListInfoContext> &list, | |
518 | - MemberListType type,const char *title,bool detailed=FALSE) const | |
519 | + MemberListType type,const char *title) const | |
520 | { | |
521 | if (!list) | |
522 | { | |
523 | MemberList *ml = m_classDef->getMemberList(type); | |
524 | if (ml) | |
525 | { | |
526 | - list.reset(new MemberListInfoContext(m_classDef,relPathAsString(),ml,title,detailed)); | |
527 | + list.reset(new MemberListInfoContext(m_classDef,relPathAsString(),ml,title)); | |
528 | } | |
529 | } | |
530 | if (list) | |
531 | @@ -1492,43 +1443,43 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
532 | } | |
533 | TemplateVariant detailedTypedefs() const | |
534 | { | |
535 | - return getMemberList(m_cache.detailedTypedefs,MemberListType_typedefMembers,theTranslator->trMemberTypedefDocumentation(),TRUE); | |
536 | + return getMemberList(m_cache.detailedTypedefs,MemberListType_typedefMembers,theTranslator->trMemberTypedefDocumentation()); | |
537 | } | |
538 | TemplateVariant detailedEnums() const | |
539 | { | |
540 | - return getMemberList(m_cache.detailedEnums,MemberListType_enumMembers,theTranslator->trMemberEnumerationDocumentation(),TRUE); | |
541 | + return getMemberList(m_cache.detailedEnums,MemberListType_enumMembers,theTranslator->trMemberEnumerationDocumentation()); | |
542 | } | |
543 | TemplateVariant detailedServices() const | |
544 | { | |
545 | - return getMemberList(m_cache.detailedServices,MemberListType_serviceMembers,theTranslator->trServices(),TRUE); | |
546 | + return getMemberList(m_cache.detailedServices,MemberListType_serviceMembers,theTranslator->trServices()); | |
547 | } | |
548 | TemplateVariant detailedInterfaces() const | |
549 | { | |
550 | - return getMemberList(m_cache.detailedInterfaces,MemberListType_interfaceMembers,theTranslator->trInterfaces(),TRUE); | |
551 | + return getMemberList(m_cache.detailedInterfaces,MemberListType_interfaceMembers,theTranslator->trInterfaces()); | |
552 | } | |
553 | TemplateVariant detailedConstructors() const | |
554 | { | |
555 | - return getMemberList(m_cache.detailedConstructors,MemberListType_constructors,theTranslator->trConstructorDocumentation(),TRUE); | |
556 | + return getMemberList(m_cache.detailedConstructors,MemberListType_constructors,theTranslator->trConstructorDocumentation()); | |
557 | } | |
558 | TemplateVariant detailedMethods() const | |
559 | { | |
560 | - return getMemberList(m_cache.detailedMethods,MemberListType_functionMembers,theTranslator->trMemberFunctionDocumentation(),TRUE); | |
561 | + return getMemberList(m_cache.detailedMethods,MemberListType_functionMembers,theTranslator->trMemberFunctionDocumentation()); | |
562 | } | |
563 | TemplateVariant detailedRelated() const | |
564 | { | |
565 | - return getMemberList(m_cache.detailedRelated,MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation(),TRUE); | |
566 | + return getMemberList(m_cache.detailedRelated,MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation()); | |
567 | } | |
568 | TemplateVariant detailedVariables() const | |
569 | { | |
570 | - return getMemberList(m_cache.detailedVariables,MemberListType_variableMembers,theTranslator->trMemberDataDocumentation(),TRUE); | |
571 | + return getMemberList(m_cache.detailedVariables,MemberListType_variableMembers,theTranslator->trMemberDataDocumentation()); | |
572 | } | |
573 | TemplateVariant detailedProperties() const | |
574 | { | |
575 | - return getMemberList(m_cache.detailedProperties,MemberListType_propertyMembers,theTranslator->trPropertyDocumentation(),TRUE); | |
576 | + return getMemberList(m_cache.detailedProperties,MemberListType_propertyMembers,theTranslator->trPropertyDocumentation()); | |
577 | } | |
578 | TemplateVariant detailedEvents() const | |
579 | { | |
580 | - return getMemberList(m_cache.detailedEvents,MemberListType_eventMembers,theTranslator->trEventDocumentation(),TRUE); | |
581 | + return getMemberList(m_cache.detailedEvents,MemberListType_eventMembers,theTranslator->trEventDocumentation()); | |
582 | } | |
583 | TemplateVariant nestedClasses() const | |
584 | { | |
585 | @@ -1633,59 +1584,6 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
586 | } | |
587 | return m_cache.examples.get(); | |
588 | } | |
589 | - void addMembers(ClassDef *cd,MemberListType lt) const | |
590 | - { | |
591 | - MemberList *ml = cd->getMemberList(lt); | |
592 | - if (ml) | |
593 | - { | |
594 | - MemberListIterator li(*ml); | |
595 | - const MemberDef *md; | |
596 | - for (li.toFirst();(md=li.current());++li) | |
597 | - { | |
598 | - if (md->isBriefSectionVisible()) | |
599 | - { | |
600 | - m_cache.allMembers.append(md); | |
601 | - } | |
602 | - } | |
603 | - } | |
604 | - } | |
605 | - TemplateVariant members() const | |
606 | - { | |
607 | - if (!m_cache.members) | |
608 | - { | |
609 | - addMembers(m_classDef,MemberListType_pubTypes); | |
610 | - addMembers(m_classDef,MemberListType_services); | |
611 | - addMembers(m_classDef,MemberListType_interfaces); | |
612 | - addMembers(m_classDef,MemberListType_pubSlots); | |
613 | - addMembers(m_classDef,MemberListType_signals); | |
614 | - addMembers(m_classDef,MemberListType_pubMethods); | |
615 | - addMembers(m_classDef,MemberListType_pubStaticMethods); | |
616 | - addMembers(m_classDef,MemberListType_pubAttribs); | |
617 | - addMembers(m_classDef,MemberListType_pubStaticAttribs); | |
618 | - addMembers(m_classDef,MemberListType_proTypes); | |
619 | - addMembers(m_classDef,MemberListType_proSlots); | |
620 | - addMembers(m_classDef,MemberListType_proMethods); | |
621 | - addMembers(m_classDef,MemberListType_proStaticMethods); | |
622 | - addMembers(m_classDef,MemberListType_proAttribs); | |
623 | - addMembers(m_classDef,MemberListType_proStaticAttribs); | |
624 | - addMembers(m_classDef,MemberListType_pacTypes); | |
625 | - addMembers(m_classDef,MemberListType_pacMethods); | |
626 | - addMembers(m_classDef,MemberListType_pacStaticMethods); | |
627 | - addMembers(m_classDef,MemberListType_pacAttribs); | |
628 | - addMembers(m_classDef,MemberListType_pacStaticAttribs); | |
629 | - addMembers(m_classDef,MemberListType_properties); | |
630 | - addMembers(m_classDef,MemberListType_events); | |
631 | - addMembers(m_classDef,MemberListType_priTypes); | |
632 | - addMembers(m_classDef,MemberListType_priSlots); | |
633 | - addMembers(m_classDef,MemberListType_priMethods); | |
634 | - addMembers(m_classDef,MemberListType_priStaticMethods); | |
635 | - addMembers(m_classDef,MemberListType_priAttribs); | |
636 | - addMembers(m_classDef,MemberListType_priStaticAttribs); | |
637 | - addMembers(m_classDef,MemberListType_related); | |
638 | - m_cache.members.reset(new MemberListContext(&m_cache.allMembers)); | |
639 | - } | |
640 | - return m_cache.members.get(); | |
641 | - } | |
642 | TemplateVariant allMembersList() const | |
643 | { | |
644 | if (!m_cache.allMembersList && m_classDef->memberNameInfoSDict()) | |
645 | @@ -1718,48 +1616,6 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
646 | } | |
647 | return m_cache.memberGroups.get(); | |
648 | } | |
649 | - TemplateVariant additionalInheritedMembers() const | |
650 | - { | |
651 | - if (!m_cache.additionalInheritedMembers) | |
652 | - { | |
653 | - InheritedMemberInfoListContext *ctx = new InheritedMemberInfoListContext; | |
654 | - ctx->addMemberList(m_classDef,MemberListType_pubTypes,theTranslator->trPublicTypes()); | |
655 | - ctx->addMemberList(m_classDef,MemberListType_services,theTranslator->trServices()); | |
656 | - ctx->addMemberList(m_classDef,MemberListType_interfaces,theTranslator->trInterfaces()); | |
657 | - ctx->addMemberList(m_classDef,MemberListType_pubSlots,theTranslator->trPublicSlots()); | |
658 | - ctx->addMemberList(m_classDef,MemberListType_signals,theTranslator->trSignals()); | |
659 | - ctx->addMemberList(m_classDef,MemberListType_pubMethods, | |
660 | - m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trInstanceMethods() | |
661 | - : theTranslator->trPublicMembers()); | |
662 | - ctx->addMemberList(m_classDef,MemberListType_pubStaticMethods, | |
663 | - m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trClassMethods() | |
664 | - : theTranslator->trStaticPublicMembers()); | |
665 | - ctx->addMemberList(m_classDef,MemberListType_pubAttribs,theTranslator->trPublicAttribs()); | |
666 | - ctx->addMemberList(m_classDef,MemberListType_pubStaticAttribs,theTranslator->trStaticPublicAttribs()); | |
667 | - ctx->addMemberList(m_classDef,MemberListType_proTypes,theTranslator->trProtectedTypes()); | |
668 | - ctx->addMemberList(m_classDef,MemberListType_proSlots,theTranslator->trProtectedSlots()); | |
669 | - ctx->addMemberList(m_classDef,MemberListType_proMethods,theTranslator->trProtectedMembers()); | |
670 | - ctx->addMemberList(m_classDef,MemberListType_proStaticMethods,theTranslator->trStaticProtectedMembers()); | |
671 | - ctx->addMemberList(m_classDef,MemberListType_proAttribs,theTranslator->trProtectedAttribs()); | |
672 | - ctx->addMemberList(m_classDef,MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs()); | |
673 | - ctx->addMemberList(m_classDef,MemberListType_pacTypes,theTranslator->trPackageTypes()); | |
674 | - ctx->addMemberList(m_classDef,MemberListType_pacMethods,theTranslator->trPackageMembers()); | |
675 | - ctx->addMemberList(m_classDef,MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers()); | |
676 | - ctx->addMemberList(m_classDef,MemberListType_pacAttribs,theTranslator->trPackageAttribs()); | |
677 | - ctx->addMemberList(m_classDef,MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs()); | |
678 | - ctx->addMemberList(m_classDef,MemberListType_properties,theTranslator->trProperties()); | |
679 | - ctx->addMemberList(m_classDef,MemberListType_events,theTranslator->trEvents()); | |
680 | - ctx->addMemberList(m_classDef,MemberListType_priTypes,theTranslator->trPrivateTypes()); | |
681 | - ctx->addMemberList(m_classDef,MemberListType_priSlots,theTranslator->trPrivateSlots()); | |
682 | - ctx->addMemberList(m_classDef,MemberListType_priMethods,theTranslator->trPrivateMembers()); | |
683 | - ctx->addMemberList(m_classDef,MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers()); | |
684 | - ctx->addMemberList(m_classDef,MemberListType_priAttribs,theTranslator->trPrivateAttribs()); | |
685 | - ctx->addMemberList(m_classDef,MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs()); | |
686 | - ctx->addMemberList(m_classDef,MemberListType_related,theTranslator->trRelatedFunctions()); | |
687 | - m_cache.additionalInheritedMembers.reset(ctx); | |
688 | - } | |
689 | - return m_cache.additionalInheritedMembers.get(); | |
690 | - } | |
691 | ||
692 | private: | |
693 | ClassDef *m_classDef; | |
694 | @@ -1771,12 +1627,11 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
695 | { | |
696 | templateArgList.setAutoDelete(TRUE); | |
697 | exampleList.setAutoDelete(TRUE); | |
698 | - allMembers.setAutoDelete(TRUE); | |
699 | } | |
700 | ScopedPtr<InheritanceListContext> inheritsList; | |
701 | ScopedPtr<InheritanceListContext> inheritedByList; | |
702 | - ScopedPtr<DotClassGraph> classGraph; | |
703 | - ScopedPtr<DotClassGraph> collaborationGraph; | |
704 | + ScopedPtr<DotClassGraph> classGraph; | |
705 | + ScopedPtr<DotClassGraph> collaborationGraph; | |
706 | ScopedPtr<NestedClassListContext> nestedClasses; | |
707 | ScopedPtr<MemberListInfoContext> publicTypes; | |
708 | ScopedPtr<MemberListInfoContext> publicMethods; | |
709 | @@ -1823,12 +1678,9 @@ class ClassContext::Private : public DefinitionContext<ClassContext::Private> | |
710 | ScopedPtr<ArgumentListContext> typeConstraints; | |
711 | ScopedPtr<TemplateList> examples; | |
712 | ScopedPtr<TemplateList> templateDecls; | |
713 | - ScopedPtr<InheritedMemberInfoListContext> additionalInheritedMembers; | |
714 | - ScopedPtr<MemberListContext> members; | |
715 | - QList<ArgumentListContext> templateArgList; | |
716 | - int inheritanceNodes; | |
717 | - QList<TemplateStruct> exampleList; | |
718 | - MemberList allMembers; | |
719 | + QList<ArgumentListContext> templateArgList; | |
720 | + int inheritanceNodes; | |
721 | + QList<TemplateStruct> exampleList; | |
722 | }; | |
723 | mutable Cachable m_cache; | |
724 | }; | |
725 | @@ -2172,8 +2024,6 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
726 | addProperty("isEnumeration", this,&Private::isEnumeration); | |
727 | addProperty("isEnumValue", this,&Private::isEnumValue); | |
728 | addProperty("isAnonymous", this,&Private::isAnonymous); | |
729 | - addProperty("anonymousType", this,&Private::anonymousType); | |
730 | - addProperty("anonymousMember", this,&Private::anonymousMember); | |
731 | addProperty("isRelated", this,&Private::isRelated); | |
732 | addProperty("hasDetails", this,&Private::hasDetails); | |
733 | addProperty("exception", this,&Private::exception); | |
734 | @@ -2311,44 +2161,6 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
735 | QCString name = m_memberDef->name(); | |
736 | return !name.isEmpty() && name.at(0)=='@'; | |
737 | } | |
738 | - TemplateVariant anonymousType() const | |
739 | - { | |
740 | - if (!m_cache.anonymousType) | |
741 | - { | |
742 | - ClassDef *cd = m_memberDef->getClassDefOfAnonymousType(); | |
743 | - if (cd) | |
744 | - { | |
745 | - m_cache.anonymousType.reset(new ClassContext(cd)); | |
746 | - } | |
747 | - } | |
748 | - if (m_cache.anonymousType) | |
749 | - { | |
750 | - return m_cache.anonymousType.get(); | |
751 | - } | |
752 | - else | |
753 | - { | |
754 | - return FALSE; | |
755 | - } | |
756 | - } | |
757 | - TemplateVariant anonymousMember() const | |
758 | - { | |
759 | - if (!m_cache.anonymousMember) | |
760 | - { | |
761 | - MemberDef *md = m_memberDef->fromAnonymousMember(); | |
762 | - if (md) | |
763 | - { | |
764 | - m_cache.anonymousMember.reset(new MemberContext(md)); | |
765 | - } | |
766 | - } | |
767 | - if (m_cache.anonymousMember) | |
768 | - { | |
769 | - return m_cache.anonymousMember.get(); | |
770 | - } | |
771 | - else | |
772 | - { | |
773 | - return FALSE; | |
774 | - } | |
775 | - } | |
776 | TemplateVariant isRelated() const | |
777 | { | |
778 | return m_memberDef->isRelated(); | |
779 | @@ -2805,7 +2617,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
780 | FTextStream t(&result); | |
781 | cg->writeGraph(t,BITMAP, | |
782 | g_globals.outputDir, | |
783 | - g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
784 | + m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
785 | relPathAsString(),TRUE,g_globals.dynSectionId | |
786 | ); | |
787 | g_globals.dynSectionId++; | |
788 | @@ -2845,7 +2657,7 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
789 | FTextStream t(&result); | |
790 | cg->writeGraph(t,BITMAP, | |
791 | g_globals.outputDir, | |
792 | - g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
793 | + m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension, | |
794 | relPathAsString(),TRUE,g_globals.dynSectionId | |
795 | ); | |
796 | g_globals.dynSectionId++; | |
797 | @@ -2871,7 +2683,6 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
798 | ScopedPtr<ArgumentListContext> arguments; | |
799 | ScopedPtr<MemberListContext> enumValues; | |
800 | ScopedPtr<ClassContext> classDef; | |
801 | - ScopedPtr<ClassContext> anonymousType; | |
802 | ScopedPtr<TemplateList> templateDecls; | |
803 | ScopedPtr<TemplateVariant> paramDocs; | |
804 | ScopedPtr<TemplateList> implements; | |
805 | @@ -2883,7 +2694,6 @@ class MemberContext::Private : public DefinitionContext<MemberContext::Private> | |
806 | ScopedPtr<MemberListContext> sourceRefBys; | |
807 | ScopedPtr<DotCallGraph> callGraph; | |
808 | ScopedPtr<DotCallGraph> callerGraph; | |
809 | - ScopedPtr<MemberContext> anonymousMember; | |
810 | QList<MemberContext> implementedByMembers; | |
811 | ScopedPtr<TemplateList> reimplementedBy; | |
812 | QList<MemberContext> reimplementedByMembers; | |
813 | @@ -4520,74 +4330,6 @@ TemplateVariant ModuleTreeContext::get(const char *name) const | |
814 | ||
815 | //------------------------------------------------------------------------ | |
816 | ||
817 | -//%% struct NavPathElem: list of examples page | |
818 | -//%% { | |
819 | -class NavPathElemContext::Private : public PropertyMapper | |
820 | -{ | |
821 | - public: | |
822 | - Private(Definition *def) : m_def(def) | |
823 | - { | |
824 | - addProperty("isLinkable",this,&Private::isLinkable); | |
825 | - addProperty("fileName",this,&Private::fileName); | |
826 | - addProperty("anchor",this,&Private::anchor); | |
827 | - addProperty("text",this,&Private::text); | |
828 | - } | |
829 | - TemplateVariant isLinkable() const | |
830 | - { | |
831 | - return m_def->isLinkable(); | |
832 | - } | |
833 | - TemplateVariant anchor() const | |
834 | - { | |
835 | - return m_def->anchor(); | |
836 | - } | |
837 | - TemplateVariant fileName() const | |
838 | - { | |
839 | - return m_def->getOutputFileBase(); | |
840 | - } | |
841 | - TemplateVariant text() const | |
842 | - { | |
843 | - Definition::DefType type = m_def->definitionType(); | |
844 | - QCString text = m_def->localName(); | |
845 | - if (type==Definition::TypeGroup) | |
846 | - { | |
847 | - text = ((const GroupDef*)m_def)->groupTitle(); | |
848 | - } | |
849 | - else if (type==Definition::TypePage && !(((const PageDef*)this)->title().isEmpty())) | |
850 | - { | |
851 | - text = ((const PageDef*)m_def)->title(); | |
852 | - } | |
853 | - else if (type==Definition::TypeClass) | |
854 | - { | |
855 | - if (text.right(2)=="-p") | |
856 | - { | |
857 | - text = text.left(text.length()-2); | |
858 | - } | |
859 | - } | |
860 | - return text; | |
861 | - } | |
862 | - private: | |
863 | - Definition *m_def; | |
864 | -}; | |
865 | -//%% } | |
866 | - | |
867 | -NavPathElemContext::NavPathElemContext(Definition *def) | |
868 | -{ | |
869 | - p = new Private(def); | |
870 | -} | |
871 | - | |
872 | -NavPathElemContext::~NavPathElemContext() | |
873 | -{ | |
874 | - delete p; | |
875 | -} | |
876 | - | |
877 | -TemplateVariant NavPathElemContext::get(const char *name) const | |
878 | -{ | |
879 | - return p->get(name); | |
880 | -} | |
881 | - | |
882 | - | |
883 | -//------------------------------------------------------------------------ | |
884 | - | |
885 | //%% struct ExampleList: list of examples page | |
886 | //%% { | |
887 | class ExampleListContext::Private : public PropertyMapper | |
888 | @@ -4776,14 +4518,11 @@ MemberListContext::MemberListContext(const MemberList *list) | |
889 | p = new Private; | |
890 | if (list) | |
891 | { | |
892 | - bool details = list->listType()&MemberListType_detailedLists; | |
893 | MemberListIterator mli(*list); | |
894 | MemberDef *md; | |
895 | for (mli.toFirst();(md=mli.current());++mli) | |
896 | { | |
897 | - if ((md->isBriefSectionVisible() && !details) || | |
898 | - (md->isDetailedSectionLinkable() && details) | |
899 | - ) | |
900 | + if (md->isBriefSectionVisible()) | |
901 | { | |
902 | p->addMember(md); | |
903 | } | |
904 | @@ -4857,7 +4596,6 @@ class MemberInfoContext::Private : public PropertyMapper | |
905 | case ::Private: return "private"; | |
906 | case ::Package: return "package"; | |
907 | } | |
908 | - return ""; | |
909 | } | |
910 | TemplateVariant virtualness() const | |
911 | { | |
912 | @@ -4867,7 +4605,6 @@ class MemberInfoContext::Private : public PropertyMapper | |
913 | case ::Virtual: return "virtual"; | |
914 | case ::Pure: return "pure"; | |
915 | } | |
916 | - return ""; | |
917 | } | |
918 | TemplateVariant ambiguityScope() const | |
919 | { | |
920 | @@ -4998,7 +4735,6 @@ class MemberGroupInfoContext::Private : public PropertyMapper | |
921 | addProperty("anchor", this,&Private::groupAnchor); | |
922 | addProperty("memberGroups", this,&Private::memberGroups); | |
923 | addProperty("docs", this,&Private::docs); | |
924 | - addProperty("inherited", this,&Private::inherited); | |
925 | } | |
926 | TemplateVariant members() const | |
927 | { | |
928 | @@ -5039,10 +4775,6 @@ class MemberGroupInfoContext::Private : public PropertyMapper | |
929 | } | |
930 | return *m_docs; | |
931 | } | |
932 | - TemplateVariant inherited() const | |
933 | - { | |
934 | - return FALSE; | |
935 | - } | |
936 | private: | |
937 | Definition *m_def; | |
938 | QCString m_relPath; | |
939 | @@ -5147,7 +4879,6 @@ class MemberListInfoContext::Private : public PropertyMapper | |
940 | { | |
941 | public: | |
942 | Private(Definition *def,const QCString &relPath,const MemberList *ml,const QCString &title,const QCString &subtitle) : | |
943 | - m_def(def), | |
944 | m_memberListContext(ml), | |
945 | m_memberGroups(def,relPath,ml ? ml->getMemberGroupList() : 0), | |
946 | m_memberList(ml), | |
947 | @@ -5159,7 +4890,6 @@ class MemberListInfoContext::Private : public PropertyMapper | |
948 | addProperty("subtitle", this,&Private::subtitle); | |
949 | addProperty("anchor", this,&Private::anchor); | |
950 | addProperty("memberGroups", this,&Private::memberGroups); | |
951 | - addProperty("inherited", this,&Private::inherited); | |
952 | } | |
953 | TemplateVariant members() const | |
954 | { | |
955 | @@ -5175,38 +4905,18 @@ class MemberListInfoContext::Private : public PropertyMapper | |
956 | } | |
957 | TemplateVariant anchor() const | |
958 | { | |
959 | - return MemberList::listTypeAsString(m_memberList->listType()); | |
960 | + return m_memberList->listTypeAsString(m_memberList->listType()); | |
961 | } | |
962 | TemplateVariant memberGroups() const | |
963 | { | |
964 | return &m_memberGroups; | |
965 | } | |
966 | - TemplateVariant inherited() const | |
967 | - { | |
968 | - if (!m_inherited && (m_memberList->listType()&MemberListType_detailedLists)==0 && | |
969 | - m_def->definitionType()==Definition::TypeClass) | |
970 | - { | |
971 | - InheritedMemberInfoListContext *ctx = new InheritedMemberInfoListContext; | |
972 | - ctx->addMemberList((ClassDef*)m_def,m_memberList->listType(),m_title,FALSE); | |
973 | - m_inherited.reset(ctx); | |
974 | - } | |
975 | - if (m_inherited) | |
976 | - { | |
977 | - return m_inherited.get(); | |
978 | - } | |
979 | - else | |
980 | - { | |
981 | - return TemplateVariant(FALSE); | |
982 | - } | |
983 | - } | |
984 | private: | |
985 | - Definition *m_def; | |
986 | MemberListContext m_memberListContext; | |
987 | MemberGroupListContext m_memberGroups; | |
988 | const MemberList *m_memberList; | |
989 | QCString m_title; | |
990 | QCString m_subtitle; | |
991 | - mutable ScopedPtr<InheritedMemberInfoListContext> m_inherited; | |
992 | }; | |
993 | //%% } | |
994 | ||
995 | @@ -5229,243 +4939,6 @@ TemplateVariant MemberListInfoContext::get(const char *name) const | |
996 | ||
997 | //------------------------------------------------------------------------ | |
998 | ||
999 | -//%% struct InheritedMemberInfo: inherited member information | |
1000 | -//%% { | |
1001 | -class InheritedMemberInfoContext::Private : public PropertyMapper | |
1002 | -{ | |
1003 | - public: | |
1004 | - Private(ClassDef *cd,MemberList *ml,const QCString &title) | |
1005 | - : m_class(cd), m_memberList(ml), m_title(title) | |
1006 | - { | |
1007 | - addProperty("class", this,&Private::getClass); | |
1008 | - addProperty("title", this,&Private::title); | |
1009 | - addProperty("members", this,&Private::members); | |
1010 | - addProperty("id", this,&Private::id); | |
1011 | - addProperty("inheritedFrom", this,&Private::inheritedFrom); | |
1012 | - } | |
1013 | - ~Private() | |
1014 | - { | |
1015 | - delete m_memberList; | |
1016 | - } | |
1017 | - TemplateVariant getClass() const | |
1018 | - { | |
1019 | - if (!m_classCtx) | |
1020 | - { | |
1021 | - m_classCtx.reset(new ClassContext(m_class)); | |
1022 | - } | |
1023 | - return m_classCtx.get(); | |
1024 | - } | |
1025 | - TemplateVariant title() const | |
1026 | - { | |
1027 | - return m_title; | |
1028 | - } | |
1029 | - TemplateVariant members() const | |
1030 | - { | |
1031 | - if (!m_memberListCtx) | |
1032 | - { | |
1033 | - m_memberListCtx.reset(new MemberListContext(m_memberList)); | |
1034 | - } | |
1035 | - return m_memberListCtx.get(); | |
1036 | - } | |
1037 | - TemplateVariant id() const | |
1038 | - { | |
1039 | - return substitute(MemberList::listTypeAsString(m_memberList->listType()),"-","_")+"_"+ | |
1040 | - stripPath(m_class->getOutputFileBase()); | |
1041 | - } | |
1042 | - TemplateVariant inheritedFrom() const | |
1043 | - { | |
1044 | - if (m_inheritedFrom.count()==0) | |
1045 | - { | |
1046 | - m_inheritedFrom.append(title()); | |
1047 | - m_inheritedFrom.append(getClass()); | |
1048 | - } | |
1049 | - return &m_inheritedFrom; | |
1050 | - } | |
1051 | - | |
1052 | - private: | |
1053 | - ClassDef * m_class; | |
1054 | - MemberList *m_memberList; | |
1055 | - QCString m_title; | |
1056 | - mutable ScopedPtr<ClassContext> m_classCtx; | |
1057 | - mutable ScopedPtr<MemberListContext> m_memberListCtx; | |
1058 | - mutable TemplateList m_inheritedFrom; | |
1059 | -}; | |
1060 | -//%% } | |
1061 | - | |
1062 | -InheritedMemberInfoContext::InheritedMemberInfoContext(ClassDef *cd,MemberList *ml, | |
1063 | - const QCString &title) | |
1064 | -{ | |
1065 | - p = new Private(cd,ml,title); | |
1066 | -} | |
1067 | - | |
1068 | -InheritedMemberInfoContext::~InheritedMemberInfoContext() | |
1069 | -{ | |
1070 | - delete p; | |
1071 | -} | |
1072 | - | |
1073 | -TemplateVariant InheritedMemberInfoContext::get(const char *name) const | |
1074 | -{ | |
1075 | - return p->get(name); | |
1076 | -} | |
1077 | - | |
1078 | -//------------------------------------------------------------------------ | |
1079 | - | |
1080 | -//%% list InheritedMemberList[InheritedMemberInfo] : list of inherited classes | |
1081 | -class InheritedMemberInfoListContext::Private : public GenericNodeListContext<InheritedMemberInfoContext> | |
1082 | -{ | |
1083 | - public: | |
1084 | - void addMemberList(ClassDef *inheritedFrom,MemberList *ml,MemberList *combinedList) | |
1085 | - { | |
1086 | - if (ml) | |
1087 | - { | |
1088 | - MemberListIterator li(*ml); | |
1089 | - MemberDef *md; | |
1090 | - for (li.toFirst();(md=li.current());++li) | |
1091 | - { | |
1092 | - if (md->isBriefSectionVisible() && !md->isReimplementedBy(inheritedFrom)) | |
1093 | - { | |
1094 | - combinedList->append(md); | |
1095 | - } | |
1096 | - } | |
1097 | - } | |
1098 | - } | |
1099 | - void addMemberListIncludingGrouped(ClassDef *inheritedFrom,MemberList *ml,MemberList *combinedList) | |
1100 | - { | |
1101 | - if (ml) | |
1102 | - { | |
1103 | - addMemberList(inheritedFrom,ml,combinedList); | |
1104 | - if (ml->getMemberGroupList()) | |
1105 | - { | |
1106 | - MemberGroupListIterator mgli(*ml->getMemberGroupList()); | |
1107 | - MemberGroup *mg; | |
1108 | - for (mgli.toFirst();(mg=mgli.current());++mgli) | |
1109 | - { | |
1110 | - addMemberList(inheritedFrom,mg->members(),combinedList); | |
1111 | - } | |
1112 | - } | |
1113 | - } | |
1114 | - } | |
1115 | - void addMemberGroupsOfClass(ClassDef *inheritedFrom, | |
1116 | - ClassDef *cd,MemberListType lt,MemberList *combinedList) | |
1117 | - { | |
1118 | - if (cd->getMemberGroupSDict()) | |
1119 | - { | |
1120 | - MemberGroupSDict::Iterator mgli(*cd->getMemberGroupSDict()); | |
1121 | - MemberGroup *mg; | |
1122 | - for (;(mg=mgli.current());++mgli) | |
1123 | - { | |
1124 | - if (mg->members() && (!mg->allMembersInSameSection() || !cd->subGrouping())) // group is in its own section | |
1125 | - { | |
1126 | - MemberListIterator li(*mg->members()); | |
1127 | - MemberDef *md; | |
1128 | - for (li.toFirst();(md=li.current());++li) | |
1129 | - { | |
1130 | - if (lt==md->getSectionList(mg->parent())->listType() && | |
1131 | - !md->isReimplementedBy(inheritedFrom) && | |
1132 | - md->isBriefSectionVisible()) | |
1133 | - { | |
1134 | - combinedList->append(md); | |
1135 | - } | |
1136 | - } | |
1137 | - } | |
1138 | - } | |
1139 | - } | |
1140 | - } | |
1141 | - void addInheritedMembers(ClassDef *inheritedFrom,ClassDef *cd,MemberListType lt, | |
1142 | - MemberListType lt1,int lt2,const QCString &title,bool additionalList) | |
1143 | - { | |
1144 | - int count = cd->countMembersIncludingGrouped(lt1,inheritedFrom,additionalList); | |
1145 | - if (lt2!=-1) count += cd->countMembersIncludingGrouped((MemberListType)lt2,inheritedFrom,additionalList); | |
1146 | - if (count>0) | |
1147 | - { | |
1148 | - MemberList *ml = cd->getMemberList(lt1); | |
1149 | - MemberList *ml2 = lt2!=-1 ? cd->getMemberList((MemberListType)lt2) : 0; | |
1150 | - MemberList *combinedList = new MemberList(lt); | |
1151 | - addMemberListIncludingGrouped(inheritedFrom,ml,combinedList); | |
1152 | - addMemberListIncludingGrouped(inheritedFrom,ml2,combinedList); | |
1153 | - addMemberGroupsOfClass(inheritedFrom,cd,lt,combinedList); | |
1154 | - if (lt2!=-1) addMemberGroupsOfClass(inheritedFrom,cd,(MemberListType)lt2,combinedList); | |
1155 | - append(new InheritedMemberInfoContext(cd,combinedList,title)); | |
1156 | - } | |
1157 | - } | |
1158 | - void findInheritedMembers(ClassDef *inheritedFrom,ClassDef *cd,MemberListType lt, | |
1159 | - int lt2, const QCString &title,bool additionalList, | |
1160 | - QPtrDict<void> *visitedClasses) | |
1161 | - { | |
1162 | - if (cd->baseClasses()) | |
1163 | - { | |
1164 | - BaseClassListIterator it(*cd->baseClasses()); | |
1165 | - BaseClassDef *ibcd; | |
1166 | - for (it.toFirst();(ibcd=it.current());++it) | |
1167 | - { | |
1168 | - ClassDef *icd=ibcd->classDef; | |
1169 | - if (icd->isLinkable()) | |
1170 | - { | |
1171 | - int lt1,lt3; | |
1172 | - convertProtectionLevel(lt,ibcd->prot,<1,<3); | |
1173 | - if (lt2==-1 && lt3!=-1) | |
1174 | - { | |
1175 | - lt2=lt3; | |
1176 | - } | |
1177 | - if (visitedClasses->find(icd)==0) | |
1178 | - { | |
1179 | - visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance | |
1180 | - if (lt1!=-1) | |
1181 | - { | |
1182 | - // add member info for members of cd with list type lt | |
1183 | - addInheritedMembers(inheritedFrom,icd,lt,(MemberListType)lt1,lt2,title,additionalList); | |
1184 | - // recurse down the inheritance tree | |
1185 | - findInheritedMembers(inheritedFrom,icd,(MemberListType)lt1,lt2,title,additionalList,visitedClasses); | |
1186 | - } | |
1187 | - } | |
1188 | - } | |
1189 | - } | |
1190 | - } | |
1191 | - } | |
1192 | -}; | |
1193 | - | |
1194 | -InheritedMemberInfoListContext::InheritedMemberInfoListContext() | |
1195 | -{ | |
1196 | - p = new Private; | |
1197 | -} | |
1198 | - | |
1199 | -void InheritedMemberInfoListContext::addMemberList( | |
1200 | - ClassDef *cd,MemberListType lt,const QCString &title,bool additionalList) | |
1201 | -{ | |
1202 | - QPtrDict<void> visited(17); | |
1203 | - bool memberInSection = cd->countMembersIncludingGrouped(lt,cd,FALSE); | |
1204 | - bool show = (additionalList && !memberInSection) || // inherited member to show in the additional inherited members list | |
1205 | - (!additionalList && memberInSection); // inherited member to show in a member list of the class | |
1206 | - //printf("%s:%s show=%d\n",cd->name().data(),MemberList::listTypeAsString(lt).data(),show); | |
1207 | - if (show) | |
1208 | - { | |
1209 | - p->findInheritedMembers(cd,cd,lt,-1,title,additionalList,&visited); | |
1210 | - } | |
1211 | -} | |
1212 | - | |
1213 | -InheritedMemberInfoListContext::~InheritedMemberInfoListContext() | |
1214 | -{ | |
1215 | - delete p; | |
1216 | -} | |
1217 | - | |
1218 | -// TemplateListIntf | |
1219 | -int InheritedMemberInfoListContext::count() const | |
1220 | -{ | |
1221 | - return p->count(); | |
1222 | -} | |
1223 | - | |
1224 | -TemplateVariant InheritedMemberInfoListContext::at(int index) const | |
1225 | -{ | |
1226 | - return p->at(index); | |
1227 | -} | |
1228 | - | |
1229 | -TemplateListIntf::ConstIterator *InheritedMemberInfoListContext::createIterator() const | |
1230 | -{ | |
1231 | - return p->createIterator(); | |
1232 | -} | |
1233 | - | |
1234 | -//------------------------------------------------------------------------ | |
1235 | - | |
1236 | //%% struct Argument: parameter information | |
1237 | //%% { | |
1238 | class ArgumentContext::Private : public PropertyMapper | |
1239 | diff --git a/src/context.h b/src/context.h | |
1240 | index f027749..6ae2c28 100644 | |
1241 | --- a/src/context.h | |
1242 | +++ b/src/context.h | |
1243 | @@ -616,23 +616,6 @@ class ExampleListContext : public TemplateStructIntf | |
1244 | ||
1245 | //---------------------------------------------------- | |
1246 | ||
1247 | -class NavPathElemContext : public TemplateStructIntf | |
1248 | -{ | |
1249 | - public: | |
1250 | - NavPathElemContext(Definition *def); | |
1251 | - ~NavPathElemContext(); | |
1252 | - | |
1253 | - // TemplateStructIntf methods | |
1254 | - virtual TemplateVariant get(const char *name) const; | |
1255 | - | |
1256 | - private: | |
1257 | - class Private; | |
1258 | - Private *p; | |
1259 | -}; | |
1260 | - | |
1261 | - | |
1262 | -//---------------------------------------------------- | |
1263 | - | |
1264 | class InheritanceNodeContext : public TemplateStructIntf | |
1265 | { | |
1266 | public: | |
1267 | @@ -758,41 +741,6 @@ class MemberInfoContext : public TemplateStructIntf | |
1268 | ||
1269 | //---------------------------------------------------- | |
1270 | ||
1271 | -class InheritedMemberInfoContext : public TemplateStructIntf | |
1272 | -{ | |
1273 | - public: | |
1274 | - InheritedMemberInfoContext(ClassDef *cd,MemberList *ml,const QCString &title); | |
1275 | - ~InheritedMemberInfoContext(); | |
1276 | - | |
1277 | - // TemplateStructIntf methods | |
1278 | - virtual TemplateVariant get(const char *name) const; | |
1279 | - | |
1280 | - private: | |
1281 | - class Private; | |
1282 | - Private *p; | |
1283 | -}; | |
1284 | - | |
1285 | -//---------------------------------------------------- | |
1286 | - | |
1287 | -class InheritedMemberInfoListContext : public TemplateListIntf | |
1288 | -{ | |
1289 | - public: | |
1290 | - InheritedMemberInfoListContext(); | |
1291 | - void addMemberList(ClassDef *cd,MemberListType lt,const QCString &title,bool additionalList=TRUE); | |
1292 | - ~InheritedMemberInfoListContext(); | |
1293 | - | |
1294 | - // TemplateListIntf | |
1295 | - virtual int count() const; | |
1296 | - virtual TemplateVariant at(int index) const; | |
1297 | - virtual TemplateListIntf::ConstIterator *createIterator() const; | |
1298 | - | |
1299 | - private: | |
1300 | - class Private; | |
1301 | - Private *p; | |
1302 | -}; | |
1303 | - | |
1304 | -//---------------------------------------------------- | |
1305 | - | |
1306 | class AllMembersListContext : public TemplateListIntf | |
1307 | { | |
1308 | public: | |
1309 | diff --git a/src/doxygen.cpp b/src/doxygen.cpp | |
1310 | index 41fca96..a7d5b93 100644 | |
1311 | --- a/src/doxygen.cpp | |
1312 | +++ b/src/doxygen.cpp | |
1313 | @@ -11438,8 +11438,6 @@ void generateOutput() | |
1314 | g_s.end(); | |
1315 | } | |
1316 | ||
1317 | - if (g_useOutputTemplate) generateOutputViaTemplate(); | |
1318 | - | |
1319 | if (generateRtf) | |
1320 | { | |
1321 | g_s.begin("Combining RTF output...\n"); | |
1322 | @@ -11519,6 +11517,7 @@ void generateOutput() | |
1323 | msg("finished...\n"); | |
1324 | } | |
1325 | ||
1326 | + if (g_useOutputTemplate) generateOutputViaTemplate(); | |
1327 | ||
1328 | /************************************************************************** | |
1329 | * Start cleaning up * | |
1330 | diff --git a/src/filedef.cpp b/src/filedef.cpp | |
1331 | index e286284..e75c7b0 100644 | |
1332 | --- a/src/filedef.cpp | |
1333 | +++ b/src/filedef.cpp | |
1334 | @@ -514,7 +514,7 @@ void FileDef::writeSummaryLinks(OutputList &ol) | |
1335 | MemberList * ml = getMemberList(lmd->type); | |
1336 | if (ml && ml->declVisible()) | |
1337 | { | |
1338 | - ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1339 | + ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1340 | first=FALSE; | |
1341 | } | |
1342 | } | |
1343 | diff --git a/src/groupdef.cpp b/src/groupdef.cpp | |
1344 | index 9426c24..f9b47ae 100644 | |
1345 | --- a/src/groupdef.cpp | |
1346 | +++ b/src/groupdef.cpp | |
1347 | @@ -913,7 +913,7 @@ void GroupDef::writeSummaryLinks(OutputList &ol) | |
1348 | MemberList * ml = getMemberList(lmd->type); | |
1349 | if (ml && ml->declVisible()) | |
1350 | { | |
1351 | - ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1352 | + ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1353 | first=FALSE; | |
1354 | } | |
1355 | } | |
1356 | diff --git a/src/memberdef.cpp b/src/memberdef.cpp | |
1357 | index 4d7ea9f..5d88d4a 100644 | |
1358 | --- a/src/memberdef.cpp | |
1359 | +++ b/src/memberdef.cpp | |
1360 | @@ -1409,6 +1409,9 @@ void MemberDef::writeDeclaration(OutputList &ol, | |
1361 | // are explicitly grouped. | |
1362 | if (!inGroup && m_impl->mtype==MemberType_EnumValue) return; | |
1363 | ||
1364 | + // hide members whose brief section should not be visible | |
1365 | + //if (!isBriefSectionVisible()) return; | |
1366 | + | |
1367 | Definition *d=0; | |
1368 | ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something | |
1369 | if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; | |
1370 | @@ -1418,6 +1421,14 @@ void MemberDef::writeDeclaration(OutputList &ol, | |
1371 | QCString cname = d->name(); | |
1372 | QCString cdname = d->displayName(); | |
1373 | QCString cfname = getOutputFileBase(); | |
1374 | + //QCString osname = cname; | |
1375 | + // in case of class members that are put in a group the name of the outerscope | |
1376 | + // differs from the cname. | |
1377 | + //if (getOuterScope()) osname=getOuterScope()->name(); | |
1378 | + | |
1379 | + //HtmlHelp *htmlHelp=0; | |
1380 | + //bool hasHtmlHelp = Config_getBool("GENERATE_HTML") && Config_getBool("GENERATE_HTMLHELP"); | |
1381 | + //if (hasHtmlHelp) htmlHelp = HtmlHelp::getInstance(); | |
1382 | ||
1383 | // search for the last anonymous scope in the member type | |
1384 | ClassDef *annoClassDef=getClassDefOfAnonymousType(); | |
1385 | @@ -1434,27 +1445,15 @@ void MemberDef::writeDeclaration(OutputList &ol, | |
1386 | ||
1387 | // If there is no detailed description we need to write the anchor here. | |
1388 | bool detailsVisible = isDetailedSectionLinkable(); | |
1389 | - if (!detailsVisible) | |
1390 | + if (!detailsVisible && !m_impl->annMemb) | |
1391 | { | |
1392 | - QCString doxyArgs=argsString(); | |
1393 | - if (m_impl->annMemb) | |
1394 | - { | |
1395 | - QCString doxyName=m_impl->annMemb->name(); | |
1396 | - if (!cname.isEmpty()) | |
1397 | - { | |
1398 | - doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage())); | |
1399 | - } | |
1400 | - ol.startDoxyAnchor(cfname,cname,m_impl->annMemb->anchor(),doxyName,doxyArgs); | |
1401 | - } | |
1402 | - else | |
1403 | + QCString doxyName=name().copy(); | |
1404 | + if (!cname.isEmpty()) | |
1405 | { | |
1406 | - QCString doxyName=name(); | |
1407 | - if (!cname.isEmpty()) | |
1408 | - { | |
1409 | - doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage())); | |
1410 | - } | |
1411 | - ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs); | |
1412 | + doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage())); | |
1413 | } | |
1414 | + QCString doxyArgs=argsString(); | |
1415 | + ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs); | |
1416 | ||
1417 | ol.pushGeneratorState(); | |
1418 | ol.disable(OutputGenerator::Man); | |
1419 | @@ -2389,21 +2388,6 @@ QCString MemberDef::displayDefinition() const | |
1420 | ldef=ldef.mid(2); | |
1421 | } | |
1422 | } | |
1423 | - static QRegExp r("@[0-9]+"); | |
1424 | - int l,i=r.match(ldef,0,&l); | |
1425 | - if (i!=-1) // replace anonymous parts with { ... } | |
1426 | - { | |
1427 | - int si=ldef.find(' '),pi,ei=i+l; | |
1428 | - if (si==-1) si=0; | |
1429 | - while ((pi=r.match(ldef,i+l,&l))!=-1) | |
1430 | - { | |
1431 | - i=pi; | |
1432 | - ei=i+l; | |
1433 | - } | |
1434 | - int ni=ldef.find("::",si); | |
1435 | - if (ni>=ei) ei=ni+2; | |
1436 | - ldef = ldef.left(si) + " { ... } " + ldef.right(ldef.length()-ei); | |
1437 | - } | |
1438 | ClassDef *cd=getClassDef(); | |
1439 | if (cd && cd->isObjectiveC()) | |
1440 | { | |
1441 | @@ -2423,9 +2407,9 @@ QCString MemberDef::displayDefinition() const | |
1442 | { | |
1443 | ldef=ldef.left(dp+1); | |
1444 | } | |
1445 | - l=ldef.length(); | |
1446 | + int l=ldef.length(); | |
1447 | //printf("start >%s<\n",ldef.data()); | |
1448 | - i=l-1; | |
1449 | + int i=l-1; | |
1450 | while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--; | |
1451 | while (i>=0 && isspace((uchar)ldef.at(i))) i--; | |
1452 | if (i>0) | |
1453 | @@ -2499,8 +2483,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol, | |
1454 | bool inFile = container->definitionType()==Definition::TypeFile; | |
1455 | bool hasDocs = isDetailedSectionVisible(inGroup,inFile); | |
1456 | ||
1457 | - //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d sectionLinkable=%d\n", | |
1458 | - // name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable()); | |
1459 | + //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d\n", | |
1460 | + // name().data(),hasDocs,container->definitionType(),inGroup); | |
1461 | ||
1462 | if ( !hasDocs ) return; | |
1463 | if (isEnumValue() && !showEnumValues) return; | |
1464 | @@ -4672,11 +4656,6 @@ void MemberDef::setFromAnonymousMember(MemberDef *m) | |
1465 | m_impl->annMemb=m; | |
1466 | } | |
1467 | ||
1468 | -MemberDef *MemberDef::fromAnonymousMember() const | |
1469 | -{ | |
1470 | - return m_impl->annMemb; | |
1471 | -} | |
1472 | - | |
1473 | void MemberDef::setTemplateMaster(MemberDef *mt) | |
1474 | { | |
1475 | m_impl->templateMaster=mt; | |
1476 | diff --git a/src/memberdef.h b/src/memberdef.h | |
1477 | index 47912b8..926906c 100644 | |
1478 | --- a/src/memberdef.h | |
1479 | +++ b/src/memberdef.h | |
1480 | @@ -217,7 +217,6 @@ class MemberDef : public Definition | |
1481 | ||
1482 | bool fromAnonymousScope() const; | |
1483 | bool anonymousDeclShown() const; | |
1484 | - MemberDef *fromAnonymousMember() const; | |
1485 | ||
1486 | // callgraph related members | |
1487 | bool hasCallGraph() const; | |
1488 | diff --git a/src/memberlist.cpp b/src/memberlist.cpp | |
1489 | index 101293a..db019b3 100644 | |
1490 | --- a/src/memberlist.cpp | |
1491 | +++ b/src/memberlist.cpp | |
1492 | @@ -879,7 +879,7 @@ void MemberList::setNeedsSorting(bool b) | |
1493 | m_needsSorting = b; | |
1494 | } | |
1495 | ||
1496 | -QCString MemberList::listTypeAsString(MemberListType type) | |
1497 | +QCString MemberList::listTypeAsString(MemberListType type) const | |
1498 | { | |
1499 | switch(type) | |
1500 | { | |
1501 | diff --git a/src/memberlist.h b/src/memberlist.h | |
1502 | index 9dfa104..7241258 100644 | |
1503 | --- a/src/memberlist.h | |
1504 | +++ b/src/memberlist.h | |
1505 | @@ -36,7 +36,7 @@ class MemberList : public QList<MemberDef> | |
1506 | MemberList(MemberListType lt); | |
1507 | ~MemberList(); | |
1508 | MemberListType listType() const { return m_listType; } | |
1509 | - static QCString listTypeAsString(MemberListType type); | |
1510 | + QCString listTypeAsString(MemberListType type) const; | |
1511 | bool insert(uint index,const MemberDef *md); | |
1512 | void inSort(const MemberDef *md); | |
1513 | void append(const MemberDef *md); | |
1514 | diff --git a/src/namespacedef.cpp b/src/namespacedef.cpp | |
1515 | index d00d845..c0915b3 100644 | |
1516 | --- a/src/namespacedef.cpp | |
1517 | +++ b/src/namespacedef.cpp | |
1518 | @@ -430,7 +430,7 @@ void NamespaceDef::writeSummaryLinks(OutputList &ol) | |
1519 | MemberList * ml = getMemberList(lmd->type); | |
1520 | if (ml && ml->declVisible()) | |
1521 | { | |
1522 | - ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1523 | + ol.writeSummaryLink(0,ml->listTypeAsString(ml->listType()),lmd->title(lang),first); | |
1524 | first=FALSE; | |
1525 | } | |
1526 | } | |
1527 | diff --git a/src/template.cpp b/src/template.cpp | |
1528 | index 8144afd..75596f2 100644 | |
1529 | --- a/src/template.cpp | |
1530 | +++ b/src/template.cpp | |
1531 | @@ -1558,7 +1558,6 @@ class TemplateImpl : public TemplateNode, public Template | |
1532 | { | |
1533 | public: | |
1534 | TemplateImpl(TemplateEngine *e,const QCString &name,const QCString &data); | |
1535 | - ~TemplateImpl() {} | |
1536 | void render(FTextStream &ts, TemplateContext *c); | |
1537 | ||
1538 | TemplateEngine *engine() const { return m_engine; } | |
1539 | @@ -1869,58 +1868,6 @@ class TemplateNodeIf : public TemplateNodeCreator<TemplateNodeIf> | |
1540 | }; | |
1541 | ||
1542 | //---------------------------------------------------------- | |
1543 | -/** @brief Class representing a 'for' tag in a template */ | |
1544 | -class TemplateNodeRepeat : public TemplateNodeCreator<TemplateNodeRepeat> | |
1545 | -{ | |
1546 | - public: | |
1547 | - TemplateNodeRepeat(TemplateParser *parser,TemplateNode *parent,int line,const QCString &data) | |
1548 | - : TemplateNodeCreator<TemplateNodeRepeat>(parser,parent,line) | |
1549 | - { | |
1550 | - TRACE(("{TemplateNodeRepeat(%s)\n",data.data())); | |
1551 | - ExpressionParser expParser(parser->templateName(),line); | |
1552 | - m_expr = expParser.parseVariable(data); | |
1553 | - QStrList stopAt; | |
1554 | - stopAt.append("endrepeat"); | |
1555 | - parser->parse(this,line,stopAt,m_repeatNodes); | |
1556 | - parser->removeNextToken(); // skip over endrepeat | |
1557 | - TRACE(("}TemplateNodeRepeat(%s)\n",data.data())); | |
1558 | - } | |
1559 | - ~TemplateNodeRepeat() | |
1560 | - { | |
1561 | - delete m_expr; | |
1562 | - } | |
1563 | - void render(FTextStream &ts, TemplateContext *c) | |
1564 | - { | |
1565 | - dynamic_cast<TemplateContextImpl*>(c)->setLocation(m_templateName,m_line); | |
1566 | - TemplateVariant v; | |
1567 | - if (m_expr && (v=m_expr->resolve(c)).type()==TemplateVariant::Integer) | |
1568 | - { | |
1569 | - int i, n = v.toInt(); | |
1570 | - for (i=0;i<n;i++) | |
1571 | - { | |
1572 | - TemplateStruct s; | |
1573 | - s.set("counter0", (int)i); | |
1574 | - s.set("counter", (int)(i+1)); | |
1575 | - s.set("revcounter", (int)(n-i)); | |
1576 | - s.set("revcounter0", (int)(n-i-1)); | |
1577 | - s.set("first",i==0); | |
1578 | - s.set("last", i==n-1); | |
1579 | - c->set("repeatloop",&s); | |
1580 | - // render all items for this iteration of the loop | |
1581 | - m_repeatNodes.render(ts,c); | |
1582 | - } | |
1583 | - } | |
1584 | - else // simple type... | |
1585 | - { | |
1586 | - warn(m_templateName,m_line,"for requires a variable of list type!"); | |
1587 | - } | |
1588 | - } | |
1589 | - private: | |
1590 | - TemplateNodeList m_repeatNodes; | |
1591 | - ExprAst *m_expr; | |
1592 | -}; | |
1593 | - | |
1594 | -//---------------------------------------------------------- | |
1595 | ||
1596 | /** @brief Class representing a 'for' tag in a template */ | |
1597 | class TemplateNodeFor : public TemplateNodeCreator<TemplateNodeFor> | |
1598 | @@ -2218,8 +2165,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend> | |
1599 | TemplateImpl *t = getTemplate(); | |
1600 | if (t) | |
1601 | { | |
1602 | - Template *bt = t->engine()->loadByName(extendFile); | |
1603 | - TemplateImpl *baseTemplate = bt ? dynamic_cast<TemplateImpl*>(bt) : 0; | |
1604 | + TemplateImpl *baseTemplate = dynamic_cast<TemplateImpl*>(t->engine()->loadByName(extendFile)); | |
1605 | if (baseTemplate) | |
1606 | { | |
1607 | // fill block context | |
1608 | @@ -2248,7 +2194,7 @@ class TemplateNodeExtend : public TemplateNodeCreator<TemplateNodeExtend> | |
1609 | ||
1610 | // clean up | |
1611 | bc->clear(); | |
1612 | - //delete baseTemplate; | |
1613 | + delete baseTemplate; | |
1614 | } | |
1615 | else | |
1616 | { | |
1617 | @@ -2296,8 +2242,7 @@ class TemplateNodeInclude : public TemplateNodeCreator<TemplateNodeInclude> | |
1618 | TemplateImpl *t = getTemplate(); | |
1619 | if (t) | |
1620 | { | |
1621 | - Template *it = t->engine()->loadByName(includeFile); | |
1622 | - TemplateImpl *incTemplate = it ? dynamic_cast<TemplateImpl*>(it) : 0; | |
1623 | + TemplateImpl *incTemplate = dynamic_cast<TemplateImpl*>(t->engine()->loadByName(includeFile)); | |
1624 | if (incTemplate) | |
1625 | { | |
1626 | incTemplate->render(ts,c); | |
1627 | @@ -2379,8 +2324,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate> | |
1628 | TemplateImpl *t = getTemplate(); | |
1629 | if (t) | |
1630 | { | |
1631 | - Template *ct = t->engine()->loadByName(templateFile); | |
1632 | - TemplateImpl *createTemplate = ct ? dynamic_cast<TemplateImpl*>(ct) : 0; | |
1633 | + TemplateImpl *createTemplate = dynamic_cast<TemplateImpl*>(t->engine()->loadByName(templateFile)); | |
1634 | if (createTemplate) | |
1635 | { | |
1636 | if (!ci->outputDirectory().isEmpty()) | |
1637 | @@ -2392,7 +2336,7 @@ class TemplateNodeCreate : public TemplateNodeCreator<TemplateNodeCreate> | |
1638 | { | |
1639 | FTextStream ts(&f); | |
1640 | createTemplate->render(ts,c); | |
1641 | - //delete createTemplate; | |
1642 | + delete createTemplate; | |
1643 | } | |
1644 | else | |
1645 | { | |
1646 | @@ -2785,9 +2729,6 @@ class TemplateNodeMarkers : public TemplateNodeCreator<TemplateNodeMarkers> | |
1647 | for (it->toFirst(); (it->current(var)) && i<entryIndex; it->toNext(),i++) {} | |
1648 | if (ok && i==entryIndex) // found element | |
1649 | { | |
1650 | - TemplateStruct s; | |
1651 | - s.set("id",(int)i); | |
1652 | - c->set("markers",&s); | |
1653 | c->set(m_var,var); // define local variable to hold element of list type | |
1654 | bool wasSpaceless = ci->spacelessEnabled(); | |
1655 | ci->enableSpaceless(TRUE); | |
1656 | @@ -2883,7 +2824,6 @@ static TemplateNodeFactory::AutoRegister<TemplateNodeBlock> autoRefBlock("bl | |
1657 | static TemplateNodeFactory::AutoRegister<TemplateNodeCycle> autoRefCycle("cycle"); | |
1658 | static TemplateNodeFactory::AutoRegister<TemplateNodeExtend> autoRefExtend("extend"); | |
1659 | static TemplateNodeFactory::AutoRegister<TemplateNodeCreate> autoRefCreate("create"); | |
1660 | -static TemplateNodeFactory::AutoRegister<TemplateNodeRepeat> autoRefRepeat("repeat"); | |
1661 | static TemplateNodeFactory::AutoRegister<TemplateNodeInclude> autoRefInclude("include"); | |
1662 | static TemplateNodeFactory::AutoRegister<TemplateNodeMarkers> autoRefMarkers("markers"); | |
1663 | static TemplateNodeFactory::AutoRegister<TemplateNodeSpaceless> autoRefSpaceless("spaceless"); | |
1664 | @@ -3246,8 +3186,7 @@ void TemplateParser::parse( | |
1665 | command=="endif" || command=="endfor" || | |
1666 | command=="endblock" || command=="endwith" || | |
1667 | command=="endrecursetree" || command=="endspaceless" || | |
1668 | - command=="endmarkers" || command=="endmsg" || | |
1669 | - command=="endrepeat") | |
1670 | + command=="endmarkers" || command=="endmsg") | |
1671 | { | |
1672 | warn(m_templateName,tok->line,"Found tag '%s' without matching start tag",command.data()); | |
1673 | } | |
1674 | @@ -3349,45 +3288,13 @@ void TemplateImpl::render(FTextStream &ts, TemplateContext *c) | |
1675 | class TemplateEngine::Private | |
1676 | { | |
1677 | public: | |
1678 | - Private(TemplateEngine *engine) : m_templateCache(17), m_engine(engine) | |
1679 | - { m_templateCache.setAutoDelete(TRUE); } | |
1680 | - Template *loadByName(const QCString &fileName) const | |
1681 | - { | |
1682 | - Template *templ = m_templateCache.find(fileName); | |
1683 | - if (templ==0) | |
1684 | - { | |
1685 | - QFile f(fileName); | |
1686 | - if (f.open(IO_ReadOnly)) | |
1687 | - { | |
1688 | - uint size=f.size(); | |
1689 | - char *data = new char[size+1]; | |
1690 | - if (data) | |
1691 | - { | |
1692 | - data[size]=0; | |
1693 | - if (f.readBlock(data,f.size())) | |
1694 | - { | |
1695 | - templ = new TemplateImpl(m_engine,fileName,data); | |
1696 | - m_templateCache.insert(fileName,templ); | |
1697 | - } | |
1698 | - delete[] data; | |
1699 | - } | |
1700 | - } | |
1701 | - else | |
1702 | - { | |
1703 | - err("Cound not open template file %s\n",fileName.data()); | |
1704 | - } | |
1705 | - } | |
1706 | - return templ; | |
1707 | - } | |
1708 | - | |
1709 | - private: | |
1710 | - mutable QDict<Template> m_templateCache; | |
1711 | - TemplateEngine *m_engine; | |
1712 | + Private() { templates.setAutoDelete(TRUE); } | |
1713 | + QList<Template> templates; | |
1714 | }; | |
1715 | ||
1716 | TemplateEngine::TemplateEngine() | |
1717 | { | |
1718 | - p = new Private(this); | |
1719 | + p = new Private; | |
1720 | } | |
1721 | ||
1722 | TemplateEngine::~TemplateEngine() | |
1723 | @@ -3400,8 +3307,32 @@ TemplateContext *TemplateEngine::createContext() const | |
1724 | return new TemplateContextImpl; | |
1725 | } | |
1726 | ||
1727 | +Template *TemplateEngine::newTemplate(const QCString &name,const QCString &data) | |
1728 | +{ | |
1729 | + Template *t = new TemplateImpl(this,name,data); | |
1730 | + p->templates.append(t); | |
1731 | + return t; | |
1732 | +} | |
1733 | + | |
1734 | + | |
1735 | Template *TemplateEngine::loadByName(const QCString &fileName) | |
1736 | { | |
1737 | - return p->loadByName(fileName); | |
1738 | + Template *t=0; | |
1739 | + QFile f(fileName); | |
1740 | + if (f.open(IO_ReadOnly)) | |
1741 | + { | |
1742 | + uint size=f.size(); | |
1743 | + char *data = new char[size+1]; | |
1744 | + if (data) | |
1745 | + { | |
1746 | + data[size]=0; | |
1747 | + if (f.readBlock(data,f.size())) | |
1748 | + { | |
1749 | + t = new TemplateImpl(this,fileName,data); | |
1750 | + } | |
1751 | + delete[] data; | |
1752 | + } | |
1753 | + } | |
1754 | + return t; | |
1755 | } | |
1756 | ||
1757 | diff --git a/src/template.h b/src/template.h | |
1758 | index 9e3b106..22dca13 100644 | |
1759 | --- a/src/template.h | |
1760 | +++ b/src/template.h | |
1761 | @@ -443,6 +443,13 @@ class TemplateEngine | |
1762 | */ | |
1763 | TemplateContext *createContext() const; | |
1764 | ||
1765 | + /** Creates a new template whose contents are given by a string. | |
1766 | + * @param[in] name The name of the template. | |
1767 | + * @param[in] data The contents of the template. | |
1768 | + * @return the new template, the caller will be the owner. | |
1769 | + */ | |
1770 | + Template *newTemplate(const QCString &name,const QCString &data); | |
1771 | + | |
1772 | /** Creates a new template whole contents are in a file. | |
1773 | * @param[in] fileName The name of the file containing the | |
1774 | * template data | |
1775 | diff --git a/src/util.cpp b/src/util.cpp | |
1776 | index 545cd43..4df3bff 100644 | |
1777 | --- a/src/util.cpp | |
1778 | +++ b/src/util.cpp | |
1779 | @@ -8081,193 +8081,3 @@ QCString extractDirection(QCString &docs) | |
1780 | return QCString(); | |
1781 | } | |
1782 | ||
1783 | -//----------------------------------------------------------- | |
1784 | - | |
1785 | -/** Computes for a given list type \a inListType, which are the | |
1786 | - * the corresponding list type(s) in the base class that are to be | |
1787 | - * added to this list. | |
1788 | - * | |
1789 | - * So for public inheritance, the mapping is 1-1, so outListType1=inListType | |
1790 | - * Private members are to be hidden completely. | |
1791 | - * | |
1792 | - * For protected inheritance, both protected and public members of the | |
1793 | - * base class should be joined in the protected member section. | |
1794 | - * | |
1795 | - * For private inheritance, both protected and public members of the | |
1796 | - * base class should be joined in the private member section. | |
1797 | - */ | |
1798 | -void convertProtectionLevel( | |
1799 | - MemberListType inListType, | |
1800 | - Protection inProt, | |
1801 | - int *outListType1, | |
1802 | - int *outListType2 | |
1803 | - ) | |
1804 | -{ | |
1805 | - static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE"); | |
1806 | - // default representing 1-1 mapping | |
1807 | - *outListType1=inListType; | |
1808 | - *outListType2=-1; | |
1809 | - if (inProt==Public) | |
1810 | - { | |
1811 | - switch (inListType) // in the private section of the derived class, | |
1812 | - // the private section of the base class should not | |
1813 | - // be visible | |
1814 | - { | |
1815 | - case MemberListType_priMethods: | |
1816 | - case MemberListType_priStaticMethods: | |
1817 | - case MemberListType_priSlots: | |
1818 | - case MemberListType_priAttribs: | |
1819 | - case MemberListType_priStaticAttribs: | |
1820 | - case MemberListType_priTypes: | |
1821 | - *outListType1=-1; | |
1822 | - *outListType2=-1; | |
1823 | - break; | |
1824 | - default: | |
1825 | - break; | |
1826 | - } | |
1827 | - } | |
1828 | - else if (inProt==Protected) // Protected inheritance | |
1829 | - { | |
1830 | - switch (inListType) // in the protected section of the derived class, | |
1831 | - // both the public and protected members are shown | |
1832 | - // as protected | |
1833 | - { | |
1834 | - case MemberListType_pubMethods: | |
1835 | - case MemberListType_pubStaticMethods: | |
1836 | - case MemberListType_pubSlots: | |
1837 | - case MemberListType_pubAttribs: | |
1838 | - case MemberListType_pubStaticAttribs: | |
1839 | - case MemberListType_pubTypes: | |
1840 | - case MemberListType_priMethods: | |
1841 | - case MemberListType_priStaticMethods: | |
1842 | - case MemberListType_priSlots: | |
1843 | - case MemberListType_priAttribs: | |
1844 | - case MemberListType_priStaticAttribs: | |
1845 | - case MemberListType_priTypes: | |
1846 | - *outListType1=-1; | |
1847 | - *outListType2=-1; | |
1848 | - break; | |
1849 | - | |
1850 | - case MemberListType_proMethods: | |
1851 | - *outListType2=MemberListType_pubMethods; | |
1852 | - break; | |
1853 | - case MemberListType_proStaticMethods: | |
1854 | - *outListType2=MemberListType_pubStaticMethods; | |
1855 | - break; | |
1856 | - case MemberListType_proSlots: | |
1857 | - *outListType2=MemberListType_pubSlots; | |
1858 | - break; | |
1859 | - case MemberListType_proAttribs: | |
1860 | - *outListType2=MemberListType_pubAttribs; | |
1861 | - break; | |
1862 | - case MemberListType_proStaticAttribs: | |
1863 | - *outListType2=MemberListType_pubStaticAttribs; | |
1864 | - break; | |
1865 | - case MemberListType_proTypes: | |
1866 | - *outListType2=MemberListType_pubTypes; | |
1867 | - break; | |
1868 | - default: | |
1869 | - break; | |
1870 | - } | |
1871 | - } | |
1872 | - else if (inProt==Private) | |
1873 | - { | |
1874 | - switch (inListType) // in the private section of the derived class, | |
1875 | - // both the public and protected members are shown | |
1876 | - // as private | |
1877 | - { | |
1878 | - case MemberListType_pubMethods: | |
1879 | - case MemberListType_pubStaticMethods: | |
1880 | - case MemberListType_pubSlots: | |
1881 | - case MemberListType_pubAttribs: | |
1882 | - case MemberListType_pubStaticAttribs: | |
1883 | - case MemberListType_pubTypes: | |
1884 | - case MemberListType_proMethods: | |
1885 | - case MemberListType_proStaticMethods: | |
1886 | - case MemberListType_proSlots: | |
1887 | - case MemberListType_proAttribs: | |
1888 | - case MemberListType_proStaticAttribs: | |
1889 | - case MemberListType_proTypes: | |
1890 | - *outListType1=-1; | |
1891 | - *outListType2=-1; | |
1892 | - break; | |
1893 | - | |
1894 | - case MemberListType_priMethods: | |
1895 | - if (extractPrivate) | |
1896 | - { | |
1897 | - *outListType1=MemberListType_pubMethods; | |
1898 | - *outListType2=MemberListType_proMethods; | |
1899 | - } | |
1900 | - else | |
1901 | - { | |
1902 | - *outListType1=-1; | |
1903 | - *outListType2=-1; | |
1904 | - } | |
1905 | - break; | |
1906 | - case MemberListType_priStaticMethods: | |
1907 | - if (extractPrivate) | |
1908 | - { | |
1909 | - *outListType1=MemberListType_pubStaticMethods; | |
1910 | - *outListType2=MemberListType_proStaticMethods; | |
1911 | - } | |
1912 | - else | |
1913 | - { | |
1914 | - *outListType1=-1; | |
1915 | - *outListType2=-1; | |
1916 | - } | |
1917 | - break; | |
1918 | - case MemberListType_priSlots: | |
1919 | - if (extractPrivate) | |
1920 | - { | |
1921 | - *outListType1=MemberListType_pubSlots; | |
1922 | - *outListType1=MemberListType_proSlots; | |
1923 | - } | |
1924 | - else | |
1925 | - { | |
1926 | - *outListType1=-1; | |
1927 | - *outListType2=-1; | |
1928 | - } | |
1929 | - break; | |
1930 | - case MemberListType_priAttribs: | |
1931 | - if (extractPrivate) | |
1932 | - { | |
1933 | - *outListType1=MemberListType_pubAttribs; | |
1934 | - *outListType2=MemberListType_proAttribs; | |
1935 | - } | |
1936 | - else | |
1937 | - { | |
1938 | - *outListType1=-1; | |
1939 | - *outListType2=-1; | |
1940 | - } | |
1941 | - break; | |
1942 | - case MemberListType_priStaticAttribs: | |
1943 | - if (extractPrivate) | |
1944 | - { | |
1945 | - *outListType1=MemberListType_pubStaticAttribs; | |
1946 | - *outListType2=MemberListType_proStaticAttribs; | |
1947 | - } | |
1948 | - else | |
1949 | - { | |
1950 | - *outListType1=-1; | |
1951 | - *outListType2=-1; | |
1952 | - } | |
1953 | - break; | |
1954 | - case MemberListType_priTypes: | |
1955 | - if (extractPrivate) | |
1956 | - { | |
1957 | - *outListType1=MemberListType_pubTypes; | |
1958 | - *outListType2=MemberListType_proTypes; | |
1959 | - } | |
1960 | - else | |
1961 | - { | |
1962 | - *outListType1=-1; | |
1963 | - *outListType2=-1; | |
1964 | - } | |
1965 | - break; | |
1966 | - default: | |
1967 | - break; | |
1968 | - } | |
1969 | - } | |
1970 | - //printf("convertProtectionLevel(type=%d prot=%d): %d,%d\n", | |
1971 | - // inListType,inProt,*outListType1,*outListType2); | |
1972 | -} | |
1973 | diff --git a/src/util.h b/src/util.h | |
1974 | index a36a769..23795f4 100644 | |
1975 | --- a/src/util.h | |
1976 | +++ b/src/util.h | |
1977 | @@ -448,12 +448,5 @@ uint getUtf8CodeToUpper( const QCString& s, int idx ); | |
1978 | ||
1979 | QCString extractDirection(QCString &docs); | |
1980 | ||
1981 | -void convertProtectionLevel( | |
1982 | - MemberListType inListType, | |
1983 | - Protection inProt, | |
1984 | - int *outListType1, | |
1985 | - int *outListType2 | |
1986 | - ); | |
1987 | - | |
1988 | #endif | |
1989 |