Chameleon

Chameleon Svn Source Tree

Root/branches/xZenu/src/util/doxygen/src/memberlist.cpp

Source at commit 1322 created 9 years 5 months ago.
By meklort, Add doxygen to utils folder
1/******************************************************************************
2 *
3 * $Id: memberlist.cpp,v 1.35 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#include <qregexp.h>
19
20#include "memberlist.h"
21#include "classdef.h"
22#include "message.h"
23#include "util.h"
24#include "language.h"
25#include "doxygen.h"
26#include "outputlist.h"
27#include "groupdef.h"
28#include "marshal.h"
29#include "vhdldocgen.h"
30
31MemberList::MemberList()
32{
33}
34
35MemberList::MemberList(ListType lt) : m_listType(lt)
36{
37 memberGroupList=0;
38 m_numDecMembers=-1; // special value indicating that value needs to be computed
39 m_numDocMembers=-1; // special value indicating that value needs to be computed
40 m_inGroup=FALSE;
41 m_inFile=FALSE;
42 m_needsSorting=FALSE;
43}
44
45MemberList::~MemberList()
46{
47 delete memberGroupList;
48}
49
50int MemberList::compareItems(GCI item1, GCI item2)
51{
52 static bool sortConstructorsFirst = Config_getBool("SORT_MEMBERS_CTORS_1ST");
53 MemberDef *c1=(MemberDef *)item1;
54 MemberDef *c2=(MemberDef *)item2;
55 if (sortConstructorsFirst) {
56 int ord1 = c1->isConstructor() ? 2 : (c1->isDestructor() ? 1 : 0);
57 int ord2 = c2->isConstructor() ? 2 : (c2->isDestructor() ? 1 : 0);
58 if (ord1 > ord2)
59 return -1;
60 else if (ord2 > ord1)
61 return 1;
62 }
63 return stricmp(c1->name(),c2->name());
64}
65
66/*! Count the number of members in this list that are visible in
67 * the declaration part of a compound's documentation page.
68 */
69void MemberList::countDecMembers(bool countEnumValues,GroupDef *gd)
70{
71 if (m_numDecMembers!=-1) return;
72
73 //printf("----- countDecMembers count=%d ----\n",count());
74 m_varCnt=m_funcCnt=m_enumCnt=m_enumValCnt=0;
75 m_typeCnt=m_protoCnt=m_defCnt=m_friendCnt=0;
76 m_numDecMembers=0;
77 QListIterator<MemberDef> mli(*this);
78 MemberDef *md;
79 for (mli.toFirst();(md=mli.current());++mli)
80 {
81 //printf("MemberList::countDecMembers(md=%s,%d)\n",md->name().data(),md->isBriefSectionVisible());
82 if (md->isBriefSectionVisible())
83 {
84 switch(md->memberType())
85 {
86 case MemberDef::Variable: // fall through
87 case MemberDef::Event: // fall through
88 case MemberDef::Property: m_varCnt++,m_numDecMembers++;
89 break;
90 case MemberDef::Function: // fall through
91 case MemberDef::Signal: // fall through
92 case MemberDef::DCOP: // fall through
93 case MemberDef::Slot: if (!md->isRelated() || md->getClassDef())
94 m_funcCnt++,m_numDecMembers++;
95 break;
96 case MemberDef::Enumeration: m_enumCnt++,m_numDecMembers++; break;
97 case MemberDef::EnumValue: if (countEnumValues)
98 m_enumValCnt++,m_numDecMembers++;
99 break;
100 case MemberDef::Typedef: m_typeCnt++,m_numDecMembers++; break;
101 //case MemberDef::Prototype: m_protoCnt++,m_numDecMembers++; break;
102 case MemberDef::Define: if (Config_getBool("EXTRACT_ALL") ||
103 md->argsString() ||
104 !md->initializer().isEmpty() ||
105 md->hasDocumentation()
106 ) m_defCnt++,m_numDecMembers++;
107 break;
108 case MemberDef::Friend: m_friendCnt++,m_numDecMembers++;
109 break;
110 default:
111 err("Error: Unknown member type found for member `%s'\n!",md->name().data());
112 }
113 }
114 }
115 if (memberGroupList)
116 {
117 MemberGroupListIterator mgli(*memberGroupList);
118 MemberGroup *mg;
119 for (;(mg=mgli.current());++mgli)
120 {
121 mg->countDecMembers(gd);
122 m_varCnt+=mg->varCount();
123 m_funcCnt+=mg->funcCount();
124 m_enumCnt+=mg->enumCount();
125 m_enumValCnt+=mg->enumValueCount();
126 m_typeCnt+=mg->typedefCount();
127 m_protoCnt+=mg->protoCount();
128 m_defCnt+=mg->defineCount();
129 m_friendCnt+=mg->friendCount();
130 m_numDecMembers+=mg->numDecMembers();
131 }
132 }
133 //printf("----- end countDecMembers ----\n");
134
135 //printf("MemberList::countDecMembers()=%d\n",m_numDecMembers);
136}
137
138void MemberList::countDocMembers(bool countEnumValues)
139{
140 if (m_numDocMembers!=-1) return; // used cached value
141 m_numDocMembers=0;
142 QListIterator<MemberDef> mli(*this);
143 MemberDef *md;
144 for (mli.toFirst();(md=mli.current());++mli)
145 {
146 if (md->isDetailedSectionVisible(m_inGroup,m_inFile))
147 {
148 // do not count enum values, since they do not produce entries of their own
149 if (countEnumValues || md->memberType()!=MemberDef::EnumValue)
150 m_numDocMembers++;
151 }
152 }
153 if (memberGroupList)
154 {
155 MemberGroupListIterator mgli(*memberGroupList);
156 MemberGroup *mg;
157 for (;(mg=mgli.current());++mgli)
158 {
159 mg->countDocMembers();
160 m_numDocMembers+=mg->numDocMembers();
161 }
162 }
163 //printf("MemberList::countDocMembers()=%d memberGroupList=%p\n",m_numDocMembers,memberGroupList);
164}
165
166bool MemberList::insert(uint index,const MemberDef *md)
167{
168 return QList<MemberDef>::insert(index,md);
169}
170
171void MemberList::inSort(const MemberDef *md)
172{
173 QList<MemberDef>::inSort(md);
174}
175
176void MemberList::append(const MemberDef *md)
177{
178 QList<MemberDef>::append(md);
179}
180
181MemberListIterator::MemberListIterator(const QList<MemberDef> &l) :
182 QListIterator<MemberDef>(l)
183{
184}
185
186bool MemberList::declVisible() const
187{
188 MemberListIterator mli(*this);
189 MemberDef *md;
190 for ( ; (md=mli.current()); ++mli )
191 {
192 if (md->isBriefSectionVisible())
193 {
194 switch (md->memberType())
195 {
196 case MemberDef::Define: // fall through
197 case MemberDef::Typedef: // fall through
198 case MemberDef::Variable: // fall through
199 case MemberDef::Function: // fall through
200 case MemberDef::Signal: // fall through
201 case MemberDef::Slot: // fall through
202 case MemberDef::DCOP: // fall through
203 case MemberDef::Property: // fall through
204 case MemberDef::Event:
205 return TRUE;
206 case MemberDef::Enumeration:
207 {
208 int enumVars=0;
209 MemberListIterator vmli(*this);
210 MemberDef *vmd;
211 QCString name(md->name());
212 int i=name.findRev("::");
213 if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
214 if (name[0]=='@') // anonymous enum => append variables
215 {
216 for ( ; (vmd=vmli.current()) ; ++vmli)
217 {
218 QCString vtype=vmd->typeString();
219 if ((vtype.find(name))!=-1)
220 {
221 enumVars++;
222 }
223 }
224 }
225 // if this is an anonymous enum and there are variables of this
226 // enum type (i.e. enumVars>0), then we do not show the enum here.
227 if (enumVars==0) // show enum here
228 {
229 return TRUE;
230 }
231 }
232 break;
233 case MemberDef::Friend:
234 return TRUE;
235 case MemberDef::EnumValue:
236 {
237 if (m_inGroup)
238 {
239 return TRUE;
240 }
241 }
242 break;
243 }
244 }
245 }
246 return FALSE;
247}
248
249void MemberList::writePlainDeclarations(OutputList &ol,
250 ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd
251 )
252{
253 //printf("----- writePlainDeclaration() ----\n");
254 countDecMembers();
255 if (numDecMembers()==0)
256 {
257 //printf(" --> no members!\n");
258 return; // no members in this list
259 }
260 //printf(" --> writePlainDeclaration() numDecMembers()=%d\n",
261 // numDecMembers());
262
263 ol.pushGeneratorState();
264
265 bool first=TRUE;
266 MemberDef *md;
267 MemberListIterator mli(*this);
268 for ( ; (md=mli.current()); ++mli )
269 {
270 //printf(">>> Member `%s' type=%d visible=%d\n",
271 // md->name().data(),md->memberType(),md->isBriefSectionVisible());
272 if (md->isBriefSectionVisible())
273 {
274 switch(md->memberType())
275 {
276 case MemberDef::Define: // fall through
277 //case MemberDef::Prototype: // fall through
278 case MemberDef::Typedef: // fall through
279 case MemberDef::Variable: // fall through
280 case MemberDef::Function: // fall through
281 case MemberDef::Signal: // fall through
282 case MemberDef::Slot: // fall through
283 case MemberDef::DCOP: // fall through
284 case MemberDef::Property: // fall through
285 case MemberDef::Event:
286 {
287 if (first) ol.startMemberList(),first=FALSE;
288 md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
289 break;
290 }
291 case MemberDef::Enumeration:
292 {
293 int enumVars=0;
294 MemberListIterator vmli(*this);
295 MemberDef *vmd;
296 QCString name(md->name());
297 int i=name.findRev("::");
298 if (i!=-1) name=name.right(name.length()-i-2); // strip scope (TODO: is this needed?)
299 if (name[0]=='@') // anonymous enum => append variables
300 {
301 for ( ; (vmd=vmli.current()) ; ++vmli)
302 {
303 QCString vtype=vmd->typeString();
304 if ((vtype.find(name))!=-1)
305 {
306 enumVars++;
307 vmd->setAnonymousEnumType(md);
308 }
309 }
310 }
311 // if this is an anonymous enum and there are variables of this
312 // enum type (i.e. enumVars>0), then we do not show the enum here.
313 if (enumVars==0) // show enum here
314 {
315 //printf("Enum!!\n");
316 if (first)
317 {
318 ol.startMemberList();
319 first=FALSE;
320 }
321 ol.startMemberItem(0);
322 ol.writeString("enum ");
323 ol.insertMemberAlign();
324 md->writeEnumDeclaration(ol,cd,nd,fd,gd);
325 ol.endMemberItem();
326 if (!md->briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
327 {
328 ol.startMemberDescription();
329 ol.parseDoc(
330 md->briefFile(),md->briefLine(),
331 cd,md,
332 md->briefDescription(),
333 TRUE,FALSE,0,TRUE,FALSE
334 );
335 if (md->isDetailedSectionLinkable())
336 {
337 ol.disableAllBut(OutputGenerator::Html);
338 ol.docify(" ");
339 ol.startTextLink(md->getOutputFileBase(),
340 md->anchor());
341 ol.parseText(theTranslator->trMore());
342 ol.endTextLink();
343 ol.enableAll();
344 }
345 ol.endMemberDescription();
346 }
347 }
348 md->warnIfUndocumented();
349 break;
350 }
351 case MemberDef::Friend:
352 {
353 if (first)
354 {
355 ol.startMemberList();
356 first=FALSE;
357 }
358 md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
359 break;
360 }
361 case MemberDef::EnumValue:
362 {
363 if (m_inGroup)
364 {
365 //printf("EnumValue!\n");
366 if (first) ol.startMemberList(),first=FALSE;
367 md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
368 }
369 }
370 break;
371 }
372 }
373 }
374
375 // handle members that are inside anonymous compounds and for which
376 // no variables of the anonymous compound type exist.
377 if (cd)
378 {
379 MemberListIterator mli(*this);
380 for ( ; (md=mli.current()) ; ++mli )
381 {
382 if (md->fromAnonymousScope() && !md->anonymousDeclShown())
383 {
384 md->setFromAnonymousScope(FALSE);
385 //printf("anonymous compound members\n");
386 if (md->isBriefSectionVisible())
387 {
388 if (first)
389 {
390 ol.startMemberList();
391 first=FALSE;
392 }
393 md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
394 }
395 md->setFromAnonymousScope(TRUE);
396 }
397 }
398 }
399
400 if (!first)
401 {
402 ol.endMemberList();
403 }
404
405 ol.popGeneratorState();
406 //printf("----- end writePlainDeclaration() ----\n");
407}
408
409void MemberList::writeDeclarations(OutputList &ol,
410 ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
411 const char *title,const char *subtitle, bool showEnumValues,
412 bool showInline)
413{
414 //printf("----- writeDeclaration() this=%p ----\n",this);
415 static bool optimizeVhdl = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
416
417 countDecMembers(showEnumValues,gd); // count members shown in this section
418 Definition *ctx = cd;
419 if (ctx==0 && nd) ctx = nd;
420 if (ctx==0 && gd) ctx = gd;
421 if (ctx==0 && fd) ctx = fd;
422
423 if (numDecMembers()==0) return;
424 //printf("%p: MemberList::writeDeclaration(title=`%s',subtitle=`%s')=%d\n",
425 // this,title,subtitle,numDecMembers());
426 if (title)
427 {
428 if (showInline)
429 {
430 ol.startInlineHeader();
431 }
432 else
433 {
434 ol.startMemberHeader(listTypeAsString());
435 }
436 ol.parseText(title);
437 if (showInline)
438 {
439 ol.endInlineHeader();
440 }
441 else
442 {
443 ol.endMemberHeader();
444 }
445 }
446 if (subtitle)
447 {
448 QCString st=subtitle;
449 st = st.stripWhiteSpace();
450 if (!st.isEmpty())
451 {
452 ol.startMemberSubtitle();
453 ol.parseDoc("[generated]",-1,ctx,0,subtitle,FALSE,FALSE,0,FALSE,FALSE);
454 ol.endMemberSubtitle();
455 }
456 }
457
458 // TODO: Two things need to be worked out for proper VHDL output:
459 // 1. Signals and types under the group need to be
460 // formatted to associate them with the group somehow
461 // indentation, or at the very least, extra space after
462 // the group is done
463 // 2. This might need to be repeated below for memberGroupLists
464 if (optimizeVhdl) // use specific declarations function
465 {
466 VhdlDocGen::writeVhdlDeclarations(this,ol,0,cd,0);
467 }
468 else
469 {
470 writePlainDeclarations(ol,cd,nd,fd,gd);
471 }
472
473 //printf("memberGroupList=%p\n",memberGroupList);
474 if (memberGroupList)
475 {
476 MemberGroupListIterator mgli(*memberGroupList);
477 MemberGroup *mg;
478 while ((mg=mgli.current()))
479 {
480 bool hasHeader=!mg->header().isEmpty() && mg->header()!="[NOHEADER]";
481 //printf("mg->header=%s hasHeader=%d\n",mg->header().data(),hasHeader);
482 ol.startMemberGroupHeader(hasHeader);
483 if (hasHeader)
484 {
485 ol.parseText(mg->header());
486 }
487 ol.endMemberGroupHeader();
488 if (!mg->documentation().isEmpty())
489 {
490 //printf("Member group has docs!\n");
491 ol.startMemberGroupDocs();
492 ol.parseDoc("[generated]",-1,ctx,0,mg->documentation()+"\n",FALSE,FALSE);
493 ol.endMemberGroupDocs();
494 }
495 ol.startMemberGroup();
496 //printf("--- mg->writePlainDeclarations ---\n");
497 mg->writePlainDeclarations(ol,cd,nd,fd,gd);
498 ol.endMemberGroup(hasHeader);
499 ++mgli;
500 }
501 }
502 //printf("----- end writeDeclaration() ----\n");
503
504}
505
506void MemberList::writeDocumentation(OutputList &ol,
507 const char *scopeName, Definition *container,
508 const char *title,bool showEnumValues,bool showInline)
509{
510 //printf("MemberList::writeDocumentation()\n");
511
512 countDocMembers(showEnumValues);
513 if (numDocMembers()==0) return;
514
515 if (title)
516 {
517 ol.writeRuler();
518 ol.startGroupHeader(showInline ? 2 : 0);
519 ol.parseText(title);
520 ol.endGroupHeader(showInline ? 2 : 0);
521 }
522 ol.startMemberDocList();
523
524 MemberListIterator mli(*this);
525 MemberDef *md;
526 for ( ; (md=mli.current()) ; ++mli)
527 {
528 md->writeDocumentation(this,ol,scopeName,container,
529 m_inGroup,showEnumValues,showInline);
530 }
531 if (memberGroupList)
532 {
533 //printf("MemberList::writeDocumentation() -- member groups\n");
534 MemberGroupListIterator mgli(*memberGroupList);
535 MemberGroup *mg;
536 for (;(mg=mgli.current());++mgli)
537 {
538 mg->writeDocumentation(ol,scopeName,container,showEnumValues,showInline);
539 }
540 }
541 ol.endMemberDocList();
542}
543
544void MemberList::writeDocumentationPage(OutputList &ol,
545 const char *scopeName, Definition *container)
546{
547 static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
548 MemberListIterator mli(*this);
549 MemberDef *md;
550 for ( ; (md=mli.current()) ; ++mli)
551 {
552 QCString diskName=md->getOutputFileBase();
553 QCString title=md->qualifiedName();
554 startFile(ol,diskName,md->name(),title,HLI_None,!generateTreeView,
555 container->getOutputFileBase());
556 if (!generateTreeView)
557 {
558 container->writeNavigationPath(ol);
559 ol.endQuickIndices();
560 }
561 ol.startContents();
562
563 ol.writeString("<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">\n"
564 " <tr>\n"
565 " <td valign=\"top\">\n");
566
567 container->writeQuickMemberLinks(ol,md);
568
569 ol.writeString(" </td>\n");
570 ol.writeString(" <td valign=\"top\" class=\"mempage\">\n");
571
572 md->writeDocumentation(this,ol,scopeName,container,m_inGroup);
573
574 ol.writeString(" </td>\n");
575 ol.writeString(" </tr>\n");
576 ol.writeString("</table>\n");
577
578
579 if (generateTreeView)
580 {
581 ol.endContents();
582 container->writeNavigationPath(ol);
583 endFile(ol,TRUE);
584 }
585 else
586 {
587 endFile(ol);
588 }
589 }
590 if (memberGroupList)
591 {
592 //printf("MemberList::writeDocumentation() -- member groups\n");
593 MemberGroupListIterator mgli(*memberGroupList);
594 MemberGroup *mg;
595 for (;(mg=mgli.current());++mgli)
596 {
597 mg->writeDocumentationPage(ol,scopeName,container);
598 }
599 }
600}
601
602void MemberList::addMemberGroup(MemberGroup *mg)
603{
604 if (memberGroupList==0)
605 {
606 memberGroupList=new MemberGroupList;
607 }
608 //printf("addMemberGroup: this=%p mg=%p\n",this,mg);
609 memberGroupList->append(mg);
610}
611
612void MemberList::addListReferences(Definition *def)
613{
614 MemberListIterator mli(*this);
615 MemberDef *md;
616 for ( ; (md=mli.current()) ; ++mli)
617 {
618 if (md->getGroupDef()==0 || def->definitionType()==Definition::TypeGroup)
619 {
620 md->addListReference(def);
621 LockingPtr<MemberList> enumFields = md->enumFieldList();
622 if (md->memberType()==MemberDef::Enumeration && enumFields!=0)
623 {
624 //printf(" Adding enum values!\n");
625 MemberListIterator vmli(*enumFields);
626 MemberDef *vmd;
627 for ( ; (vmd=vmli.current()) ; ++vmli)
628 {
629 //printf(" adding %s\n",vmd->name().data());
630 vmd->addListReference(def);
631 }
632 }
633 }
634 }
635 if (memberGroupList)
636 {
637 MemberGroupListIterator mgli(*memberGroupList);
638 MemberGroup *mg;
639 for (;(mg=mgli.current());++mgli)
640 {
641 mg->addListReferences(def);
642 }
643 }
644}
645
646void MemberList::findSectionsInDocumentation()
647{
648 MemberListIterator mli(*this);
649 MemberDef *md;
650 for ( ; (md=mli.current()) ; ++mli)
651 {
652 md->findSectionsInDocumentation();
653 }
654 if (memberGroupList)
655 {
656 MemberGroupListIterator mgli(*memberGroupList);
657 MemberGroup *mg;
658 for (;(mg=mgli.current());++mgli)
659 {
660 mg->findSectionsInDocumentation();
661 }
662 }
663}
664
665void MemberList::marshal(StorageIntf *s)
666{
667 marshalInt(s,(int)m_listType);
668 marshalInt(s,m_varCnt);
669 marshalInt(s,m_funcCnt);
670 marshalInt(s,m_enumCnt);
671 marshalInt(s,m_enumValCnt);
672 marshalInt(s,m_typeCnt);
673 marshalInt(s,m_protoCnt);
674 marshalInt(s,m_defCnt);
675 marshalInt(s,m_friendCnt);
676 marshalInt(s,m_numDecMembers);
677 marshalInt(s,m_numDocMembers);
678 marshalBool(s,m_inGroup);
679 marshalBool(s,m_inFile);
680 marshalBool(s,m_needsSorting);
681 if (memberGroupList==0)
682 {
683 marshalUInt(s,NULL_LIST); // null pointer representation
684 }
685 else
686 {
687 marshalUInt(s,memberGroupList->count());
688 QListIterator<MemberGroup> mgi(*memberGroupList);
689 MemberGroup *mg=0;
690 for (mgi.toFirst();(mg=mgi.current());++mgi)
691 {
692 mg->marshal(s);
693 }
694 }
695}
696
697void MemberList::unmarshal(StorageIntf *s)
698{
699 m_listType = (MemberList::ListType)unmarshalInt(s);
700 m_varCnt = unmarshalInt(s);
701 m_funcCnt = unmarshalInt(s);
702 m_enumCnt = unmarshalInt(s);
703 m_enumValCnt = unmarshalInt(s);
704 m_typeCnt = unmarshalInt(s);
705 m_protoCnt = unmarshalInt(s);
706 m_defCnt = unmarshalInt(s);
707 m_friendCnt = unmarshalInt(s);
708 m_numDecMembers = unmarshalInt(s);
709 m_numDocMembers = unmarshalInt(s);
710 m_inGroup = unmarshalBool(s);
711 m_inFile = unmarshalBool(s);
712 m_needsSorting = unmarshalBool(s);
713 uint i,count = unmarshalUInt(s);
714 if (count==NULL_LIST) // empty list
715 {
716 memberGroupList = 0;
717 }
718 else // add member groups
719 {
720 memberGroupList = new MemberGroupList;
721 for (i=0;i<count;i++)
722 {
723 MemberGroup *mg = new MemberGroup;
724 mg->unmarshal(s);
725 memberGroupList->append(mg);
726 }
727 }
728}
729
730QCString MemberList::listTypeAsString() const
731{
732 switch(m_listType)
733 {
734 case pubMethods: return "pub-methods";
735 case proMethods: return "pro-methods";
736 case pacMethods: return "pac-methods";
737 case priMethods: return "pri-methods";
738 case pubStaticMethods: return "pub-static-methods";
739 case proStaticMethods: return "pro-static-methods";
740 case pacStaticMethods: return "pac-static-methods";
741 case priStaticMethods: return "pri-static-methods";
742 case pubSlots: return "pub-slots";
743 case proSlots: return "pro-slots";
744 case priSlots: return "pri-slots";
745 case pubAttribs: return "pub-attribs";
746 case proAttribs: return "pro-attribs";
747 case pacAttribs: return "pac-attribs";
748 case priAttribs: return "pri-attribs";
749 case pubStaticAttribs: return "pub-static-attribs";
750 case proStaticAttribs: return "pro-static-attribs";
751 case pacStaticAttribs: return "pac-static-attribs";
752 case priStaticAttribs: return "pri-static-attribs";
753 case pubTypes: return "pub-types";
754 case proTypes: return "pro-types";
755 case pacTypes: return "pac-types";
756 case priTypes: return "pri-types";
757 case related: return "related";
758 case signals: return "signals";
759 case friends: return "friends";
760 case dcopMethods: return "dcop-methods";
761 case properties: return "properties";
762 case events: return "events";
763 case decDefineMembers: return "define-members";
764 case decProtoMembers: return "proto-members";
765 case decTypedefMembers: return "typedef-members";
766 case decEnumMembers: return "enum-members";
767 case decFuncMembers: return "func-members";
768 case decVarMembers: return "var-members";
769 case decEnumValMembers: return "enumval-members";
770 case decPubSlotMembers: return "pub-slot-members";
771 case decProSlotMembers: return "pro-slot-members";
772 case decPriSlotMembers: return "pri-slot-members";
773 case decSignalMembers: return "signal-members";
774 case decEventMembers: return "event-members";
775 case decFriendMembers: return "friend-members";
776 case decPropMembers: return "prop-members";
777 case enumFields: return "enum-fields";
778 case memberGroup: return "member-group";
779 default: break;
780 }
781 return "";
782}
783
784void MemberList::setNeedsSorting(bool b)
785{
786 m_needsSorting = b;
787}
788
789//--------------------------------------------------------------------------
790
791int MemberSDict::compareItems(GCI item1, GCI item2)
792{
793 MemberDef *c1=(MemberDef *)item1;
794 MemberDef *c2=(MemberDef *)item2;
795 return stricmp(c1->name(),c2->name());
796}
797
798
799

Archive Download this file

Revision: 1322