classdef.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  *
4  *
5  * Copyright (C) 1997-2015 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 <stdio.h>
19 #include <qfile.h>
20 #include <qregexp.h>
21 #include "classdef.h"
22 #include "classlist.h"
23 #include "entry.h"
24 #include "doxygen.h"
25 #include "membername.h"
26 #include "message.h"
27 #include "config.h"
28 #include "util.h"
29 #include "diagram.h"
30 #include "language.h"
31 #include "htmlhelp.h"
32 #include "example.h"
33 #include "outputlist.h"
34 #include "dot.h"
35 #include "defargs.h"
36 #include "debug.h"
37 #include "docparser.h"
38 #include "searchindex.h"
39 #include "vhdldocgen.h"
40 #include "layout.h"
41 #include "arguments.h"
42 #include "memberlist.h"
43 #include "groupdef.h"
44 #include "filedef.h"
45 #include "namespacedef.h"
46 #include "membergroup.h"
47 
48 //-----------------------------------------------------------------------------
49 
50 /** Private data associated with a ClassDef object. */
52 {
53  public:
54  ClassDefImpl();
55  ~ClassDefImpl();
56  void init(const char *defFileName, const char *name,
57  const QCString &ctStr, const char *fName);
58 
59  /*! file name that forms the base for the output file containing the
60  * class documentation. For compatibility with Qt (e.g. links via tag
61  * files) this name cannot be derived from the class name directly.
62  */
64 
65  /*! Include information about the header file should be included
66  * in the documentation. 0 by default, set by setIncludeFile().
67  */
69 
70  /*! List of base class (or super-classes) from which this class derives
71  * directly.
72  */
74 
75  /*! List of sub-classes that directly derive from this class
76  */
78 
79  /*! Namespace this class is part of
80  * (this is the inner most namespace in case of nested namespaces)
81  */
83 
84  /*! File this class is defined in */
86 
87  /*! List of all members (including inherited members) */
89 
90  /*! Template arguments of this class */
92 
93  /*! Type constraints for template parameters */
95 
96  /*! Files that were used for generating the class documentation. */
98 
99  /*! Examples that use this class */
101 
102  /*! Holds the kind of "class" this is. */
104 
105  /*! The protection level in which this class was found.
106  * Typically Public, but for nested classes this can also be Protected
107  * or Private.
108  */
110 
111  /*! The inner classes contained in this class. Will be 0 if there are
112  * no inner classes.
113  */
115 
116  /* classes for the collaboration diagram */
120 
122 
123  /*! Template instances that exists of this class, the key in the
124  * dictionary is the template argument list.
125  */
126  QDict<ClassDef> *templateInstances;
127 
128  /*! Template instances that exists of this class, as defined by variables.
129  * We do NOT want to document these individually. The key in the
130  * dictionary is the template argument list.
131  */
132  QDict<ClassDef> *variableInstances;
133 
134  QDict<int> *templBaseClassNames;
135 
136  /*! The class this class is an instance of. */
138 
139  /*! local class name which could be a typedef'ed alias name. */
141 
142  /*! If this class is a Objective-C category, then this points to the
143  * class which is extended.
144  */
146 
148 
149  /* user defined member groups */
151 
152  /*! Is this an abstact class? */
154 
155  /*! Is the class part of an unnamed namespace? */
156  bool isStatic;
157 
158  /*! TRUE if classes members are merged with those of the base classes. */
160 
161  /*! TRUE if the class is defined in a source file rather than a header file. */
162  bool isLocal;
163 
165 
166  /*! Does this class group its user-grouped members
167  * as a sub-section of the normal (public/protected/..)
168  * groups?
169  */
171 
172  /** Reason of existence is a "use" relation */
173  bool usedOnly;
174 
175  /** List of titles to use for the summary */
177 
178  /** Is this a simple (non-nested) C structure? */
179  bool isSimple;
180 
181  /** Does this class overloaded the -> operator? */
183 
186 
187  /** Does this class represent a Java style enum? */
189 
190  bool isGeneric;
191 
193 
195 };
196 
197 void ClassDefImpl::init(const char *defFileName, const char *name,
198  const QCString &ctStr, const char *fName)
199 {
200  if (fName)
201  {
202  fileName=stripExtension(fName);
203  }
204  else
205  {
206  fileName=ctStr+name;
207  }
208  exampleSDict = 0;
209  inherits = 0;
210  inheritedBy = 0;
212  incInfo=0;
213  tempArgs=0;
214  typeConstraints=0;
215  prot=Public;
216  nspace=0;
217  fileDef=0;
222  memberGroupSDict = 0;
223  innerClasses = 0;
224  subGrouping=Config_getBool("SUBGROUPING");
225  templateInstances = 0;
226  variableInstances = 0;
227  templateMaster =0;
229  isAbstract = FALSE;
230  isStatic = FALSE;
231  isTemplArg = FALSE;
233  categoryOf = 0;
234  usedOnly = FALSE;
235  isSimple = Config_getBool("INLINE_SIMPLE_STRUCTS");
236  arrowOperator = 0;
237  taggedInnerClasses = 0;
238  tagLessRef = 0;
239  spec=0;
240  //QCString ns;
241  //extractNamespaceName(name,className,ns);
242  //printf("m_name=%s m_className=%s ns=%s\n",m_name.data(),m_className.data(),ns.data());
243 
244  // we cannot use getLanguage at this point, as setLanguage has not been called.
245  SrcLangExt lang = getLanguageFromFileName(defFileName);
246  if ((lang==SrcLangExt_Cpp || lang==SrcLangExt_ObjC) &&
247  guessSection(defFileName)==Entry::SOURCE_SEC)
248  {
249  isLocal=TRUE;
250  }
251  else
252  {
253  isLocal=FALSE;
254  }
255  isGeneric = (lang==SrcLangExt_CSharp || lang==SrcLangExt_Java) && QCString(name).find('<')!=-1;
256  isAnonymous = QCString(name).find('@')!=-1;
257 }
258 
260 {
262 }
263 
265 {
266  delete inherits;
267  delete inheritedBy;
268  delete allMemberNameInfoSDict;
269  delete exampleSDict;
270  delete usesImplClassDict;
271  delete usedByImplClassDict;
272  delete usesIntfClassDict;
273  delete constraintClassDict;
274  delete incInfo;
275  delete memberGroupSDict;
276  delete innerClasses;
277  delete templateInstances;
278  delete variableInstances;
279  delete templBaseClassNames;
280  delete tempArgs;
281  delete typeConstraints;
282  delete taggedInnerClasses;
283 }
284 
285 // constructs a new class definition
287  const char *defFileName,int defLine,int defColumn,
288  const char *nm,CompoundType ct,
289  const char *lref,const char *fName,
290  bool isSymbol,bool isJavaEnum)
291  : Definition(defFileName,defLine,defColumn,removeRedundantWhiteSpace(nm),0,0,isSymbol)
292 {
293  visited=FALSE;
294  setReference(lref);
295  m_impl = new ClassDefImpl;
296  m_impl->compType = ct;
298  m_impl->init(defFileName,name(),compoundTypeString(),fName);
299 }
300 
301 // destroy the class definition
303 {
304  delete m_impl;
305 }
306 
308 {
309  return convertNameToFile(compoundTypeString()+name()+"-members");
310 }
311 
312 QCString ClassDef::displayName(bool includeScope) const
313 {
314  //static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
315  SrcLangExt lang = getLanguage();
316  //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
317  QCString n;
318  if (lang==SrcLangExt_VHDL)
319  {
320  n = VhdlDocGen::getClassName(this);
321  }
322  else
323  {
324  if (includeScope)
325  {
327  }
328  else
329  {
330  n=className();
331  }
332  }
334  if (sep!="::")
335  {
336  n=substitute(n,"::",sep);
337  }
338  if (m_impl->compType==ClassDef::Protocol && n.right(2)=="-p")
339  {
340  n="<"+n.left(n.length()-2)+">";
341  }
342  //else if (n.right(2)=="-g")
343  //{
344  // n = n.left(n.length()-2);
345  //}
346  //printf("ClassDef::displayName()=%s\n",n.data());
347  if (n.find('@')!=-1)
348  {
349  return removeAnonymousScopes(n);
350  }
351  else
352  {
353  return n;
354  }
355 }
356 
357 // inserts a base/super class in the inheritance list
359  Specifier s,const char *t)
360 {
361  //printf("*** insert base class %s into %s\n",cd->name().data(),name().data());
362  //inherits->inSort(new BaseClassDef(cd,p,s,t));
363  if (m_impl->inherits==0)
364  {
367  }
368  m_impl->inherits->append(new BaseClassDef(cd,n,p,s,t));
369  m_impl->isSimple = FALSE;
370 }
371 
372 // inserts a derived/sub class in the inherited-by list
374  Specifier s,const char *t)
375 {
376  //printf("*** insert sub class %s into %s\n",cd->name().data(),name().data());
377  static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
378  if (!extractPrivate && cd->protection()==Private) return;
379  if (m_impl->inheritedBy==0)
380  {
383  }
384  m_impl->inheritedBy->inSort(new BaseClassDef(cd,0,p,s,t));
385  m_impl->isSimple = FALSE;
386 }
387 
389 {
391  MemberList *ml;
392  for (mli.toFirst();(ml=mli.current());++mli)
393  {
394  if ((ml->listType()&MemberListType_detailedLists)==0)
395  {
397  }
398  }
399 
400  // add members inside sections to their groups
402  {
404  MemberGroup *mg;
405  for (;(mg=mgli.current());++mgli)
406  {
408  {
409  //printf("addToDeclarationSection(%s)\n",mg->header().data());
411  }
412  }
413  }
414 }
415 
416 // adds new member definition to the class
418  Protection prot,
419  bool addToAllList
420  )
421 {
422  //printf("insertInternalMember(%s) isHidden()=%d\n",md->name().data(),md->isHidden());
423  if (md->isHidden()) return;
424 
426  {
428  if (!m_impl->vhdlSummaryTitles.find(title))
429  {
430  m_impl->vhdlSummaryTitles.append(title,new QCString(title));
431  }
432  }
433 
434  if (1 /*!isReference()*/) // changed to 1 for showing members of external
435  // classes when HAVE_DOT and UML_LOOK are enabled.
436  {
437  bool isSimple=FALSE;
438 
439  /********************************************/
440  /* insert member in the declaration section */
441  /********************************************/
442  if (md->isRelated() && protectionLevelVisible(prot))
443  {
445  }
446  else if (md->isFriend())
447  {
449  }
450  else
451  {
452  switch (md->memberType())
453  {
454  case MemberType_Service: // UNO IDL
456  break;
457  case MemberType_Interface: // UNO IDL
459  break;
460  case MemberType_Signal: // Qt specific
462  break;
463  case MemberType_DCOP: // KDE2 specific
465  break;
466  case MemberType_Property:
468  break;
469  case MemberType_Event:
471  break;
472  case MemberType_Slot: // Qt specific
473  switch (prot)
474  {
475  case Protected:
476  case Package: // slots in packages are not possible!
478  break;
479  case Public:
481  break;
482  case Private:
484  break;
485  }
486  break;
487  default: // any of the other members
488  if (md->isStatic())
489  {
490  if (md->isVariable())
491  {
492  switch (prot)
493  {
494  case Protected:
496  break;
497  case Package:
499  break;
500  case Public:
502  break;
503  case Private:
505  break;
506  }
507  }
508  else // function
509  {
510  switch (prot)
511  {
512  case Protected:
514  break;
515  case Package:
517  break;
518  case Public:
520  break;
521  case Private:
523  break;
524  }
525  }
526  }
527  else // not static
528  {
529  if (md->isVariable())
530  {
531  switch (prot)
532  {
533  case Protected:
535  break;
536  case Package:
538  break;
539  case Public:
541  isSimple=!md->isFunctionPtr();
542  break;
543  case Private:
545  break;
546  }
547  }
548  else if (md->isTypedef() || md->isEnumerate() || md->isEnumValue())
549  {
550  switch (prot)
551  {
552  case Protected:
554  break;
555  case Package:
557  break;
558  case Public:
560  isSimple=QCString(md->typeString()).find(")(")==-1;
561  break;
562  case Private:
564  break;
565  }
566  }
567  else // member function
568  {
569  switch (prot)
570  {
571  case Protected:
573  break;
574  case Package:
576  break;
577  case Public:
579  break;
580  case Private:
582  break;
583  }
584  }
585  }
586  break;
587  }
588  }
589  if (!isSimple) // not a simple field -> not a simple struct
590  {
591  m_impl->isSimple = FALSE;
592  }
593  //printf("adding %s simple=%d total_simple=%d\n",name().data(),isSimple,m_impl->isSimple);
594 
595  /*******************************************************/
596  /* insert member in the detailed documentation section */
597  /*******************************************************/
598  if ((md->isRelated() && protectionLevelVisible(prot)) || md->isFriend())
599  {
601  }
602  else
603  {
604  switch (md->memberType())
605  {
606  case MemberType_Service: // UNO IDL
608  break;
609  case MemberType_Interface: // UNO IDL
611  break;
612  case MemberType_Property:
614  break;
615  case MemberType_Event:
617  break;
618  case MemberType_Signal: // fall through
619  case MemberType_DCOP:
621  break;
622  case MemberType_Slot:
623  if (protectionLevelVisible(prot))
624  {
626  }
627  break;
628  default: // any of the other members
629  if (protectionLevelVisible(prot))
630  {
631  switch (md->memberType())
632  {
633  case MemberType_Typedef:
635  break;
638  break;
641  break;
642  case MemberType_Function:
643  if (md->isConstructor() || md->isDestructor())
644  {
646  ml->append(md);
647  }
648  else
649  {
651  }
652  break;
653  case MemberType_Variable:
655  break;
656  default:
657  err("Unexpected member type %d found!\n",md->memberType());
658  }
659  }
660  break;
661  }
662  }
663 
664  /*************************************************/
665  /* insert member in the appropriate member group */
666  /*************************************************/
667  // Note: this must be done AFTER inserting the member in the
668  // regular groups
669  //addMemberToGroup(md,groupId);
670 
671  }
672 
673  if (md->virtualness()==Pure)
674  {
676  }
677 
678  if (md->name()=="operator->")
679  {
681  }
682 
683  //::addClassMemberNameToIndex(md);
684  if (addToAllList &&
685  !(Config_getBool("HIDE_FRIEND_COMPOUNDS") &&
686  md->isFriend() &&
687  (QCString(md->typeString())=="friend class" ||
688  QCString(md->typeString())=="friend struct" ||
689  QCString(md->typeString())=="friend union")))
690  {
691  //printf("=======> adding member %s to class %s\n",md->name().data(),name().data());
692  MemberInfo *mi = new MemberInfo((MemberDef *)md,
693  prot,md->virtualness(),FALSE);
694  MemberNameInfo *mni=0;
696  {
699  }
700  if ((mni=m_impl->allMemberNameInfoSDict->find(md->name())))
701  {
702  mni->append(mi);
703  }
704  else
705  {
706  mni = new MemberNameInfo(md->name());
707  mni->append(mi);
708  m_impl->allMemberNameInfoSDict->append(mni->memberName(),mni);
709  }
710  }
711 }
712 
714 {
716 }
717 
718 // compute the anchors for all members
720 {
721  //ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0;
722  //const char *letters = "abcdefghijklmnopqrstuvwxyz0123456789";
724  MemberList *ml;
725  //int index = 0;
726  for (mli.toFirst();(ml=mli.current());++mli)
727  {
728  if ((ml->listType()&MemberListType_detailedLists)==0)
729  {
730  setAnchors(ml);
731  }
732  }
733 
735  {
737  MemberGroup *mg;
738  for (;(mg=mgli.current());++mgli)
739  {
740  mg->setAnchors();
741  }
742  }
743 }
744 
746 {
748  {
750  MemberGroup *mg;
751  for (;(mg=mgli.current());++mgli)
752  {
754  }
755  }
756 }
757 
759 {
762  {
764  MemberGroup *mg;
765  for (;(mg=mgli.current());++mgli)
766  {
768  }
769  }
771  MemberList *ml;
772  for (mli.toFirst();(ml=mli.current());++mli)
773  {
774  if ((ml->listType()&MemberListType_detailedLists)==0)
775  {
777  }
778  }
779 }
780 
781 
782 // add a file name to the used files set
784 {
785  if (fd==0) return;
786  if (m_impl->files.find(fd)==-1) m_impl->files.append(fd);
788  {
789  QDictIterator<ClassDef> qdi(*m_impl->templateInstances);
790  ClassDef *cd;
791  for (qdi.toFirst();(cd=qdi.current());++qdi)
792  {
793  cd->insertUsedFile(fd);
794  }
795  }
796 }
797 
799 {
800  if (bcd->prot!=Public || bcd->virt!=Normal)
801  {
802  ol.startTypewriter();
803  ol.docify(" [");
804  QStrList sl;
805  if (bcd->prot==Protected) sl.append("protected");
806  else if (bcd->prot==Private) sl.append("private");
807  if (bcd->virt==Virtual) sl.append("virtual");
808  const char *s=sl.first();
809  while (s)
810  {
811  ol.docify(s);
812  s=sl.next();
813  if (s) ol.docify(", ");
814  }
815  ol.docify("]");
816  ol.endTypewriter();
817  }
818 }
819 
821  const char *includeName,bool local, bool force)
822 {
823  //printf("ClassDef::setIncludeFile(%p,%s,%d,%d)\n",fd,includeName,local,force);
825  if ((includeName && m_impl->incInfo->includeName.isEmpty()) ||
826  (fd!=0 && m_impl->incInfo->fileDef==0)
827  )
828  {
829  //printf("Setting file info\n");
830  m_impl->incInfo->fileDef = fd;
831  m_impl->incInfo->includeName = includeName;
832  m_impl->incInfo->local = local;
833  }
834  if (force && includeName)
835  {
836  m_impl->incInfo->includeName = includeName;
837  m_impl->incInfo->local = local;
838  }
839 }
840 
841 // TODO: fix this: a nested template class can have multiple outer templates
842 //ArgumentList *ClassDef::outerTemplateArguments() const
843 //{
844 // int ti;
845 // ClassDef *pcd=0;
846 // int pi=0;
847 // if (m_impl->tempArgs) return m_impl->tempArgs;
848 // // find the outer most class scope
849 // while ((ti=name().find("::",pi))!=-1 &&
850 // (pcd=getClass(name().left(ti)))==0
851 // ) pi=ti+2;
852 // if (pcd)
853 // {
854 // return pcd->templateArguments();
855 // }
856 // return 0;
857 //}
858 
859 static void searchTemplateSpecs(/*in*/ Definition *d,
860  /*out*/ QList<ArgumentList> &result,
861  /*out*/ QCString &name,
862  /*in*/ SrcLangExt lang)
863 {
865  {
866  if (d->getOuterScope())
867  {
869  }
870  ClassDef *cd=(ClassDef *)d;
871  if (!name.isEmpty()) name+="::";
872  QCString clName = d->localName();
873  if (/*clName.right(2)=="-g" ||*/ clName.right(2)=="-p")
874  {
875  clName = clName.left(clName.length()-2);
876  }
877  name+=clName;
878  bool isSpecialization = d->localName().find('<')!=-1;
879  if (cd->templateArguments())
880  {
881  result.append(cd->templateArguments());
882  if (!isSpecialization)
883  {
884  name+=tempArgListToString(cd->templateArguments(),lang);
885  }
886  }
887  }
888  else
889  {
890  name+=d->qualifiedName();
891  }
892 }
893 
895  const QCString &type,SrcLangExt lang)
896 {
897  QList<ArgumentList> specs;
898  QCString name;
899  searchTemplateSpecs(d,specs,name,lang);
900  if (specs.count()>0) // class has template scope specifiers
901  {
902  ol.startSubsubsection();
903  QListIterator<ArgumentList> spi(specs);
904  ArgumentList *al;
905  for (spi.toFirst();(al=spi.current());++spi)
906  {
907  ol.docify("template<");
908  QListIterator<Argument> ali(*al);
909  Argument *a;
910  while ((a=ali.current()))
911  {
912  ol.docify(a->type);
913  if (!a->name.isEmpty())
914  {
915  ol.docify(" ");
916  ol.docify(a->name);
917  }
918  if (a->defval.length()!=0)
919  {
920  ol.docify(" = ");
921  ol.docify(a->defval);
922  }
923  ++ali;
924  a=ali.current();
925  if (a) ol.docify(", ");
926  }
927  ol.docify(">");
928  ol.lineBreak();
929  }
930  ol.docify(type.lower()+" "+name);
931  ol.endSubsubsection();
932  ol.writeString("\n");
933  }
934 }
935 
936 void ClassDef::writeBriefDescription(OutputList &ol,bool exampleFlag)
937 {
938  if (hasBriefDescription())
939  {
940  ol.startParagraph();
941  ol.generateDoc(briefFile(),briefLine(),this,0,
943  ol.pushGeneratorState();
945  ol.writeString(" \n");
947  ol.popGeneratorState();
948 
949  if (hasDetailedDescription() || exampleFlag)
950  {
951  writeMoreLink(ol,anchor());
952  }
953 
954  ol.endParagraph();
955  }
956  ol.writeSynopsis();
957 }
958 
960 {
961  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
962 
963  ol.startTextBlock();
964 
966  {
968  }
969 
970  // repeat brief description
971  if (!briefDescription().isEmpty() && repeatBrief)
972  {
974  }
975  if (!briefDescription().isEmpty() && repeatBrief &&
976  !documentation().isEmpty())
977  {
978  ol.pushGeneratorState();
980  ol.writeString("\n\n");
981  ol.popGeneratorState();
982  }
983  // write documentation
984  if (!documentation().isEmpty())
985  {
987  }
988  // write type constraints
990 
991  // write examples
992  if (hasExamples() && m_impl->exampleSDict)
993  {
995  ol.startDescForItem();
996  //ol.startParagraph();
998  //ol.endParagraph();
999  ol.endDescForItem();
1000  ol.endSimpleSect();
1001  }
1002  //ol.newParagraph();
1003  writeSourceDef(ol,name());
1004  ol.endTextBlock();
1005 }
1006 
1008 {
1009  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
1010  static bool sourceBrowser = Config_getBool("SOURCE_BROWSER");
1011  return ((!briefDescription().isEmpty() && repeatBrief) ||
1012  !documentation().isEmpty() ||
1013  (sourceBrowser && getStartBodyLine()!=-1 && getBodyDef()));
1014 }
1015 
1016 // write the detailed description for this class
1017 void ClassDef::writeDetailedDescription(OutputList &ol, const QCString &/*pageType*/, bool exampleFlag,
1018  const QCString &title,const QCString &anchor)
1019 {
1020  if (hasDetailedDescription() || exampleFlag)
1021  {
1022  ol.pushGeneratorState();
1024  ol.writeRuler();
1025  ol.popGeneratorState();
1026 
1027  ol.pushGeneratorState();
1029  ol.writeAnchor(0,anchor.isEmpty() ? QCString("details") : anchor);
1030  ol.popGeneratorState();
1031 
1032  if (!anchor.isEmpty())
1033  {
1034  ol.pushGeneratorState();
1037  ol.writeAnchor(getOutputFileBase(),anchor);
1038  ol.popGeneratorState();
1039  }
1040 
1041  ol.startGroupHeader();
1042  ol.parseText(title);
1043  ol.endGroupHeader();
1044 
1046  }
1047  else
1048  {
1049  //writeTemplateSpec(ol,this,pageType);
1050  }
1051 }
1052 
1054 {
1055  QCString result;
1056  SrcLangExt lang = getLanguage();
1057  if (lang==SrcLangExt_Fortran)
1058  {
1061  m_impl->files.count()==1);
1062  }
1063  else if (isJavaEnum())
1064  {
1066  }
1067  else if (m_impl->compType==Service)
1068  {
1070  }
1071  else if (m_impl->compType==Singleton)
1072  {
1074  }
1075  else
1076  {
1079  m_impl->files.count()==1);
1080  }
1081  return result;
1082 }
1083 
1085 {
1086  ol.pushGeneratorState();
1088 
1089 
1090  ol.writeRuler();
1092 
1093  bool first=TRUE;
1095  FileDef *fd;
1096  for (;(fd=li.current());++li)
1097  {
1098  if (first)
1099  {
1100  first=FALSE;
1101  ol.startItemList();
1102  }
1103 
1104  ol.startItemListItem();
1105  QCString path=fd->getPath();
1106  if (Config_getBool("FULL_PATH_NAMES"))
1107  {
1108  ol.docify(stripFromPath(path));
1109  }
1110 
1111  QCString fname = fd->name();
1112  if (!fd->getVersion().isEmpty()) // append version if available
1113  {
1114  fname += " (" + fd->getVersion() + ")";
1115  }
1116 
1117  // for HTML
1118  ol.pushGeneratorState();
1120  if (fd->generateSourceFile())
1121  {
1122  ol.writeObjectLink(0,fd->getSourceFileBase(),0,fname);
1123  }
1124  else if (fd->isLinkable())
1125  {
1127  fname);
1128  }
1129  else
1130  {
1131  ol.docify(fname);
1132  }
1133  ol.popGeneratorState();
1134 
1135  // for other output formats
1136  ol.pushGeneratorState();
1138  if (fd->isLinkable())
1139  {
1141  fname);
1142  }
1143  else
1144  {
1145  ol.docify(fname);
1146  }
1147  ol.popGeneratorState();
1148 
1149  ol.endItemListItem();
1150  }
1151  if (!first) ol.endItemList();
1152 
1153  ol.popGeneratorState();
1154 }
1155 
1157 {
1158  int count=0;
1159  BaseClassDef *ibcd;
1160  if (m_impl->inheritedBy)
1161  {
1163  for (;(ibcd=it.current());++it)
1164  {
1165  ClassDef *icd=ibcd->classDef;
1166  if ( icd->isVisibleInHierarchy()) count++;
1167  }
1168  }
1169  if (m_impl->inherits)
1170  {
1172  for (;(ibcd=it.current());++it)
1173  {
1174  ClassDef *icd=ibcd->classDef;
1175  if ( icd->isVisibleInHierarchy()) count++;
1176  }
1177  }
1178  return count;
1179 }
1180 
1182 {
1183  // count direct inheritance relations
1184  const int count=countInheritanceNodes();
1185 
1186  bool renderDiagram = FALSE;
1187  if (Config_getBool("HAVE_DOT") &&
1188  (Config_getBool("CLASS_DIAGRAMS") || Config_getBool("CLASS_GRAPH")))
1189  // write class diagram using dot
1190  {
1191  DotClassGraph inheritanceGraph(this,DotNode::Inheritance);
1192  if (!inheritanceGraph.isTrivial() && !inheritanceGraph.isTooBig())
1193  {
1194  ol.pushGeneratorState();
1196  ol.startDotGraph();
1198  ol.endDotGraph(inheritanceGraph);
1199  ol.popGeneratorState();
1200  renderDiagram = TRUE;
1201  }
1202  }
1203  else if (Config_getBool("CLASS_DIAGRAMS") && count>0)
1204  // write class diagram using build-in generator
1205  {
1206  ClassDiagram diagram(this); // create a diagram of this class.
1207  ol.startClassDiagram();
1212  renderDiagram = TRUE;
1213  }
1214 
1215  if (renderDiagram) // if we already show the inheritance relations graphically,
1216  // then hide the text version
1217  {
1219  }
1220 
1221  if (m_impl->inherits && m_impl->inherits->count()>0)
1222  {
1223  ol.startParagraph();
1224  //parseText(ol,theTranslator->trInherits()+" ");
1225 
1227  QRegExp marker("@[0-9]+");
1228  int index=0,newIndex,matchLen;
1229  // now replace all markers in inheritLine with links to the classes
1230  while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
1231  {
1232  ol.parseText(inheritLine.mid(index,newIndex-index));
1233  bool ok;
1234  uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
1235  BaseClassDef *bcd=m_impl->inherits->at(entryIndex);
1236  if (ok && bcd)
1237  {
1238  ClassDef *cd=bcd->classDef;
1239 
1240  // use the class name but with the template arguments as given
1241  // in the inheritance relation
1243  cd->displayName(),bcd->templSpecifiers);
1244 
1245  if (cd->isLinkable())
1246  {
1247  ol.writeObjectLink(cd->getReference(),
1248  cd->getOutputFileBase(),
1249  cd->anchor(),
1250  displayName);
1251  }
1252  else
1253  {
1254  ol.docify(displayName);
1255  }
1256  }
1257  else
1258  {
1259  err("invalid marker %d in inherits list!\n",entryIndex);
1260  }
1261  index=newIndex+matchLen;
1262  }
1263  ol.parseText(inheritLine.right(inheritLine.length()-index));
1264  ol.endParagraph();
1265  }
1266 
1267  // write subclasses
1268  if (m_impl->inheritedBy && m_impl->inheritedBy->count()>0)
1269  {
1270  ol.startParagraph();
1272  QRegExp marker("@[0-9]+");
1273  int index=0,newIndex,matchLen;
1274  // now replace all markers in inheritLine with links to the classes
1275  while ((newIndex=marker.match(inheritLine,index,&matchLen))!=-1)
1276  {
1277  ol.parseText(inheritLine.mid(index,newIndex-index));
1278  bool ok;
1279  uint entryIndex = inheritLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
1280  BaseClassDef *bcd=m_impl->inheritedBy->at(entryIndex);
1281  if (ok && bcd)
1282  {
1283  ClassDef *cd=bcd->classDef;
1284  if (cd->isLinkable())
1285  {
1286  ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),cd->anchor(),cd->displayName());
1287  }
1288  else
1289  {
1290  ol.docify(cd->displayName());
1291  }
1292  writeInheritanceSpecifier(ol,bcd);
1293  }
1294  index=newIndex+matchLen;
1295  }
1296  ol.parseText(inheritLine.right(inheritLine.length()-index));
1297  ol.endParagraph();
1298  }
1299 
1300  if (renderDiagram)
1301  {
1302  ol.enableAll();
1303  }
1304 }
1305 
1307 {
1308  if (Config_getBool("HAVE_DOT") /*&& Config_getBool("COLLABORATION_GRAPH")*/)
1309  {
1310  DotClassGraph usageImplGraph(this,DotNode::Collaboration);
1311  if (!usageImplGraph.isTrivial())
1312  {
1313  ol.pushGeneratorState();
1315  ol.startDotGraph();
1317  ol.endDotGraph(usageImplGraph);
1318  ol.popGeneratorState();
1319  }
1320  }
1321 }
1322 
1324 {
1325  SrcLangExt lang = getLanguage();
1326  bool isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
1327  if (isIDLorJava)
1328  {
1329  return "import";
1330  }
1331  else if (isObjectiveC())
1332  {
1333  return "#import ";
1334  }
1335  else
1336  {
1337  return "#include ";
1338  }
1339 }
1340 
1342 {
1343  if (m_impl->incInfo /*&& Config_getBool("SHOW_INCLUDE_FILES")*/)
1344  {
1346  (m_impl->incInfo->fileDef ?
1347  m_impl->incInfo->fileDef->docName().data() : ""
1348  ) :
1350  if (!nm.isEmpty())
1351  {
1352  ol.startParagraph();
1353  ol.startTypewriter();
1354  ol.docify(includeStatement());
1355  SrcLangExt lang = getLanguage();
1356  bool isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
1357  if (m_impl->incInfo->local || isIDLorJava)
1358  ol.docify("\"");
1359  else
1360  ol.docify("<");
1361  ol.pushGeneratorState();
1363  ol.docify(nm);
1366  if (m_impl->incInfo->fileDef)
1367  {
1369  }
1370  else
1371  {
1372  ol.docify(nm);
1373  }
1374  ol.popGeneratorState();
1375  if (m_impl->incInfo->local || isIDLorJava)
1376  ol.docify("\"");
1377  else
1378  ol.docify(">");
1379  if (isIDLorJava)
1380  ol.docify(";");
1381  ol.endTypewriter();
1382  ol.endParagraph();
1383  }
1384  }
1385 }
1386 
1387 #if 0
1388 void ClassDef::writeAllMembersLink(OutputList &ol)
1389 {
1390  // write link to list of all members (HTML only)
1392  !Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
1393  )
1394  {
1395  ol.pushGeneratorState();
1397  ol.startParagraph();
1400  ol.endTextLink();
1401  ol.endParagraph();
1402  ol.enableAll();
1403  ol.popGeneratorState();
1404  }
1405 }
1406 #endif
1407 
1408 void ClassDef::writeMemberGroups(OutputList &ol,bool showInline)
1409 {
1410  // write user defined member groups
1411  if (m_impl->memberGroupSDict)
1412  {
1415  MemberGroup *mg;
1416  for (;(mg=mgli.current());++mgli)
1417  {
1418  if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
1419  {
1420  mg->writeDeclarations(ol,this,0,0,0,showInline);
1421  }
1422  else // add this group to the corresponding member section
1423  {
1424  //printf("addToDeclarationSection(%s)\n",mg->header().data());
1425  //mg->addToDeclarationSection();
1426  }
1427  }
1428  }
1429 }
1430 
1432 {
1433  // nested classes
1434  if (m_impl->innerClasses)
1435  {
1436  m_impl->innerClasses->writeDeclaration(ol,0,title,TRUE);
1437  }
1438 }
1439 
1441 {
1442  if (m_impl->innerClasses)
1443  {
1445  }
1446 }
1447 
1449 {
1450  //printf("%s: ClassDef::startMemberDocumentation()\n",name().data());
1451  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
1452  {
1455  }
1456 }
1457 
1459 {
1460  //printf("%s: ClassDef::endMemberDocumentation()\n",name().data());
1461  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
1462  {
1465  }
1466 }
1467 
1469 {
1470  //printf("%s: ClassDef::startMemberDeclarations()\n",name().data());
1471  ol.startMemberSections();
1472 }
1473 
1475 {
1476  //printf("%s: ClassDef::endMemberDeclarations()\n",name().data());
1477  static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
1478  if (!inlineInheritedMembers && countAdditionalInheritedMembers()>0)
1479  {
1480  ol.startMemberHeader("inherited");
1482  ol.endMemberHeader();
1484  }
1485  ol.endMemberSections();
1486 }
1487 
1489 {
1490  ol.pushGeneratorState();
1492  ol.writeString("\n");
1493  ol.startGroupHeader();
1495  ol.endGroupHeader();
1497  ol.popGeneratorState();
1498 }
1499 
1500 
1502 {
1503  ol.pushGeneratorState();
1507  LayoutDocEntry *lde;
1508  bool first=TRUE;
1509  SrcLangExt lang = getLanguage();
1510 
1511  if (lang!=SrcLangExt_VHDL)
1512  {
1513  for (eli.toFirst();(lde=eli.current());++eli)
1514  {
1516  m_impl->innerClasses &&
1518  )
1519  {
1521  ol.writeSummaryLink(0,"nested-classes",ls->title(lang),first);
1522  first=FALSE;
1523  }
1524  else if (lde->kind()==LayoutDocEntry::ClassAllMembersLink &&
1526  !Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
1527  )
1528  {
1529  ol.writeSummaryLink(getMemberListFileName(),"all-members-list",theTranslator->trListOfAllMembers(),first);
1530  first=FALSE;
1531  }
1532  else if (lde->kind()== LayoutDocEntry::MemberDecl)
1533  {
1535  MemberList * ml = getMemberList(lmd->type);
1536  if (ml && ml->declVisible())
1537  {
1538  ol.writeSummaryLink(0,MemberList::listTypeAsString(ml->listType()),lmd->title(lang),first);
1539  first=FALSE;
1540  }
1541  }
1542  }
1543  }
1544  else // VDHL only
1545  {
1547  for (li.toFirst();li.current();++li)
1548  {
1549  ol.writeSummaryLink(0,li.current()->data(),li.current()->data(),first);
1550  first=FALSE;
1551  }
1552  }
1553  if (!first)
1554  {
1555  ol.writeString(" </div>\n");
1556  }
1557  ol.popGeneratorState();
1558 }
1559 
1561 {
1562  if (!isLinkableInProject()) return;
1563  tagFile << " <compound kind=\"" << compoundTypeString();
1564  tagFile << "\"";
1565  if (isObjectiveC()) { tagFile << " objc=\"yes\""; }
1566  tagFile << ">" << endl;
1567  tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
1568  tagFile << " <filename>" << convertToXML(getOutputFileBase()) << Doxygen::htmlFileExtension << "</filename>" << endl;
1569  if (!anchor().isEmpty())
1570  {
1571  tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
1572  }
1573  QCString idStr = id();
1574  if (!idStr.isEmpty())
1575  {
1576  tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
1577  }
1578  if (m_impl->tempArgs)
1579  {
1581  Argument *a;
1582  for (;(a=ali.current());++ali)
1583  {
1584  tagFile << " <templarg>" << convertToXML(a->name) << "</templarg>" << endl;
1585  }
1586  }
1587  if (m_impl->inherits)
1588  {
1590  BaseClassDef *ibcd;
1591  for (it.toFirst();(ibcd=it.current());++it)
1592  {
1593  ClassDef *cd=ibcd->classDef;
1594  if (cd && cd->isLinkable())
1595  {
1596  if (!Config_getString("GENERATE_TAGFILE").isEmpty())
1597  {
1598  tagFile << " <base";
1599  if (ibcd->prot==Protected)
1600  {
1601  tagFile << " protection=\"protected\"";
1602  }
1603  else if (ibcd->prot==Private)
1604  {
1605  tagFile << " protection=\"private\"";
1606  }
1607  if (ibcd->virt==Virtual)
1608  {
1609  tagFile << " virtualness=\"virtual\"";
1610  }
1611  tagFile << ">" << convertToXML(cd->name()) << "</base>" << endl;
1612  }
1613  }
1614  }
1615  }
1618  LayoutDocEntry *lde;
1619  for (eli.toFirst();(lde=eli.current());++eli)
1620  {
1621  switch (lde->kind())
1622  {
1624  {
1625  if (m_impl->innerClasses)
1626  {
1628  ClassDef *innerCd;
1629  for (cli.toFirst();(innerCd=cli.current());++cli)
1630  {
1631  if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
1632  protectionLevelVisible(innerCd->protection()) &&
1633  !innerCd->isEmbeddedInOuterScope()
1634  )
1635  {
1636  tagFile << " <class kind=\"" << innerCd->compoundTypeString() <<
1637  "\">" << convertToXML(innerCd->name()) << "</class>" << endl;
1638  }
1639  }
1640  }
1641  }
1642  break;
1644  {
1646  MemberList * ml = getMemberList(lmd->type);
1647  if (ml)
1648  {
1649  ml->writeTagFile(tagFile);
1650  }
1651  }
1652  break;
1654  {
1655  if (m_impl->memberGroupSDict)
1656  {
1658  MemberGroup *mg;
1659  for (;(mg=mgli.current());++mgli)
1660  {
1661  mg->writeTagFile(tagFile);
1662  }
1663  }
1664  }
1665  break;
1666  default:
1667  break;
1668  }
1669  }
1670  writeDocAnchorsToTagFile(tagFile);
1671  tagFile << " </compound>" << endl;
1672 }
1673 
1674 /** Write class documentation inside another container (i.e. a group) */
1676 {
1677  bool isSimple = m_impl->isSimple;
1678 
1679  ol.addIndexItem(name(),0);
1680  //printf("ClassDef::writeInlineDocumentation(%s)\n",name().data());
1683  LayoutDocEntry *lde;
1684 
1685  // part 1: anchor and title
1686  QCString s = compoundTypeString()+" "+name();
1687 
1688  // part 1a
1689  ol.pushGeneratorState();
1691  { // only HTML only
1692  ol.writeAnchor(0,anchor());
1693  ol.startMemberDoc(0,0,0,0,FALSE);
1695  ol.parseText(s);
1696  ol.endMemberDocName();
1697  ol.endMemberDoc(FALSE);
1698  ol.writeString("</div>");
1699  ol.startIndent();
1700  }
1701  ol.popGeneratorState();
1702 
1703  // part 1b
1704  ol.pushGeneratorState();
1707  { // for LaTeX/RTF only
1709  }
1710  ol.popGeneratorState();
1711 
1712  // part 1c
1713  ol.pushGeneratorState();
1715  {
1716  // for LaTeX/RTF/Man
1717  ol.startGroupHeader(1);
1718  ol.parseText(s);
1719  ol.endGroupHeader(1);
1720  }
1721  ol.popGeneratorState();
1722 
1723  SrcLangExt lang=getLanguage();
1724 
1725  // part 2: the header and detailed description
1726  for (eli.toFirst();(lde=eli.current());++eli)
1727  {
1728  switch (lde->kind())
1729  {
1731  {
1732  // since we already shown the brief description in the
1733  // declaration part of the container, so we use this to
1734  // show the details on top.
1736  }
1737  break;
1740  break;
1743  break;
1745  if (!isSimple) startMemberDeclarations(ol);
1746  break;
1748  {
1750  if (!isSimple) writeMemberDeclarations(ol,lmd->type,lmd->title(lang),lmd->subtitle(lang),TRUE);
1751  }
1752  break;
1754  if (!isSimple) writeMemberGroups(ol,TRUE);
1755  break;
1757  if (!isSimple) endMemberDeclarations(ol);
1758  break;
1760  if (!isSimple) startMemberDocumentation(ol);
1761  break;
1763  {
1765  if (isSimple)
1766  {
1768  }
1769  else
1770  {
1771  writeMemberDocumentation(ol,lmd->type,lmd->title(lang),TRUE);
1772  }
1773  }
1774  break;
1776  if (!isSimple) endMemberDocumentation(ol);
1777  break;
1778  default:
1779  break;
1780  }
1781  }
1782 
1783  // part 3: close the block
1784  ol.pushGeneratorState();
1786  { // HTML only
1787  ol.endIndent();
1788  }
1789  ol.popGeneratorState();
1790 }
1791 
1793 {
1794  // TODO: clean up this mess by moving it to
1795  // the output generators...
1796  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
1797  static bool rtfHyperlinks = Config_getBool("RTF_HYPERLINKS");
1798  static bool usePDFLatex = Config_getBool("USE_PDFLATEX");
1799 
1800  // HTML only
1801  ol.pushGeneratorState();
1803  ol.docify(" ");
1805  anchor.isEmpty() ? QCString("details") : anchor);
1807  ol.endTextLink();
1808  ol.popGeneratorState();
1809 
1810  if (!anchor.isEmpty())
1811  {
1812  ol.pushGeneratorState();
1813  // LaTeX + RTF
1816  if (!(usePDFLatex && pdfHyperlinks))
1817  {
1819  }
1820  if (!rtfHyperlinks)
1821  {
1823  }
1824  ol.docify(" ");
1825  ol.startTextLink(getOutputFileBase(), anchor);
1827  ol.endTextLink();
1828  // RTF only
1830  ol.writeString("\\par");
1831  ol.popGeneratorState();
1832  }
1833 }
1834 
1836 {
1837  static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
1838  static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
1839  static bool extractLocalClasses = Config_getBool("EXTRACT_LOCAL_CLASSES");
1840  bool linkable = isLinkable();
1841  return (!isAnonymous() && !isExtension() &&
1842  (protection()!=::Private || extractPrivate) &&
1843  (linkable || (!hideUndocClasses && (!isLocal() || extractLocalClasses)))
1844  );
1845 }
1846 
1847 void ClassDef::writeDeclarationLink(OutputList &ol,bool &found,const char *header,bool localNames)
1848 {
1849  //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
1850  //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
1851  SrcLangExt lang = getLanguage();
1853  {
1854  if (!found) // first class
1855  {
1856  ol.startMemberHeader("nested-classes");
1857  if (header)
1858  {
1859  ol.parseText(header);
1860  }
1861  else if (lang==SrcLangExt_VHDL)
1862  {
1864  }
1865  else
1866  {
1867  ol.parseText(lang==SrcLangExt_Fortran ?
1870  }
1871  ol.endMemberHeader();
1872  ol.startMemberList();
1873  found=TRUE;
1874  }
1877  QCString ctype = compoundTypeString();
1878  QCString cname = displayName(!localNames);
1879 
1880  if (lang!=SrcLangExt_VHDL) // for VHDL we swap the name and the type
1881  {
1882  ol.writeString(ctype);
1883  ol.writeString(" ");
1884  ol.insertMemberAlign();
1885  }
1886  if (isLinkable())
1887  {
1890  anchor(),
1891  cname
1892  );
1893  }
1894  else
1895  {
1896  ol.startBold();
1897  ol.docify(cname);
1898  ol.endBold();
1899  }
1900  if (lang==SrcLangExt_VHDL) // now write the type
1901  {
1902  ol.writeString(" ");
1903  ol.insertMemberAlign();
1905  }
1906  ol.endMemberItem();
1907 
1908  // add the brief description if available
1909  if (!briefDescription().isEmpty() && Config_getBool("BRIEF_MEMBER_DESC"))
1910  {
1911  DocRoot *rootNode = validatingParseDoc(briefFile(),briefLine(),this,0,
1913  if (rootNode && !rootNode->isEmpty())
1914  {
1916  ol.writeDoc(rootNode,this,0);
1917  if (isLinkableInProject())
1918  {
1919  writeMoreLink(ol,anchor());
1920  }
1921  ol.endMemberDescription();
1922  }
1923  delete rootNode;
1924  }
1925  ol.endMemberDeclaration(anchor(),0);
1926  }
1927 }
1928 
1930 {
1931  QStrList sl;
1932  if (isFinal()) sl.append("final");
1933  if (isSealed()) sl.append("sealed");
1934  if (isAbstract()) sl.append("abstract");
1935  if (getLanguage()==SrcLangExt_IDL && isPublished()) sl.append("published");
1936 
1937  ol.pushGeneratorState();
1939  if (sl.count()>0)
1940  {
1941  ol.startLabels();
1942  const char *s=sl.first();
1943  while (s)
1944  {
1945  const char *ns = sl.next();
1946  ol.writeLabel(s,ns==0);
1947  s=ns;
1948  }
1949  ol.endLabels();
1950  }
1951  ol.popGeneratorState();
1952 }
1953 
1955 {
1956  ol.startContents();
1957 
1958  QCString pageType = " ";
1959  pageType += compoundTypeString();
1960 
1962 
1964  {
1967  }
1968  bool exampleFlag=hasExamples();
1969 
1970  //---------------------------------------- start flexible part -------------------------------
1971 
1972  SrcLangExt lang = getLanguage();
1973 
1976  LayoutDocEntry *lde;
1977  for (eli.toFirst();(lde=eli.current());++eli)
1978  {
1979  switch (lde->kind())
1980  {
1982  writeBriefDescription(ol,exampleFlag);
1983  break;
1985  writeIncludeFiles(ol);
1986  break;
1989  break;
1992  break;
1994  //writeAllMembersLink(ol); // this is now part of the summary links
1995  break;
1998  break;
2000  writeMemberGroups(ol);
2001  break;
2003  {
2005  writeMemberDeclarations(ol,lmd->type,lmd->title(lang),lmd->subtitle(lang));
2006  }
2007  break;
2009  {
2011  writeNestedClasses(ol,ls->title(lang));
2012  }
2013  break;
2016  break;
2018  {
2020  writeDetailedDescription(ol,pageType,exampleFlag,ls->title(lang));
2021  }
2022  break;
2025  break;
2027  writeInlineClasses(ol);
2028  break;
2030  {
2032  writeMemberDocumentation(ol,lmd->type,lmd->title(lang));
2033  }
2034  break;
2037  break;
2039  showUsedFiles(ol);
2040  break;
2042  writeAuthorSection(ol);
2043  break;
2067  err("Internal inconsistency: member %d should not be part of "
2068  "LayoutDocManager::Class entry list\n",lde->kind());
2069  break;
2070  }
2071  }
2072 
2073  ol.endContents();
2074 }
2075 
2077 {
2078  QCString pageTitle;
2079  SrcLangExt lang = getLanguage();
2080 
2081  if (lang==SrcLangExt_Fortran)
2082  {
2084  m_impl->compType,
2085  m_impl->tempArgs != 0);
2086  }
2087  else if (lang==SrcLangExt_VHDL)
2088  {
2089  pageTitle = VhdlDocGen::getClassTitle(this)+" Reference";
2090  }
2091  else if (isJavaEnum())
2092  {
2093  pageTitle = theTranslator->trEnumReference(displayName());
2094  }
2095  else if (m_impl->compType==Service)
2096  {
2098  }
2099  else if (m_impl->compType==Singleton)
2100  {
2102  }
2103  else
2104  {
2105  if (Config_getBool("HIDE_COMPOUND_REFERENCE"))
2106  {
2107  pageTitle = displayName();
2108  }
2109  else
2110  {
2113  m_impl->tempArgs != 0);
2114  }
2115  }
2116  return pageTitle;
2117 }
2118 
2119 // write all documentation for this class
2121 {
2122  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2123  //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
2124  //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
2125  QCString pageTitle = title();
2126 
2127  startFile(ol,getOutputFileBase(),name(),pageTitle,HLI_ClassVisible,!generateTreeView);
2128  if (!generateTreeView)
2129  {
2131  {
2132  writeNavigationPath(ol);
2133  }
2134  ol.endQuickIndices();
2135  }
2136 
2137  startTitle(ol,getOutputFileBase(),this);
2138  ol.parseText(pageTitle);
2139  addClassAttributes(ol);
2140  addGroupListToTitle(ol,this);
2142  writeDocumentationContents(ol,pageTitle);
2143 
2144  endFileWithNavPath(this,ol);
2145 
2146  if (Config_getBool("SEPARATE_MEMBER_PAGES"))
2147  {
2148  writeMemberPages(ol);
2149  }
2150 }
2151 
2153 {
2154  ///////////////////////////////////////////////////////////////////////////
2155  //// Member definitions on separate pages
2156  ///////////////////////////////////////////////////////////////////////////
2157 
2158  ol.pushGeneratorState();
2160 
2162  MemberList *ml;
2163  for (mli.toFirst();(ml=mli.current());++mli)
2164  {
2165  ml->countDocMembers();
2166  if (ml->numDocMembers()>0 && (ml->listType()&MemberListType_detailedLists))
2167  {
2168  ml->writeDocumentationPage(ol,displayName(),this);
2169  }
2170  }
2171 
2172  ol.popGeneratorState();
2173 }
2174 
2176 {
2177  static bool createSubDirs=Config_getBool("CREATE_SUBDIRS");
2178 
2179  ol.writeString(" <div class=\"navtab\">\n");
2180  ol.writeString(" <table>\n");
2181 
2183  {
2185  MemberNameInfo *mni;
2186  for (;(mni=mnili.current());++mnili)
2187  {
2188  MemberNameInfoIterator mnii(*mni);
2189  MemberInfo *mi;
2190  for (mnii.toFirst();(mi=mnii.current());++mnii)
2191  {
2192  MemberDef *md=mi->memberDef;
2193  if (md->getClassDef()==this && md->isLinkable() && !md->isEnumValue())
2194  {
2195  ol.writeString(" <tr><td class=\"navtab\">");
2196  if (md->isLinkableInProject())
2197  {
2198  if (md==currentMd) // selected item => highlight
2199  {
2200  ol.writeString("<a class=\"qindexHL\" ");
2201  }
2202  else
2203  {
2204  ol.writeString("<a class=\"qindex\" ");
2205  }
2206  ol.writeString("href=\"");
2207  if (createSubDirs) ol.writeString("../../");
2209  ol.writeString("\">");
2210  ol.writeString(convertToHtml(md->name()));
2211  ol.writeString("</a>");
2212  }
2213  ol.writeString("</td></tr>\n");
2214  }
2215  }
2216  }
2217  }
2218 
2219  ol.writeString(" </table>\n");
2220  ol.writeString(" </div>\n");
2221 }
2222 
2223 
2224 
2226 {
2227  // write inner classes after the parent, so the tag files contain
2228  // the definition in proper order!
2229  if (m_impl->innerClasses)
2230  {
2232  ClassDef *innerCd;
2233  for (cli.toFirst();(innerCd=cli.current());++cli)
2234  {
2235  if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
2236  protectionLevelVisible(innerCd->protection()) &&
2237  !innerCd->isEmbeddedInOuterScope()
2238  )
2239  {
2240  msg("Generating docs for nested compound %s...\n",qPrint(innerCd->name()));
2241  innerCd->writeDocumentation(ol);
2242  innerCd->writeMemberList(ol);
2243  }
2244  innerCd->writeDocumentationForInnerClasses(ol);
2245  }
2246  }
2247 }
2248 
2249 // write the list of all (inherited) members for this class
2251 {
2252  static bool cOpt = Config_getBool("OPTIMIZE_OUTPUT_FOR_C");
2253  //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
2254  static bool generateTreeView = Config_getBool("GENERATE_TREEVIEW");
2255  if (m_impl->allMemberNameInfoSDict==0 || cOpt) return;
2256  // only for HTML
2257  ol.pushGeneratorState();
2259 
2260  QCString memListFile = getMemberListFileName();
2261  startFile(ol,memListFile,memListFile,theTranslator->trMemberList(),
2262  HLI_ClassVisible,!generateTreeView,getOutputFileBase());
2263  if (!generateTreeView)
2264  {
2266  {
2267  writeNavigationPath(ol);
2268  }
2269  ol.endQuickIndices();
2270  }
2271  startTitle(ol,0);
2273  endTitle(ol,0,0);
2274  ol.startContents();
2275  ol.startParagraph();
2279  ol.endParagraph();
2280 
2281  //ol.startItemList();
2282  ol.writeString("<table class=\"directory\">\n");
2283 
2284  int idx=0;
2285  //MemberNameInfo *mni=m_impl->allMemberNameInfoList->first();
2287  MemberNameInfo *mni;
2288  for (mnii.toFirst();(mni=mnii.current());++mnii)
2289  {
2290  MemberNameInfoIterator it(*mni);
2291  MemberInfo *mi;
2292  for (;(mi=it.current());++it)
2293  {
2294  MemberDef *md=mi->memberDef;
2295  ClassDef *cd=md->getClassDef();
2296  Protection prot = mi->prot;
2297  Specifier virt=md->virtualness();
2298 
2299  //printf("%s: Member %s of class %s md->protection()=%d mi->prot=%d prot=%d inherited=%d\n",
2300  // name().data(),md->name().data(),cd->name().data(),md->protection(),mi->prot,prot,mi->inherited);
2301 
2302  if (cd && !md->name().isEmpty() && md->name()[0]!='@')
2303  {
2304  bool memberWritten=FALSE;
2305  if (cd->isLinkable() && md->isLinkable())
2306  // create a link to the documentation
2307  {
2309  //ol.writeListItem();
2310  ol.writeString(" <tr");
2311  if ((idx&1)==0) ol.writeString(" class=\"even\"");
2312  idx++;
2313  ol.writeString("><td class=\"entry\">");
2314  if (cd->isObjectiveC())
2315  {
2316  if (md->isObjCMethod())
2317  {
2318  if (md->isStatic())
2319  ol.writeString("+&#160;</td><td>");
2320  else
2321  ol.writeString("-&#160;</td><td>");
2322  }
2323  else
2324  ol.writeString("</td><td class=\"entry\">");
2325  }
2326  if (md->isObjCMethod())
2327  {
2328  ol.writeObjectLink(md->getReference(),
2329  md->getOutputFileBase(),
2330  md->anchor(),md->name());
2331  }
2332  else
2333  {
2334  //Definition *bd = md->getGroupDef();
2335  //if (bd==0) bd=cd;
2336  ol.writeObjectLink(md->getReference(),
2337  md->getOutputFileBase(),
2338  md->anchor(),name);
2339 
2340  if ( md->isFunction() || md->isSignal() || md->isSlot() ||
2341  (md->isFriend() && md->argsString()))
2342  ol.docify(md->argsString());
2343  else if (md->isEnumerate())
2344  ol.parseText(" "+theTranslator->trEnumName());
2345  else if (md->isEnumValue())
2346  ol.parseText(" "+theTranslator->trEnumValue());
2347  else if (md->isTypedef())
2348  ol.docify(" typedef");
2349  else if (md->isFriend() && !qstrcmp(md->typeString(),"friend class"))
2350  ol.docify(" class");
2351  //ol.writeString("\n");
2352  }
2353  ol.writeString("</td>");
2354  memberWritten=TRUE;
2355  }
2356  else if (!cd->isArtificial() &&
2357  !Config_getBool("HIDE_UNDOC_MEMBERS") &&
2358  (protectionLevelVisible(md->protection()) || md->isFriend())
2359  ) // no documentation,
2360  // generate link to the class instead.
2361  {
2362  //ol.writeListItem();
2363  ol.writeString(" <tr bgcolor=\"#f0f0f0\"");
2364  if ((idx&1)==0) ol.writeString(" class=\"even\"");
2365  idx++;
2366  ol.writeString("><td class=\"entry\">");
2367  if (cd->isObjectiveC())
2368  {
2369  if (md->isObjCMethod())
2370  {
2371  if (md->isStatic())
2372  ol.writeString("+&#160;</td><td class=\"entry\">");
2373  else
2374  ol.writeString("-&#160;</td><td class=\"entry\">");
2375  }
2376  else
2377  ol.writeString("</td><td class=\"entry\">");
2378  }
2379  ol.startBold();
2380  ol.docify(md->name());
2381  ol.endBold();
2382  if (!md->isObjCMethod())
2383  {
2384  if ( md->isFunction() || md->isSignal() || md->isSlot() )
2385  ol.docify(md->argsString());
2386  else if (md->isEnumerate())
2387  ol.parseText(" "+theTranslator->trEnumName());
2388  else if (md->isEnumValue())
2389  ol.parseText(" "+theTranslator->trEnumValue());
2390  else if (md->isTypedef())
2391  ol.docify(" typedef");
2392  }
2393  ol.writeString(" (");
2394  ol.parseText(theTranslator->trDefinedIn()+" ");
2395  if (cd->isLinkable())
2396  {
2397  ol.writeObjectLink(
2398  cd->getReference(),
2399  cd->getOutputFileBase(),
2400  cd->anchor(),
2401  cd->displayName());
2402  }
2403  else
2404  {
2405  ol.startBold();
2406  ol.docify(cd->displayName());
2407  ol.endBold();
2408  }
2409  ol.writeString(")");
2410  ol.writeString("</td>");
2411  memberWritten=TRUE;
2412  }
2413  if (memberWritten)
2414  {
2415  ol.writeString("<td class=\"entry\">");
2416  ol.writeObjectLink(cd->getReference(),
2417  cd->getOutputFileBase(),
2418  cd->anchor(),
2419  md->category() ?
2420  md->category()->displayName() :
2421  cd->displayName());
2422  ol.writeString("</td>");
2423  ol.writeString("<td class=\"entry\">");
2424  }
2425  SrcLangExt lang = md->getLanguage();
2426  if (
2427  (prot!=Public || (virt!=Normal && getLanguage()!=SrcLangExt_ObjC) ||
2428  md->isFriend() || md->isRelated() || md->isExplicit() ||
2429  md->isMutable() || (md->isInline() && Config_getBool("INLINE_INFO")) ||
2430  md->isSignal() || md->isSlot() ||
2432  (md->isOptional() || md->isAttribute() || md->isUNOProperty())) ||
2433  md->isStatic() || lang==SrcLangExt_VHDL
2434  )
2435  && memberWritten)
2436  {
2437  ol.writeString("<span class=\"mlabel\">");
2438  QStrList sl;
2439  if (lang==SrcLangExt_VHDL)
2440  {
2441  sl.append(VhdlDocGen::trVhdlType(md->getMemberSpecifiers())); //append vhdl type
2442  }
2443  else if (md->isFriend()) sl.append("friend");
2444  else if (md->isRelated()) sl.append("related");
2445  else
2446  {
2447  if (Config_getBool("INLINE_INFO") && md->isInline())
2448  sl.append("inline");
2449  if (md->isExplicit()) sl.append("explicit");
2450  if (md->isMutable()) sl.append("mutable");
2451  if (prot==Protected) sl.append("protected");
2452  else if (prot==Private) sl.append("private");
2453  else if (prot==Package) sl.append("package");
2454  if (virt==Virtual && getLanguage()!=SrcLangExt_ObjC)
2455  sl.append("virtual");
2456  else if (virt==Pure) sl.append("pure virtual");
2457  if (md->isStatic()) sl.append("static");
2458  if (md->isSignal()) sl.append("signal");
2459  if (md->isSlot()) sl.append("slot");
2460 // this is the extra member page
2461  if (md->isOptional()) sl.append("optional");
2462  if (md->isAttribute()) sl.append("attribute");
2463  if (md->isUNOProperty()) sl.append("property");
2464  if (md->isReadonly()) sl.append("readonly");
2465  if (md->isBound()) sl.append("bound");
2466  if (md->isRemovable()) sl.append("removable");
2467  if (md->isConstrained()) sl.append("constrained");
2468  if (md->isTransient()) sl.append("transient");
2469  if (md->isMaybeVoid()) sl.append("maybevoid");
2470  if (md->isMaybeDefault()) sl.append("maybedefault");
2471  if (md->isMaybeAmbiguous())sl.append("maybeambiguous");
2472  }
2473  const char *s=sl.first();
2474  while (s)
2475  {
2476  ol.docify(s);
2477  s=sl.next();
2478  if (s) ol.writeString("</span><span class=\"mlabel\">");
2479  }
2480  ol.writeString("</span>");
2481  }
2482  if (memberWritten)
2483  {
2484  ol.writeString("</td>");
2485  ol.writeString("</tr>\n");
2486  }
2487  }
2488  }
2489  }
2490  //ol.endItemList();
2491 
2492  ol.writeString("</table>");
2493 
2494  endFile(ol);
2495  ol.popGeneratorState();
2496 }
2497 
2498 
2499 // add a reference to an example
2500 bool ClassDef::addExample(const char *anchor,const char *nameStr,
2501  const char *file)
2502 {
2503  if (m_impl->exampleSDict==0)
2504  {
2507  }
2508  if (!m_impl->exampleSDict->find(nameStr))
2509  {
2510  Example *e=new Example;
2511  e->anchor=anchor;
2512  e->name=nameStr;
2513  e->file=file;
2514  m_impl->exampleSDict->inSort(nameStr,e);
2515  return TRUE;
2516  }
2517  return FALSE;
2518 }
2519 
2520 // returns TRUE if this class is used in an example
2522 {
2523  bool result=FALSE;
2524  if (m_impl->exampleSDict)
2525  result = m_impl->exampleSDict->count()>0;
2526  return result;
2527 }
2528 
2529 void ClassDef::addTypeConstraint(const QCString &typeConstraint,const QCString &type)
2530 {
2531  //printf("addTypeContraint(%s,%s)\n",type.data(),typeConstraint.data());
2532  static bool hideUndocRelation = Config_getBool("HIDE_UNDOC_RELATIONS");
2533  if (typeConstraint.isEmpty() || type.isEmpty()) return;
2534  ClassDef *cd = getResolvedClass(this,getFileDef(),typeConstraint);
2535  if (cd==0 && !hideUndocRelation)
2536  {
2537  cd = new ClassDef(getDefFileName(),getDefLine(),getDefColumn(),typeConstraint,ClassDef::Class);
2538  cd->setUsedOnly(TRUE);
2539  cd->setLanguage(getLanguage());
2540  Doxygen::hiddenClasses->append(typeConstraint,cd);
2541  //printf("Adding undocumented constraint '%s' to class %s on type %s\n",
2542  // typeConstraint.data(),name().data(),type.data());
2543  }
2544  if (cd)
2545  {
2546  if (m_impl->constraintClassDict==0)
2547  {
2549  m_impl->constraintClassDict->setAutoDelete(TRUE);
2550  }
2551  ConstraintClassDef *ccd=m_impl->constraintClassDict->find(typeConstraint);
2552  if (ccd==0)
2553  {
2554  ccd = new ConstraintClassDef(cd);
2555  m_impl->constraintClassDict->insert(typeConstraint,ccd);
2556  }
2557  ccd->addAccessor(type);
2558  //printf("Adding constraint '%s' to class %s on type %s\n",
2559  // typeConstraint.data(),name().data(),type.data());
2560  }
2561 }
2562 
2563 // Java Type Constrains: A<T extends C & I>
2565 {
2566  if (m_impl->tempArgs)
2567  {
2569  Argument *a;
2570  for (;(a=ali.current());++ali)
2571  {
2572  if (!a->typeConstraint.isEmpty())
2573  {
2574  QCString typeConstraint;
2575  int i=0,p=0;
2576  while ((i=a->typeConstraint.find('&',p))!=-1) // typeConstraint="A &I" for C<T extends A & I>
2577  {
2578  typeConstraint = a->typeConstraint.mid(p,i-p).stripWhiteSpace();
2579  addTypeConstraint(typeConstraint,a->type);
2580  p=i+1;
2581  }
2582  typeConstraint = a->typeConstraint.right(a->typeConstraint.length()-p).stripWhiteSpace();
2583  addTypeConstraint(typeConstraint,a->type);
2584  }
2585  }
2586  }
2587 }
2588 
2589 // C# Type Constraints: D<T> where T : C, I
2591 {
2592  if (al==0) return;
2595  ArgumentListIterator ali(*al);
2596  Argument *a;
2597  for (;(a=ali.current());++ali)
2598  {
2600  }
2601 }
2602 
2604 {
2605  if (al==0) return;
2606  if (m_impl->tempArgs) delete m_impl->tempArgs; // delete old list if needed
2607  //printf("setting template args '%s' for '%s'\n",tempArgListToString(al,getLanguage()).data(),name().data());
2609  ArgumentListIterator ali(*al);
2610  Argument *a;
2611  for (;(a=ali.current());++ali)
2612  {
2613  m_impl->tempArgs->append(new Argument(*a));
2614  }
2615 }
2616 
2617 /*! Returns \c TRUE iff this class or a class inheriting from this class
2618  * is \e not defined in an external tag file.
2619  */
2621 {
2622  bool found=!isReference() && isLinkableInProject() && !isHidden();
2623  if (found)
2624  {
2625  return TRUE; // we're done if this class is not a reference
2626  }
2627  if (m_impl->inheritedBy)
2628  {
2630  for ( ; bcli.current() && !found ; ++bcli ) // for each super class
2631  {
2632  ClassDef *bcd=bcli.current()->classDef;
2633  // recurse into the super class branch
2634  found = found || bcd->hasNonReferenceSuperClass();
2635  if (!found)
2636  {
2637  // look for template instances that might have non-reference super classes
2638  QDict<ClassDef> *cil = bcd->getTemplateInstances();
2639  if (cil)
2640  {
2641  QDictIterator<ClassDef> tidi(*cil);
2642  for ( ; tidi.current() && !found ; ++tidi) // for each template instance
2643  {
2644  // recurse into the template instance branch
2645  found = found || tidi.current()->hasNonReferenceSuperClass();
2646  }
2647  }
2648  }
2649  }
2650  }
2651  return found;
2652 }
2653 
2654 /*! called from MemberDef::writeDeclaration() to (recusively) write the
2655  * definition of an anonymous struct, union or class.
2656  */
2658  ClassDef *inheritedFrom,const char *inheritId)
2659 {
2660  //printf("ClassName=`%s' inGroup=%d\n",name().data(),inGroup);
2661 
2662  ol.docify(compoundTypeString());
2663  QCString cn = displayName(FALSE);
2664  if (!cn.isEmpty())
2665  {
2666  ol.docify(" ");
2667  if (md && isLinkable())
2668  {
2669  ol.writeObjectLink(0,0,md->anchor(),cn);
2670  }
2671  else
2672  {
2673  ol.startBold();
2674  ol.docify(cn);
2675  ol.endBold();
2676  }
2677  }
2678  ol.docify(" {");
2679  ol.endMemberItem();
2680 
2681  // write user defined member groups
2682  if (m_impl->memberGroupSDict)
2683  {
2685  MemberGroup *mg;
2686  for (;(mg=mgli.current());++mgli)
2687  {
2688  mg->setInGroup(inGroup);
2689  mg->writePlainDeclarations(ol,this,0,0,0,inheritedFrom,inheritId);
2690  }
2691  }
2692 
2695  LayoutDocEntry *lde;
2696  for (eli.toFirst();(lde=eli.current());++eli)
2697  {
2698  if (lde->kind()==LayoutDocEntry::MemberDecl)
2699  {
2701  writePlainMemberDeclaration(ol,lmd->type,inGroup,inheritedFrom,inheritId);
2702  }
2703  }
2704 }
2705 
2706 /*! a link to this class is possible within this project */
2708 {
2709  static bool extractLocal = Config_getBool("EXTRACT_LOCAL_CLASSES");
2710  static bool extractStatic = Config_getBool("EXTRACT_STATIC");
2711  static bool hideUndoc = Config_getBool("HIDE_UNDOC_CLASSES");
2712  if (m_impl->templateMaster)
2713  {
2715  }
2716  else
2717  {
2718  return !name().isEmpty() && /* has a name */
2719  !isArtificial() && !isHidden() && /* not hidden */
2720  !isAnonymous() && /* not anonymous */
2721  protectionLevelVisible(m_impl->prot) && /* private/internal */
2722  (!m_impl->isLocal || extractLocal) && /* local */
2723  (hasDocumentation() || !hideUndoc) && /* documented */
2724  (!m_impl->isStatic || extractStatic) && /* static */
2725  !isReference(); /* not an external reference */
2726  }
2727 }
2728 
2730 {
2731  if (m_impl->templateMaster)
2732  {
2733  return m_impl->templateMaster->isLinkable();
2734  }
2735  else
2736  {
2737  return isReference() || isLinkableInProject();
2738  }
2739 }
2740 
2741 
2742 /*! the class is visible in a class diagram, or class hierarchy */
2744 {
2745  static bool allExternals = Config_getBool("ALLEXTERNALS");
2746  static bool hideUndocClasses = Config_getBool("HIDE_UNDOC_CLASSES");
2747  static bool extractStatic = Config_getBool("EXTRACT_STATIC");
2748 
2749  return // show all classes or a subclass is visible
2750  (allExternals || hasNonReferenceSuperClass()) &&
2751  // and not an anonymous compound
2752  !isAnonymous() &&
2753  // not an artificially introduced class
2754  /*!isArtificial() &&*/ // 1.8.2: allowed these to appear
2755  // and not privately inherited
2757  // documented or shown anyway or documentation is external
2758  (hasDocumentation() ||
2759  !hideUndocClasses ||
2761  isReference()
2762  ) &&
2763  // is not part of an unnamed namespace or shown anyway
2764  (!m_impl->isStatic || extractStatic);
2765 }
2766 
2768 {
2770 }
2771 
2772 //----------------------------------------------------------------------
2773 // recursive function:
2774 // returns TRUE iff class definition `bcd' represents an (in)direct base
2775 // class of class definition `cd'.
2776 
2777 bool ClassDef::isBaseClass(ClassDef *bcd, bool followInstances,int level)
2778 {
2779  bool found=FALSE;
2780  //printf("isBaseClass(cd=%s) looking for %s\n",name().data(),bcd->name().data());
2781  if (level>256)
2782  {
2783  err("Possible recursive class relation while inside %s and looking for base class %s\n",qPrint(name()),qPrint(bcd->name()));
2784  return FALSE;
2785  }
2786  if (baseClasses())
2787  {
2788  // Beware: trying to optimise the iterator away using ->first() & ->next()
2789  // causes bug 625531
2791  for ( ; bcli.current() && !found ; ++bcli)
2792  {
2793  ClassDef *ccd=bcli.current()->classDef;
2794  if (!followInstances && ccd->templateMaster()) ccd=ccd->templateMaster();
2795  //printf("isBaseClass() baseclass %s\n",ccd->name().data());
2796  if (ccd==bcd)
2797  found=TRUE;
2798  else
2799  found=ccd->isBaseClass(bcd,followInstances,level+1);
2800  }
2801  }
2802  return found;
2803 }
2804 
2805 //----------------------------------------------------------------------
2806 
2808 {
2809  bool found=FALSE;
2810  if (level>256)
2811  {
2812  err("Possible recursive class relation while inside %s and looking for derived class %s\n",qPrint(name()),qPrint(cd->name()));
2813  return FALSE;
2814  }
2815  if (subClasses())
2816  {
2818  for ( ; bcli.current() && !found ; ++bcli)
2819  {
2820  ClassDef *ccd=bcli.current()->classDef;
2821  if (ccd==cd)
2822  found=TRUE;
2823  else
2824  found=ccd->isSubClass(cd,level+1);
2825  }
2826  }
2827  return found;
2828 }
2829 
2830 //----------------------------------------------------------------------------
2831 
2833 {
2834  return md->name()=="operator=" || // assignment operator
2835  md->isConstructor() || // constructor
2836  md->isDestructor(); // destructor
2837 }
2838 
2839 /*!
2840  * recusively merges the `all members' lists of a class base
2841  * with that of this class. Must only be called for classes without
2842  * subclasses!
2843  */
2845 {
2846  if (m_impl->membersMerged) return;
2847 
2848  //static bool optimizeOutputForJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
2849  //static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
2850  SrcLangExt lang = getLanguage();
2852  int sepLen = sep.length();
2853 
2855  //printf(" mergeMembers for %s\n",name().data());
2856  bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB" );
2857  if (baseClasses())
2858  {
2859  //printf(" => has base classes!\n");
2861  BaseClassDef *bcd;
2862  for ( ; (bcd=bcli.current()) ; ++bcli )
2863  {
2864  ClassDef *bClass=bcd->classDef;
2865 
2866  // merge the members in the base class of this inheritance branch first
2867  bClass->mergeMembers();
2868 
2869  MemberNameInfoSDict *srcMnd = bClass->memberNameInfoSDict();
2871 
2872  if (srcMnd)
2873  {
2874  MemberNameInfoSDict::Iterator srcMnili(*srcMnd);
2875  MemberNameInfo *srcMni;
2876  for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
2877  {
2878  //printf(" Base member name %s\n",srcMni->memberName());
2879  MemberNameInfo *dstMni;
2880  if (dstMnd!=0 && (dstMni=dstMnd->find(srcMni->memberName())))
2881  // a member with that name is already in the class.
2882  // the member may hide or reimplement the one in the sub class
2883  // or there may be another path to the base class that is already
2884  // visited via another branch in the class hierarchy.
2885  {
2886  MemberNameInfoIterator srcMnii(*srcMni);
2887  MemberInfo *srcMi;
2888  for ( ; (srcMi=srcMnii.current()) ; ++srcMnii )
2889  {
2890  MemberDef *srcMd = srcMi->memberDef;
2891  bool found=FALSE;
2892  bool ambigue=FALSE;
2893  bool hidden=FALSE;
2894  MemberNameInfoIterator dstMnii(*dstMni);
2895  MemberInfo *dstMi;
2896  ClassDef *srcCd = srcMd->getClassDef();
2897  for ( ; (dstMi=dstMnii.current()) && !found; ++dstMnii )
2898  {
2899  MemberDef *dstMd = dstMi->memberDef;
2900  if (srcMd!=dstMd) // different members
2901  {
2902  ClassDef *dstCd = dstMd->getClassDef();
2903  //printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data());
2904  if (srcCd==dstCd || dstCd->isBaseClass(srcCd,TRUE))
2905  // member is in the same or a base class
2906  {
2907  ArgumentList *srcAl = srcMd->argumentList();
2908  ArgumentList *dstAl = dstMd->argumentList();
2909  found=matchArguments2(
2910  srcMd->getOuterScope(),srcMd->getFileDef(),srcAl,
2911  dstMd->getOuterScope(),dstMd->getFileDef(),dstAl,
2912  TRUE
2913  );
2914  //printf(" Yes, matching (%s<->%s): %d\n",
2915  // argListToString(srcMd->argumentList()).data(),
2916  // argListToString(dstMd->argumentList()).data(),
2917  // found);
2918  hidden = hidden || !found;
2919  }
2920  else // member is in a non base class => multiple inheritance
2921  // using the same base class.
2922  {
2923  //printf("$$ Existing member %s %s add scope %s\n",
2924  // dstMi->ambiguityResolutionScope.data(),
2925  // dstMd->name().data(),
2926  // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
2927 
2928  QCString scope=dstMi->scopePath.left(dstMi->scopePath.find(sep)+sepLen);
2929  if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
2930  dstMi->ambiguityResolutionScope.prepend(scope);
2931  ambigue=TRUE;
2932  }
2933  }
2934  else // same members
2935  {
2936  // do not add if base class is virtual or
2937  // if scope paths are equal or
2938  // if base class is an interface (and thus implicitly virtual).
2939  //printf("same member found srcMi->virt=%d dstMi->virt=%d\n",srcMi->virt,dstMi->virt);
2940  if ((srcMi->virt!=Normal && dstMi->virt!=Normal) ||
2941  bClass->name()+sep+srcMi->scopePath == dstMi->scopePath ||
2942  dstMd->getClassDef()->compoundType()==Interface
2943  )
2944  {
2945  found=TRUE;
2946  }
2947  else // member can be reached via multiple paths in the
2948  // inheritance tree
2949  {
2950  //printf("$$ Existing member %s %s add scope %s\n",
2951  // dstMi->ambiguityResolutionScope.data(),
2952  // dstMd->name().data(),
2953  // dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
2954 
2955  QCString scope=dstMi->scopePath.left(dstMi->scopePath.find(sep)+sepLen);
2956  if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
2957  {
2958  dstMi->ambiguityResolutionScope.prepend(scope);
2959  }
2960  ambigue=TRUE;
2961  }
2962  }
2963  }
2964  //printf("member %s::%s hidden %d ambigue %d srcMi->ambigClass=%p\n",
2965  // srcCd->name().data(),srcMd->name().data(),hidden,ambigue,srcMi->ambigClass);
2966 
2967  // TODO: fix the case where a member is hidden by inheritance
2968  // of a member with the same name but with another prototype,
2969  // while there is more than one path to the member in the
2970  // base class due to multiple inheritance. In this case
2971  // it seems that the member is not reachable by prefixing a
2972  // scope name either (according to my compiler). Currently,
2973  // this case is shown anyway.
2974  if (!found && srcMd->protection()!=Private && !srcMd->isFriend())
2975  {
2976  Protection prot=srcMd->protection();
2977  if (bcd->prot==Protected && prot==Public) prot=bcd->prot;
2978  else if (bcd->prot==Private) prot=bcd->prot;
2979 
2980  if (inlineInheritedMembers)
2981  {
2982  if (!isStandardFunc(srcMd))
2983  {
2984  //printf(" insertMember `%s'\n",srcMd->name().data());
2985  internalInsertMember(srcMd,prot,FALSE);
2986  }
2987  }
2988 
2989  Specifier virt=srcMi->virt;
2990  if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
2991 
2992  MemberInfo *newMi = new MemberInfo(srcMd,prot,virt,TRUE);
2993  newMi->scopePath=bClass->name()+sep+srcMi->scopePath;
2994  if (ambigue)
2995  {
2996  //printf("$$ New member %s %s add scope %s::\n",
2997  // srcMi->ambiguityResolutionScope.data(),
2998  // srcMd->name().data(),
2999  // bClass->name().data());
3000 
3001  QCString scope=bClass->name()+sep;
3002  if (scope!=srcMi->ambiguityResolutionScope.left(scope.length()))
3003  {
3004  newMi->ambiguityResolutionScope=
3005  scope+srcMi->ambiguityResolutionScope.copy();
3006  }
3007  }
3008  if (hidden)
3009  {
3010  if (srcMi->ambigClass==0)
3011  {
3012  newMi->ambigClass=bClass;
3013  newMi->ambiguityResolutionScope=bClass->name()+sep;
3014  }
3015  else
3016  {
3017  newMi->ambigClass=srcMi->ambigClass;
3018  newMi->ambiguityResolutionScope=srcMi->ambigClass->name()+sep;
3019  }
3020  }
3021  dstMni->append(newMi);
3022  }
3023  }
3024  }
3025  else // base class has a member that is not in the sub class => copy
3026  {
3027  // create a deep copy of the list (only the MemberInfo's will be
3028  // copied, not the actual MemberDef's)
3029  MemberNameInfo *newMni = 0;
3030  newMni = new MemberNameInfo(srcMni->memberName());
3031 
3032  // copy the member(s) from the base to the sub class
3033  MemberNameInfoIterator mnii(*srcMni);
3034  MemberInfo *mi;
3035  for (;(mi=mnii.current());++mnii)
3036  {
3037  if (!mi->memberDef->isFriend()) // don't inherit friends
3038  {
3039  Protection prot = mi->prot;
3040  if (bcd->prot==Protected)
3041  {
3042  if (prot==Public) prot=Protected;
3043  }
3044  else if (bcd->prot==Private)
3045  {
3046  prot=Private;
3047  }
3048  //printf("%s::%s: prot=%d bcd->prot=%d result=%d\n",
3049  // name().data(),mi->memberDef->name().data(),mi->prot,
3050  // bcd->prot,prot);
3051 
3052  if (mi->prot!=Private)
3053  {
3054  Specifier virt=mi->virt;
3055  if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
3056 
3057  if (inlineInheritedMembers)
3058  {
3059  if (!isStandardFunc(mi->memberDef))
3060  {
3061  //printf(" insertMember `%s'\n",mi->memberDef->name().data());
3063  }
3064  }
3065  //printf("Adding!\n");
3066  MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,virt,TRUE);
3067  newMi->scopePath=bClass->name()+sep+mi->scopePath;
3068  newMi->ambigClass=mi->ambigClass;
3070  newMni->append(newMi);
3071  }
3072  }
3073  }
3074 
3075  if (dstMnd==0)
3076  {
3079  dstMnd = m_impl->allMemberNameInfoSDict;
3080  }
3081  // add it to the dictionary
3082  dstMnd->append(newMni->memberName(),newMni);
3083  }
3084  }
3085  }
3086  }
3087  }
3088  //printf(" end mergeMembers\n");
3089 }
3090 
3091 //----------------------------------------------------------------------------
3092 
3093 /*! Merges the members of a Objective-C category into this class.
3094  */
3096 {
3097  static bool extractLocalMethods = Config_getBool("EXTRACT_LOCAL_METHODS");
3098  bool makePrivate = category->isLocal();
3099  // in case extract local methods is not enabled we don't add the methods
3100  // of the category in case it is defined in the .m file.
3101  if (makePrivate && !extractLocalMethods) return;
3102  bool isExtension = category->isExtension();
3103 
3104  category->setCategoryOf(this);
3105  if (isExtension)
3106  {
3107  category->setArtificial(TRUE);
3108 
3109  // copy base classes/protocols from extension
3110  if (category->baseClasses())
3111  {
3112  BaseClassListIterator bcli(*category->baseClasses());
3113  BaseClassDef *bcd;
3114  for ( ; (bcd=bcli.current()) ; ++bcli )
3115  {
3116  insertBaseClass(bcd->classDef,bcd->usedName,bcd->prot,bcd->virt,bcd->templSpecifiers);
3117  // correct bcd->classDef so that they do no longer derive from
3118  // category, but from this class!
3119  if (bcd->classDef->subClasses())
3120  {
3121  BaseClassListIterator scli(*bcd->classDef->subClasses());
3122  BaseClassDef *scd;
3123  for ( ; (scd=scli.current()) ; ++scli )
3124  {
3125  if (scd->classDef==category)
3126  {
3127  scd->classDef=this;
3128  }
3129  }
3130  }
3131  }
3132  }
3133 
3134  }
3135  // make methods private for categories defined in the .m file
3136  //printf("%s::mergeCategory makePrivate=%d\n",name().data(),makePrivate);
3137 
3138  MemberNameInfoSDict *srcMnd = category->memberNameInfoSDict();
3140 
3141  if (srcMnd && dstMnd)
3142  {
3143  MemberNameInfoSDict::Iterator srcMnili(*srcMnd);
3144  MemberNameInfo *srcMni;
3145  for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
3146  {
3147  MemberNameInfo *dstMni=dstMnd->find(srcMni->memberName());
3148  if (dstMni) // method is already defined in the class
3149  {
3150  //printf("Existing member %s\n",srcMni->memberName());
3151  MemberInfo *dstMi = dstMni->getFirst();
3152  MemberInfo *srcMi = srcMni->getFirst();
3153  //if (dstMi)
3154  //{
3155  // Protection prot = dstMi->prot;
3156  // if (makePrivate || isExtension)
3157  // {
3158  // prot = Private;
3159  // removeMemberFromLists(dstMi->memberDef);
3160  // internalInsertMember(dstMi->memberDef,prot,FALSE);
3161  // }
3162  //}
3163  if (srcMi && dstMi)
3164  {
3166  dstMi->memberDef->setCategory(category);
3167  dstMi->memberDef->setCategoryRelation(srcMi->memberDef);
3168  srcMi->memberDef->setCategoryRelation(dstMi->memberDef);
3169  }
3170  }
3171  else // new method name
3172  {
3173  //printf("New member %s\n",srcMni->memberName());
3174  // create a deep copy of the list
3175  MemberNameInfo *newMni = 0;
3176  newMni = new MemberNameInfo(srcMni->memberName());
3177 
3178  // copy the member(s) from the category to this class
3179  MemberNameInfoIterator mnii(*srcMni);
3180  MemberInfo *mi;
3181  for (;(mi=mnii.current());++mnii)
3182  {
3183  //printf("Adding '%s'\n",mi->memberDef->name().data());
3184  Protection prot = mi->prot;
3185  //if (makePrivate) prot = Private;
3186  MemberDef *newMd = mi->memberDef->deepCopy();
3187  if (newMd)
3188  {
3189  //printf("Copying member %s\n",mi->memberDef->name().data());
3190  newMd->moveTo(this);
3191 
3192  MemberInfo *newMi=new MemberInfo(newMd,prot,mi->virt,mi->inherited);
3193  newMi->scopePath=mi->scopePath;
3194  newMi->ambigClass=mi->ambigClass;
3196  newMni->append(newMi);
3197 
3198  // also add the newly created member to the global members list
3199 
3200  MemberName *mn;
3201  QCString name = newMd->name();
3202  if ((mn=Doxygen::memberNameSDict->find(name)))
3203  {
3204  mn->append(newMd);
3205  }
3206  else
3207  {
3208  mn = new MemberName(newMd->name());
3209  mn->append(newMd);
3210  Doxygen::memberNameSDict->append(name,mn);
3211  }
3212 
3213  newMd->setCategory(category);
3214  newMd->setCategoryRelation(mi->memberDef);
3215  mi->memberDef->setCategoryRelation(newMd);
3216  if (makePrivate || isExtension)
3217  {
3218  newMd->makeImplementationDetail();
3219  }
3220  internalInsertMember(newMd,prot,FALSE);
3221  }
3222  }
3223 
3224  // add it to the dictionary
3225  dstMnd->append(newMni->memberName(),newMni);
3226  }
3227  }
3228  }
3229 }
3230 
3231 //----------------------------------------------------------------------------
3232 
3233 void ClassDef::addUsedClass(ClassDef *cd,const char *accessName,
3234  Protection prot)
3235 {
3236  static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
3237  static bool umlLook = Config_getBool("UML_LOOK");
3238  if (prot==Private && !extractPrivate) return;
3239  //printf("%s::addUsedClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
3240  if (m_impl->usesImplClassDict==0)
3241  {
3243  m_impl->usesImplClassDict->setAutoDelete(TRUE);
3244  }
3245  UsesClassDef *ucd=m_impl->usesImplClassDict->find(cd->name());
3246  if (ucd==0)
3247  {
3248  ucd = new UsesClassDef(cd);
3249  m_impl->usesImplClassDict->insert(cd->name(),ucd);
3250  //printf("Adding used class %s to class %s via accessor %s\n",
3251  // cd->name().data(),name().data(),accessName);
3252  }
3253  QCString acc = accessName;
3254  if (umlLook)
3255  {
3256  switch(prot)
3257  {
3258  case Public: acc.prepend("+"); break;
3259  case Private: acc.prepend("-"); break;
3260  case Protected: acc.prepend("#"); break;
3261  case Package: acc.prepend("~"); break;
3262  }
3263  }
3264  ucd->addAccessor(acc);
3265 }
3266 
3267 void ClassDef::addUsedByClass(ClassDef *cd,const char *accessName,
3268  Protection prot)
3269 {
3270  static bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
3271  static bool umlLook = Config_getBool("UML_LOOK");
3272  if (prot==Private && !extractPrivate) return;
3273  //printf("%s::addUsedByClass(%s,%s)\n",name().data(),cd->name().data(),accessName);
3274  if (m_impl->usedByImplClassDict==0)
3275  {
3277  m_impl->usedByImplClassDict->setAutoDelete(TRUE);
3278  }
3279  UsesClassDef *ucd=m_impl->usedByImplClassDict->find(cd->name());
3280  if (ucd==0)
3281  {
3282  ucd = new UsesClassDef(cd);
3283  m_impl->usedByImplClassDict->insert(cd->name(),ucd);
3284  //printf("Adding used by class %s to class %s\n",
3285  // cd->name().data(),name().data());
3286  }
3287  QCString acc = accessName;
3288  if (umlLook)
3289  {
3290  switch(prot)
3291  {
3292  case Public: acc.prepend("+"); break;
3293  case Private: acc.prepend("-"); break;
3294  case Protected: acc.prepend("#"); break;
3295  case Package: acc.prepend("~"); break;
3296  }
3297  }
3298  ucd->addAccessor(acc);
3299 }
3300 
3301 
3302 #if 0
3303 /*! Builds up a dictionary of all classes that are used by the state of this
3304  * class (the "implementation").
3305  * Must be called before mergeMembers() is called!
3306  */
3307 
3308 void ClassDef::determineImplUsageRelation()
3309 {
3311  MemberNameInfo *mni;
3312  for (;(mni=mnili.current());++mnili)
3313  {
3314  MemberNameInfoIterator mnii(*mni);
3315  MemberInfo *mi;
3316  for (mnii.toFirst();(mi=mnii.current());++mnii)
3317  {
3318  MemberDef *md=mi->memberDef;
3319  if (md->isVariable()) // for each member variable in this class
3320  {
3322  //printf("in class %s found var type=`%s' name=`%s'\n",
3323  // name().data(),type.data(),md->name().data());
3324  int pos=0;
3325  QCString usedClassName;
3326  QCString templSpec;
3327  bool found=FALSE;
3328  while (extractClassNameFromType(type,pos,usedClassName,templSpec)!=-1 && !found)
3329  {
3330  //printf("usedClassName=`%s' templSpec=%s\n",usedClassName.data(),templSpec.data());
3331  // check if usedClassName is a template argument of its class
3332  ClassDef *cd=md->getClassDef();
3333  if (cd && cd->templateArguments())
3334  {
3336  Argument *arg;
3337  int count=0;
3338  for (ali.toFirst();(arg=ali.current());++ali,++count)
3339  {
3340  if (arg->name==usedClassName) // type is a template argument
3341  {
3342  found=TRUE;
3344  cd = new ClassDef(cd->getDefFileName(),cd->getDefLine(),
3345  usedClassName,ClassDef::Class);
3346  cd->setIsTemplateBaseClass(count);
3347  UsesClassDef *ucd = new UsesClassDef(cd);
3348  m_impl->usesImplClassDict->insert(cd->name(),ucd);
3349  ucd->templSpecifiers = templSpec;
3350  ucd->addAccessor(md->name());
3352  //printf("Adding used template argument %s to class %s\n",
3353  // cd->name().data(),name().data());
3354  //printf("Adding accessor %s to class %s\n",
3355  // md->name().data(),ucd->classDef->name().data());
3356  }
3357  }
3358  }
3359 
3360  if (!found)
3361  {
3362  cd=0;
3363  if (getNamespaceDef()!=0)
3364  {
3365  cd=getResolvedClass(getNamespaceDef()->name()+"::"+usedClassName,0,&templSpec);
3366  }
3367  if (cd==0) cd=getResolvedClass(name()+"::"+usedClassName,0,&templSpec);
3368  if (cd==0) cd=getResolvedClass(usedClassName,0,&templSpec); // TODO: also try in-between scopes!
3369  //printf("Search for class %s result=%p\n",usedClassName.data(),cd);
3370  if (cd) // class exists
3371  {
3372  found=TRUE;
3373  if (m_impl->usesImplClassDict==0)
3374  {
3376  m_impl->usesImplClassDict->setAutoDelete(TRUE);
3377  }
3378  UsesClassDef *ucd=m_impl->usesImplClassDict->find(cd->name());
3379  if (ucd==0 || ucd->templSpecifiers!=templSpec)
3380  {
3381  ucd = new UsesClassDef(cd);
3382  m_impl->usesImplClassDict->insert(cd->name(),ucd);
3383  ucd->templSpecifiers = templSpec;
3384  //printf("Adding used class %s to class %s\n",
3385  // cd->name().data(),name().data());
3386  }
3387  ucd->addAccessor(md->name());
3388  //printf("Adding accessor %s to class %s\n",
3389  // md->name().data(),ucd->classDef->name().data());
3390  }
3391  }
3392  }
3393  }
3394  }
3395  }
3396 #ifdef DUMP
3397  if (m_impl->usesClassDict)
3398  {
3399  msg("Class %s uses the following classes:\n",name().data());
3400  UsesClassDictIterator ucdi(*m_impl->usesClassDict);
3401  UsesClassDef *ucd;
3402  for (;(ucd=ucdi.current());++ucdi)
3403  {
3404  msg(" %s via ",ucd->classDef->name().data());
3405  QDictIterator<void> dvi(*ucd->accessors);
3406  const char *s;
3407  for (;(s=dvi.currentKey());++dvi)
3408  {
3409  msg("%s ",s);
3410  }
3411  msg("\n");
3412  }
3413  }
3414 #endif
3415 }
3416 
3417 //----------------------------------------------------------------------------
3418 
3419 // I have disabled this code because the graphs it renders quickly become
3420 // too large to be of practical use.
3421 
3422 void ClassDef::addUsedInterfaceClasses(MemberDef *md,const char *typeStr)
3423 {
3424  QCString type = typeStr;
3425  static const QRegExp re("[a-z_A-Z][a-z_A-Z0-9:]*");
3426  int p=0,i,l;
3427  while ((i=re.match(type,p,&l))!=-1) // for each class name in the type
3428  {
3429  ClassDef *cd=getClass(name()+"::"+type.mid(i,l));
3430  if (cd==0) cd=getClass(type.mid(i,l)); // TODO: also try in-between scopes!
3431  if (cd && cd!=this && !isBaseClass(cd))
3432  {
3433  if (m_impl->usesIntfClassDict==0)
3434  {
3436  }
3437  UsesClassDef *ucd=m_impl->usesIntfClassDict->find(cd->name());
3438  if (ucd==0)
3439  {
3440  ucd = new UsesClassDef(cd);
3441  m_impl->usesIntfClassDict->insert(cd->name(),ucd);
3442  //printf("in class `%s' adding used intf class `%s'\n",
3443  // name().data(),cd->name().data());
3444  }
3445  ucd->addAccessor(md->name());
3446  //printf("in class `%s' adding accessor `%s' to class `%s'\n",
3447  // name().data(),md->name().data(),ucd->classDef->name().data());
3448  }
3449  p=i+l;
3450  }
3451 }
3452 
3453 void ClassDef::determineIntfUsageRelation()
3454 {
3455  MemberNameInfoSDict::Iterator mnili(*m_impl->allMemberNameInfoList);
3456  MemberNameInfo *mni;
3457  for (;(mni=mnili.current());++mnili)
3458  {
3459  MemberNameInfoIterator mnii(*mni);
3460  MemberInfo *mi;
3461  for (mnii.toFirst();(mi=mnii.current());++mnii)
3462  {
3463  MemberDef *md=mi->memberDef;
3464 
3465  // compute the protection level for this member
3466  Protection protect=md->protection();
3467  if (mi->prot==Protected) // inherited protection
3468  {
3469  if (protect==Public) protect=Protected;
3470  else if (protect==Protected) protect=Private;
3471  }
3472 
3473  if (!md->name().isEmpty() && md->name()[0]!='@' &&
3474  (mi->prot!=Private && protect!=Private)
3475  )
3476  {
3477  // add classes found in the return type
3479  ArgumentList *al = md->argumentList();
3480  if (al) // member has arguments
3481  {
3482  // add classes found in the types of the argument list
3483  ArgumentListIterator ali(*al);
3484  Argument *a;
3485  for (;(a=ali.current());++ali)
3486  {
3487  if (!a->type.isEmpty() && a->type.at(0)!='@')
3488  {
3490  }
3491  }
3492  }
3493  }
3494  }
3495  }
3496 }
3497 #endif
3498 
3500 {
3502  {
3503  switch (m_impl->compType)
3504  {
3505  case Class: return "module";
3506  case Struct: return "type";
3507  case Union: return "union";
3508  case Interface: return "interface";
3509  case Protocol: return "protocol";
3510  case Category: return "category";
3511  case Exception: return "exception";
3512  default: return "unknown";
3513  }
3514  }
3515  else
3516  {
3517  switch (m_impl->compType)
3518  {
3519  case Class: return isJavaEnum() ? "enum" : "class";
3520  case Struct: return "struct";
3521  case Union: return "union";
3522  case Interface: return getLanguage()==SrcLangExt_ObjC ? "class" : "interface";
3523  case Protocol: return "protocol";
3524  case Category: return "category";
3525  case Exception: return "exception";
3526  case Service: return "service";
3527  case Singleton: return "singleton";
3528  default: return "unknown";
3529  }
3530  }
3531 }
3532 
3534 {
3535  static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
3536  static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
3538  {
3539  Definition *scope=0;
3540  if (inlineGroupedClasses && partOfGroups()!=0)
3541  {
3542  // point to the group that embeds this class
3543  return partOfGroups()->at(0)->getOutputFileBase();
3544  }
3545  else if (inlineSimpleClasses && m_impl->isSimple && partOfGroups()!=0)
3546  {
3547  // point to simple struct inside a group
3548  return partOfGroups()->at(0)->getOutputFileBase();
3549  }
3550  else if (inlineSimpleClasses && m_impl->isSimple && (scope=getOuterScope()))
3551  {
3552  if (scope==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) // simple struct embedded in file
3553  {
3554  return getFileDef()->getOutputFileBase();
3555  }
3556  else if (scope->isLinkableInProject()) // simple struct embedded in other container (namespace/group/class)
3557  {
3558  return getOuterScope()->getOutputFileBase();
3559  }
3560  }
3561  }
3562  if (m_impl->templateMaster)
3563  {
3564  // point to the template of which this class is an instance
3566  }
3567  else if (isReference())
3568  {
3569  // point to the external location
3570  return m_impl->fileName;
3571  }
3572  else
3573  {
3574  // normal locally defined class
3576  }
3577 }
3578 
3580 {
3581  if (isReference())
3582  {
3583  return m_impl->fileName;
3584  }
3585  else
3586  {
3588  }
3589 }
3590 
3592 {
3593  if (m_impl->templateMaster)
3594  {
3595  return m_impl->templateMaster->getFileBase();
3596  }
3597  else
3598  {
3599  return m_impl->fileName;
3600  }
3601 }
3602 
3604 {
3605  if (m_impl->templateMaster)
3606  {
3608  }
3609  else
3610  {
3612  }
3613 }
3614 
3616 {
3617  gd->addClass(this);
3618  //printf("ClassDef::setGroupDefForAllMembers(%s)\n",gd->name().data());
3619  if (m_impl->allMemberNameInfoSDict==0) return;
3621  MemberNameInfo *mni;
3622  for (;(mni=mnili.current());++mnili)
3623  {
3624  MemberNameInfoIterator mnii(*mni);
3625  MemberInfo *mi;
3626  for (mnii.toFirst();(mi=mnii.current());++mnii)
3627  {
3628  MemberDef *md=mi->memberDef;
3629  md->setGroupDef(gd,pri,fileName,startLine,hasDocs);
3630  gd->insertMember(md,TRUE);
3631  ClassDef *innerClass = md->getClassDefOfAnonymousType();
3632  if (innerClass) innerClass->setGroupDefForAllMembers(gd,pri,fileName,startLine,hasDocs);
3633  }
3634  }
3635 }
3636 
3638 {
3639  //printf("**** %s::addInnerCompound(%s)\n",name().data(),d->name().data());
3640  if (d->definitionType()==Definition::TypeClass) // only classes can be
3641  // nested in classes.
3642  {
3643  if (m_impl->innerClasses==0)
3644  {
3645  m_impl->innerClasses = new ClassSDict(17);
3646  }
3648  }
3649 }
3650 
3652 {
3653  Definition *result=0;
3654  if (name==0) return 0;
3655  if (m_impl->innerClasses)
3656  {
3657  result = m_impl->innerClasses->find(name);
3658  }
3659  return result;
3660 }
3661 
3662 //void ClassDef::initTemplateMapping()
3663 //{
3664 // m_impl->templateMapping->clear();
3665 // ArgumentList *al = templateArguments();
3666 // if (al)
3667 // {
3668 // ArgumentListIterator ali(*al);
3669 // Argument *arg;
3670 // for (ali.toFirst();(arg=ali.current());++ali)
3671 // {
3672 // setTemplateArgumentMapping(arg->name,arg->defval);
3673 // }
3674 // }
3675 //}
3676 //void ClassDef::setTemplateArgumentMapping(const char *formal,const char *actual)
3677 //{
3678 // //printf("ClassDef::setTemplateArgumentMapping(%s,%s)\n",formal,actual);
3679 // if (m_impl->templateMapping && formal)
3680 // {
3681 // if (m_impl->templateMapping->find(formal))
3682 // {
3683 // m_impl->templateMapping->remove(formal);
3684 // }
3685 // m_impl->templateMapping->insert(formal,new QCString(actual));
3686 // }
3687 //}
3688 //
3689 //QCString ClassDef::getTemplateArgumentMapping(const char *formal) const
3690 //{
3691 // if (m_impl->templateMapping && formal)
3692 // {
3693 // QCString *s = m_impl->templateMapping->find(formal);
3694 // if (s)
3695 // {
3696 // return *s;
3697 // }
3698 // }
3699 // return "";
3700 //}
3701 
3703  int startLine, int startColumn, const QCString &templSpec,bool &freshInstance)
3704 {
3705  freshInstance = FALSE;
3706  if (m_impl->templateInstances==0)
3707  {
3708  m_impl->templateInstances = new QDict<ClassDef>(17);
3709  }
3710  ClassDef *templateClass=m_impl->templateInstances->find(templSpec);
3711  if (templateClass==0)
3712  {
3713  Debug::print(Debug::Classes,0," New template instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
3714  QCString tcname = removeRedundantWhiteSpace(localName()+templSpec);
3715  templateClass = new ClassDef(
3716  fileName,startLine,startColumn,tcname,ClassDef::Class);
3717  templateClass->setTemplateMaster(this);
3718  templateClass->setOuterScope(getOuterScope());
3719  templateClass->setHidden(isHidden());
3720  m_impl->templateInstances->insert(templSpec,templateClass);
3721  freshInstance=TRUE;
3722  }
3723  return templateClass;
3724 }
3725 
3727 {
3728  if (m_impl->variableInstances==0)
3729  {
3730  m_impl->variableInstances = new QDict<ClassDef>(17);
3731  m_impl->variableInstances->setAutoDelete(TRUE);
3732  }
3733  ClassDef *templateClass=m_impl->variableInstances->find(templSpec);
3734  if (templateClass==0)
3735  {
3736  Debug::print(Debug::Classes,0," New template variable instance class `%s'`%s'\n",qPrint(name()),qPrint(templSpec));
3737  QCString tcname = removeRedundantWhiteSpace(name()+templSpec);
3738  templateClass = new ClassDef("<code>",1,1,tcname,
3739  ClassDef::Class,0,0,FALSE);
3740  templateClass->addMembersToTemplateInstance( this, templSpec );
3741  templateClass->setTemplateMaster(this);
3742  m_impl->variableInstances->insert(templSpec,templateClass);
3743  }
3744  return templateClass;
3745 }
3746 
3747 void ClassDef::setTemplateBaseClassNames(QDict<int> *templateNames)
3748 {
3749  if (templateNames==0) return;
3750  if (m_impl->templBaseClassNames==0)
3751  {
3752  m_impl->templBaseClassNames = new QDict<int>(17);
3753  m_impl->templBaseClassNames->setAutoDelete(TRUE);
3754  }
3755  // make a deep copy of the dictionary.
3756  QDictIterator<int> qdi(*templateNames);
3757  for (;qdi.current();++qdi)
3758  {
3759  if (m_impl->templBaseClassNames->find(qdi.currentKey())==0)
3760  {
3761  m_impl->templBaseClassNames->insert(qdi.currentKey(),new int(*qdi.current()));
3762  }
3763  }
3764 }
3765 
3767 {
3768  return m_impl->templBaseClassNames;
3769 }
3770 
3771 void ClassDef::addMembersToTemplateInstance(ClassDef *cd,const char *templSpec)
3772 {
3773  //printf("%s::addMembersToTemplateInstance(%s,%s)\n",name().data(),cd->name().data(),templSpec);
3774  if (cd->memberNameInfoSDict()==0) return;
3776  MemberNameInfo *mni;
3777  for (;(mni=mnili.current());++mnili)
3778  {
3779  MemberNameInfoIterator mnii(*mni);
3780  MemberInfo *mi;
3781  for (mnii.toFirst();(mi=mnii.current());++mnii)
3782  {
3783  ArgumentList *actualArguments = new ArgumentList;
3784  stringToArgumentList(templSpec,actualArguments);
3785  MemberDef *md = mi->memberDef;
3787  cd->templateArguments(),actualArguments);
3788  delete actualArguments;
3789  //printf("%s->setMemberClass(%p)\n",imd->name().data(),this);
3790  imd->setMemberClass(this);
3791  imd->setTemplateMaster(md);
3792  imd->setDocumentation(md->documentation(),md->docFile(),md->docLine());
3793  imd->setBriefDescription(md->briefDescription(),md->briefFile(),md->briefLine());
3796  imd->setMemberGroupId(md->getMemberGroupId());
3797  insertMember(imd);
3798  //printf("Adding member=%s %s%s to class %s templSpec %s\n",
3799  // imd->typeString(),imd->name().data(),imd->argsString(),
3800  // imd->getClassDef()->name().data(),templSpec);
3801  // insert imd in the list of all members
3802  //printf("Adding member=%s class=%s\n",imd->name().data(),name().data());
3804  if (mn==0)
3805  {
3806  mn = new MemberName(imd->name());
3807  Doxygen::memberNameSDict->append(imd->name(),mn);
3808  }
3809  mn->append(imd);
3810  }
3811  }
3812 }
3813 
3815 {
3816  if (m_impl->templateMaster)
3817  {
3818  return m_impl->templateMaster->getReference();
3819  }
3820  else
3821  {
3822  return Definition::getReference();
3823  }
3824 }
3825 
3827 {
3828  if (m_impl->templateMaster)
3829  {
3830  return m_impl->templateMaster->isReference();
3831  }
3832  else
3833  {
3834  return Definition::isReference();
3835  }
3836 }
3837 
3839 {
3841  if (d)
3842  {
3844  {
3845  ClassDef *cd=(ClassDef *)d;
3846  cd->getTemplateParameterLists(lists);
3847  }
3848  }
3849  if (templateArguments())
3850  {
3851  lists.append(templateArguments());
3852  }
3853 }
3854 
3856  QList<ArgumentList> *actualParams,int *actualParamIndex) const
3857 {
3858  //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
3859  static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
3860  //printf("qualifiedNameWithTemplateParameters() localName=%s\n",localName().data());
3861  QCString scName;
3863  if (d)
3864  {
3866  {
3867  ClassDef *cd=(ClassDef *)d;
3868  scName = cd->qualifiedNameWithTemplateParameters(actualParams,actualParamIndex);
3869  }
3870  else if (!hideScopeNames)
3871  {
3872  scName = d->qualifiedName();
3873  }
3874  }
3875 
3876  SrcLangExt lang = getLanguage();
3877  QCString scopeSeparator = getLanguageSpecificSeparator(lang);
3878  if (!scName.isEmpty()) scName+=scopeSeparator;
3879 
3880  bool isSpecialization = localName().find('<')!=-1;
3881 
3882  QCString clName = className();
3883  //bool isGeneric = getLanguage()==SrcLangExt_CSharp;
3884  //if (isGeneric && clName.right(2)=="-g")
3885  //{
3886  // clName = clName.left(clName.length()-2);
3887  //}
3888  //printf("m_impl->lang=%d clName=%s isSpecialization=%d\n",getLanguage(),clName.data(),isSpecialization);
3889  scName+=clName;
3890  ArgumentList *al=0;
3891  if (templateArguments())
3892  {
3893  if (actualParams && *actualParamIndex<(int)actualParams->count())
3894  {
3895  al = actualParams->at(*actualParamIndex);
3896  if (!isSpecialization)
3897  {
3898  scName+=tempArgListToString(al,lang);
3899  }
3900  (*actualParamIndex)++;
3901  }
3902  else
3903  {
3904  if (!isSpecialization)
3905  {
3906  scName+=tempArgListToString(templateArguments(),lang);
3907  }
3908  }
3909  }
3910  //printf("qualifiedNameWithTemplateParameters: scope=%s qualifiedName=%s\n",name().data(),scName.data());
3911  return scName;
3912 }
3913 
3915 {
3916  if (m_impl->className.isEmpty())
3917  {
3918  return localName();
3919  }
3920  else
3921  {
3922  return m_impl->className;
3923  }
3924 };
3925 
3926 void ClassDef::setClassName(const char *name)
3927 {
3928  m_impl->className = name;
3929 }
3930 
3932 {
3933  SrcLangExt lang = getLanguage();
3934  if (!isLinkableInProject()) return;
3935  //printf("ClassDef(%s)::addListReferences()\n",name().data());
3936  {
3937  QList<ListItemInfo> *xrefItems = xrefListItems();
3938  addRefItem(xrefItems,
3939  qualifiedName(),
3943  displayName(),
3944  0,
3945  this
3946  );
3947  }
3948  if (m_impl->memberGroupSDict)
3949  {
3951  MemberGroup *mg;
3952  for (;(mg=mgli.current());++mgli)
3953  {
3954  mg->addListReferences(this);
3955  }
3956  }
3958  MemberList *ml;
3959  for (mli.toFirst();(ml=mli.current());++mli)
3960  {
3962  {
3963  ml->addListReferences(this);
3964  }
3965  }
3966 }
3967 
3969 {
3970  MemberDef *xmd = 0;
3972  {
3974  if (mni)
3975  {
3976  const int maxInheritanceDepth = 100000;
3977  int mdist=maxInheritanceDepth;
3978  MemberNameInfoIterator mnii(*mni);
3979  MemberInfo *mi;
3980  for (mnii.toFirst();(mi=mnii.current());++mnii)
3981  {
3982  ClassDef *mcd=mi->memberDef->getClassDef();
3983  int m=minClassDistance(this,mcd);
3984  //printf("found member in %s linkable=%d m=%d\n",
3985  // mcd->name().data(),mcd->isLinkable(),m);
3986  if (m<mdist && mcd->isLinkable())
3987  {
3988  mdist=m;
3989  xmd=mi->memberDef;
3990  }
3991  }
3992  }
3993  }
3994  //printf("getMemberByName(%s)=%p\n",name.data(),xmd);
3995  return xmd;
3996 }
3997 
3999 {
4000  return md->getClassDef() && isBaseClass(md->getClassDef(),TRUE);
4001 }
4002 
4004 {
4007  MemberList *ml;
4008  for (mli.toFirst();(ml=mli.current());++mli)
4009  {
4010  if (ml->listType()==lt)
4011  {
4012  return ml;
4013  }
4014  }
4015  // not found, create a new member list
4016  ml = new MemberList(lt);
4017  m_impl->memberLists.append(ml);
4018  return ml;
4019 }
4020 
4022 {
4024  MemberList *ml;
4025  for (;(ml=mli.current());++mli)
4026  {
4027  if (ml->listType()==lt)
4028  {
4029  return ml;
4030  }
4031  }
4032  return 0;
4033 }
4034 
4036 {
4037  static bool sortBriefDocs = Config_getBool("SORT_BRIEF_DOCS");
4038  static bool sortMemberDocs = Config_getBool("SORT_MEMBER_DOCS");
4039  MemberList *ml = createMemberList(lt);
4040  ml->setNeedsSorting((isBrief && sortBriefDocs) || (!isBrief && sortMemberDocs));
4041  ml->append(md);
4042 
4043  // for members in the declaration lists we set the section, needed for member grouping
4044  if ((ml->listType()&MemberListType_detailedLists)==0) md->setSectionList(this,ml);
4045 }
4046 
4048 {
4050  MemberList *ml;
4051  for (;(ml=mli.current());++mli)
4052  {
4053  if (ml->needsSorting()) { ml->sort(); ml->setNeedsSorting(FALSE); }
4054  }
4055  if (m_impl->innerClasses)
4056  {
4057  m_impl->innerClasses->sort();
4058  }
4059 }
4060 
4062  int lt2,bool invert,bool showAlways,QPtrDict<void> *visitedClasses)
4063 {
4064  //printf("%s: countMemberDeclarations for %d and %d\n",name().data(),lt,lt2);
4065  int count=0;
4066  MemberList * ml = getMemberList(lt);
4067  MemberList * ml2 = getMemberList((MemberListType)lt2);
4068  if (getLanguage()!=SrcLangExt_VHDL) // use specific declarations function
4069  {
4070  if (ml)
4071  {
4072  ml->countDecMembers();
4073  count+=ml->numDecMembers();
4074  //printf("-> ml=%d\n",ml->numDecMembers());
4075  }
4076  if (ml2)
4077  {
4078  ml2->countDecMembers();
4079  count+=ml2->numDecMembers();
4080  //printf("-> ml2=%d\n",ml2->numDecMembers());
4081  }
4082  // also include grouped members that have their own section in the class (see bug 722759)
4083  if (inheritedFrom && m_impl->memberGroupSDict)
4084  {
4086  MemberGroup *mg;
4087  for (;(mg=mgli.current());++mgli)
4088  {
4089  count+=mg->countGroupedInheritedMembers(lt);
4090  if (lt2!=1) count+=mg->countGroupedInheritedMembers((MemberListType)lt2);
4091  }
4092  }
4093  static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
4094  if (!inlineInheritedMembers) // show inherited members as separate lists
4095  {
4096  count+=countInheritedDecMembers(lt,inheritedFrom,invert,showAlways,visitedClasses);
4097  }
4098  }
4099  //printf("-> %d\n",count);
4100  return count;
4101 }
4102 
4103 
4105  ClassDef *inheritedFrom,bool invert,bool showAlways,
4106  QPtrDict<void> *visitedClasses)
4107 {
4108  int inhCount = 0;
4109  int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4110  bool process = count>0;
4111  //printf("%s: countInheritedDecMembers: lt=%d process=%d count=%d invert=%d\n",
4112  // name().data(),lt,process,count,invert);
4113  if ((process^invert) || showAlways)
4114  {
4115  if (m_impl->inherits)
4116  {
4118  BaseClassDef *ibcd;
4119  for (it.toFirst();(ibcd=it.current());++it)
4120  {
4121  ClassDef *icd=ibcd->classDef;
4122  int lt1,lt2;
4123  if (icd->isLinkable())
4124  {
4125  convertProtectionLevel(lt,ibcd->prot,&lt1,&lt2);
4126  //printf("%s: convert %d->(%d,%d) prot=%d\n",
4127  // icd->name().data(),lt,lt1,lt2,ibcd->prot);
4128  if (visitedClasses->find(icd)==0)
4129  {
4130  visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance
4131  if (lt1!=-1)
4132  {
4133  inhCount+=icd->countMemberDeclarations((MemberListType)lt1,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4134  }
4135  }
4136  }
4137  }
4138  }
4139  }
4140  return inhCount;
4141 }
4142 
4144  QCString &title,QCString &subtitle)
4145 {
4146  SrcLangExt lang = getLanguage();
4149  LayoutDocEntry *lde;
4150  for (eli.toFirst();(lde=eli.current());++eli)
4151  {
4152  if (lde->kind()==LayoutDocEntry::MemberDecl)
4153  {
4155  if (lmd->type==type)
4156  {
4157  title = lmd->title(lang);
4158  subtitle = lmd->subtitle(lang);
4159  return;
4160  }
4161  }
4162  }
4163  title="";
4164  subtitle="";
4165 }
4166 
4168 {
4169  int totalCount=0;
4172  LayoutDocEntry *lde;
4173  for (eli.toFirst();(lde=eli.current());++eli)
4174  {
4175  if (lde->kind()==LayoutDocEntry::MemberDecl)
4176  {
4178  if (lmd->type!=MemberListType_friends) // friendship is not inherited
4179  {
4180  //MemberList *ml = getMemberList(lmd->type);
4181  //if (ml==0 || ml->numDecMembers()==0)
4182  //{
4183  QPtrDict<void> visited(17);
4184  totalCount+=countInheritedDecMembers(lmd->type,this,TRUE,FALSE,&visited);
4185  //}
4186  }
4187  }
4188  }
4189  //printf("countAdditonalInheritedMembers()=%d\n",totalCount);
4190  return totalCount;
4191 }
4192 
4194 {
4195  //printf("**** writeAdditionalInheritedMembers()\n");
4198  LayoutDocEntry *lde;
4199  for (eli.toFirst();(lde=eli.current());++eli)
4200  {
4201  if (lde->kind()==LayoutDocEntry::MemberDecl)
4202  {
4204  if (lmd->type!=MemberListType_friends)
4205  {
4206  QPtrDict<void> visited(17);
4208  }
4209  }
4210  }
4211 }
4212 
4214  ClassDef *inheritedFrom,bool additional)
4215 {
4216  int count=0;
4217  MemberList *ml = getMemberList(lt);
4218  if (ml)
4219  {
4220  count=ml->countInheritableMembers(inheritedFrom);
4221  }
4222  //printf("%s:countMembersIncludingGrouped: count=%d\n",name().data(),count);
4223  if (m_impl->memberGroupSDict)
4224  {
4226  MemberGroup *mg;
4227  for (;(mg=mgli.current());++mgli)
4228  {
4229  bool hasOwnSection = !mg->allMembersInSameSection() ||
4230  !m_impl->subGrouping; // group is in its own section
4231  if ((additional && hasOwnSection) || (!additional && !hasOwnSection))
4232  {
4233  count+=mg->countGroupedInheritedMembers(lt);
4234  }
4235  }
4236  }
4237  //printf("%s:countMembersIncludingGrouped(lt=%d,%s)=%d\n",
4238  // name().data(),lt,ml?ml->listTypeAsString(ml->listType()).data():"<none>",count);
4239  return count;
4240 }
4241 
4243  MemberListType lt,int lt2,const QCString &title,
4244  ClassDef *inheritedFrom,bool invert,bool showAlways,
4245  QPtrDict<void> *visitedClasses)
4246 {
4247  ol.pushGeneratorState();
4249  int count = countMembersIncludingGrouped(lt,inheritedFrom,FALSE);
4250  bool process = count>0;
4251  //printf("%s: writeInheritedMemberDec: lt=%d process=%d invert=%d always=%d\n",
4252  // name().data(),lt,process,invert,showAlways);
4253  if ((process^invert) || showAlways)
4254  {
4255  if (m_impl->inherits)
4256  {
4258  BaseClassDef *ibcd;
4259  for (it.toFirst();(ibcd=it.current());++it)
4260  {
4261  ClassDef *icd=ibcd->classDef;
4262  if (icd->isLinkable())
4263  {
4264  int lt1,lt3;
4265  convertProtectionLevel(lt,ibcd->prot,&lt1,&lt3);
4266  if (lt2==-1 && lt3!=-1)
4267  {
4268  lt2=lt3;
4269  }
4270  //printf("%s:convert %d->(%d,%d) prot=%d\n",icd->name().data(),lt,lt1,lt2,ibcd->prot);
4271  if (visitedClasses->find(icd)==0)
4272  {
4273  visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance
4274  if (lt1!=-1)
4275  {
4277  title,QCString(),FALSE,inheritedFrom,lt2,FALSE,TRUE,visitedClasses);
4278  }
4279  }
4280  else
4281  {
4282  //printf("%s: class already visited!\n",icd->name().data());
4283  }
4284  }
4285  }
4286  }
4287  }
4288  ol.popGeneratorState();
4289 }
4290 
4292  const char *subTitle,bool showInline,ClassDef *inheritedFrom,int lt2,
4293  bool invert,bool showAlways,QPtrDict<void> *visitedClasses)
4294 {
4295  //printf("%s: ClassDef::writeMemberDeclarations lt=%d lt2=%d\n",name().data(),lt,lt2);
4296  MemberList * ml = getMemberList(lt);
4297  MemberList * ml2 = getMemberList((MemberListType)lt2);
4298  if (getLanguage()==SrcLangExt_VHDL) // use specific declarations function
4299  {
4300  static ClassDef *cdef;
4301  if (cdef!=this)
4302  { // only one inline link
4304  cdef=this;
4305  }
4306  if (ml)
4307  {
4308  VhdlDocGen::writeVhdlDeclarations(ml,ol,0,this,0,0);
4309  }
4310  }
4311  else
4312  {
4313  //printf("%s::writeMemberDeclarations(%s) ml=%p ml2=%p\n",name().data(),title.data(),ml,ml2);
4314  QCString tt = title, st = subTitle;
4315  if (ml)
4316  {
4317  //printf(" writeDeclaration type=%d count=%d\n",lt,ml->numDecMembers());
4318  ml->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
4319  tt.resize(0);
4320  st.resize(0);
4321  }
4322  if (ml2)
4323  {
4324  //printf(" writeDeclaration type=%d count=%d\n",lt2,ml2->numDecMembers());
4325  ml2->writeDeclarations(ol,this,0,0,0,tt,st,FALSE,showInline,inheritedFrom,lt);
4326  }
4327  static bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB");
4328  if (!inlineInheritedMembers) // show inherited members as separate lists
4329  {
4330  QPtrDict<void> visited(17);
4331  writeInheritedMemberDeclarations(ol,lt,lt2,title,
4332  inheritedFrom ? inheritedFrom : this,
4333  invert,showAlways,
4334  visitedClasses==0 ? &visited: visitedClasses);
4335  }
4336  }
4337 }
4338 
4340  ClassDef *inheritedFrom,const QCString &inheritId)
4341 {
4342  //printf("** %s::addGroupedInheritedMembers(%p) inheritId=%s\n",name().data(),m_impl->memberGroupSDict,inheritId.data());
4343  if (m_impl->memberGroupSDict)
4344  {
4346  MemberGroup *mg;
4347  for (;(mg=mgli.current());++mgli)
4348  {
4349  if (!mg->allMembersInSameSection() || !m_impl->subGrouping) // group is in its own section
4350  {
4351  mg->addGroupedInheritedMembers(ol,this,lt,inheritedFrom,inheritId);
4352  }
4353  }
4354  }
4355 }
4356 
4358 {
4359  //printf("%s: ClassDef::writeMemberDocumentation()\n",name().data());
4360  MemberList * ml = getMemberList(lt);
4361  if (ml) ml->writeDocumentation(ol,displayName(),this,title,FALSE,showInline);
4362 }
4363 
4365 {
4366  //printf("%s: ClassDef::writeSimpleMemberDocumentation()\n",name().data());
4367  MemberList * ml = getMemberList(lt);
4368  if (ml) ml->writeSimpleDocumentation(ol,this);
4369 }
4370 
4372  MemberListType lt,bool inGroup,
4373  ClassDef *inheritedFrom,const char *inheritId)
4374 {
4375  //printf("%s: ClassDef::writePlainMemberDeclaration()\n",name().data());
4376  MemberList * ml = getMemberList(lt);
4377  if (ml)
4378  {
4379  ml->setInGroup(inGroup);
4380  ml->writePlainDeclarations(ol,this,0,0,0,inheritedFrom,inheritId);
4381  }
4382 }
4383 
4384 bool ClassDef::isLocal() const
4385 {
4386  return m_impl->isLocal;
4387 }
4388 
4390 {
4391  return m_impl->innerClasses;
4392 }
4393 
4395 {
4396  return m_impl->compType;
4397 }
4398 
4400 {
4401  return m_impl->inherits;
4402 }
4403 
4405 {
4406  return m_impl->inheritedBy;
4407 }
4408 
4410 {
4412 }
4413 
4415 {
4416  return m_impl->prot;
4417 }
4418 
4420 {
4421  return m_impl->tempArgs;
4422 }
4423 
4425 {
4426  return m_impl->nspace;
4427 }
4428 
4430 {
4431  return m_impl->fileDef;
4432 }
4433 
4434 QDict<ClassDef> *ClassDef::getTemplateInstances() const
4435 {
4436  return m_impl->templateInstances;
4437 }
4438 
4440 {
4441  return m_impl->templateMaster;
4442 }
4443 
4445 {
4446  return m_impl->tempArgs!=0;
4447 }
4448 
4450 {
4451  return m_impl->incInfo;
4452 }
4453 
4455 {
4456  return m_impl->usesImplClassDict;
4457 }
4458 
4460 {
4461  return m_impl->usedByImplClassDict;
4462 }
4463 
4465 {
4466  return m_impl->usesIntfClassDict;
4467 }
4468 
4470 {
4471  return m_impl->constraintClassDict;
4472 }
4473 
4475 {
4476  return m_impl->isTemplArg;
4477 }
4478 
4480 {
4482 }
4483 
4484 bool ClassDef::isFinal() const
4485 {
4486  return m_impl->spec&Entry::Final;
4487 }
4488 
4490 {
4491  return m_impl->spec&Entry::Sealed;
4492 }
4493 
4495 {
4496  return m_impl->spec&Entry::Published;
4497 }
4498 
4500 {
4501  return m_impl->spec&Entry::ForwardDecl;
4502 }
4503 
4505 {
4506  return getLanguage()==SrcLangExt_ObjC;
4507 }
4508 
4510 {
4511  return getLanguage()==SrcLangExt_CSharp;
4512 }
4513 
4515 {
4516  return m_impl->categoryOf;
4517 }
4518 
4520 {
4521  return m_impl->memberLists;
4522 }
4523 
4525 {
4526  return m_impl->memberGroupSDict;
4527 }
4528 
4530 {
4531  m_impl->nspace = nd;
4532 }
4533 
4535 {
4536  m_impl->fileDef=fd;
4537 }
4538 
4539 void ClassDef::setSubGrouping(bool enabled)
4540 {
4541  m_impl->subGrouping = enabled;
4542 }
4543 
4545 {
4546  m_impl->prot=p;
4547 }
4548 
4550 {
4551  m_impl->isStatic=b;
4552 }
4553 
4555 {
4556  m_impl->compType = t;
4557 }
4558 
4560 {
4562 }
4563 
4565 {
4566  m_impl->isTemplArg = b;
4567 }
4568 
4570 {
4571  m_impl->categoryOf = cd;
4572 }
4573 
4575 {
4576  m_impl->usedOnly = b;
4577 }
4578 
4580 {
4581  return m_impl->usedOnly;
4582 }
4583 
4585 {
4586  return m_impl->isSimple;
4587 }
4588 
4590 {
4591  return m_impl->arrowOperator;
4592 }
4593 
4595 {
4596  md->setMemberType(t);
4598  MemberList *ml;
4599  for (;(ml=mli.current());++mli)
4600  {
4601  ml->remove(md);
4602  }
4603  insertMember(md);
4604 }
4605 
4607 {
4608  QCString anc;
4610  {
4611  if (m_impl->templateMaster)
4612  {
4613  // point to the template of which this class is an instance
4615  }
4616  else if (isReference())
4617  {
4618  // point to the external location
4619  anc = m_impl->fileName;
4620  }
4621  else
4622  {
4623  // normal locally defined class
4625  }
4626  }
4627  return anc;
4628 }
4629 
4631 {
4632  static bool inlineGroupedClasses = Config_getBool("INLINE_GROUPED_CLASSES");
4633  static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
4634 
4635  Definition *container = getOuterScope();
4636 
4637  bool containerLinkable =
4638  container &&
4639  (
4640  (container==Doxygen::globalScope && getFileDef() && getFileDef()->isLinkableInProject()) || // global class in documented file
4641  container->isLinkableInProject() // class in documented scope
4642  );
4643 
4644  // inline because of INLINE_GROUPED_CLASSES=YES ?
4645  bool b1 = (inlineGroupedClasses && partOfGroups()!=0); // a grouped class
4646  // inline because of INLINE_SIMPLE_STRUCTS=YES ?
4647  bool b2 = (inlineSimpleClasses && m_impl->isSimple && // a simple class
4648  (containerLinkable || // in a documented container
4649  partOfGroups()!=0 // or part of a group
4650  )
4651  );
4652  //printf("%s::isEmbeddedInOuterScope(): inlineGroupedClasses=%d "
4653  // "inlineSimpleClasses=%d partOfGroups()=%p m_impl->isSimple=%d "
4654  // "getOuterScope()=%s b1=%d b2=%d\n",
4655  // name().data(),inlineGroupedClasses,inlineSimpleClasses,
4656  // partOfGroups().pointer(),m_impl->isSimple,getOuterScope()?getOuterScope()->name().data():"<none>",b1,b2);
4657  return b1 || b2; // either reason will do
4658 }
4659 
4661 {
4662  return m_impl->taggedInnerClasses;
4663 }
4664 
4666 {
4667  if (m_impl->taggedInnerClasses==0)
4668  {
4670  }
4672 }
4673 
4675 {
4676  return m_impl->tagLessRef;
4677 }
4678 
4680 {
4681  m_impl->tagLessRef = cd;
4682 }
4683 
4685 {
4687  MemberList *ml;
4688  for (;(ml=mli.current());++mli)
4689  {
4690  ml->remove(md);
4691  }
4692 }
4693 
4695 {
4696  return m_impl->isJavaEnum;
4697 }
4698 
4700 {
4701  return m_impl->isGeneric;
4702 }
4703 
4705 {
4706  m_impl->spec = spec;
4707 }
4708 
4710 {
4711  QCString n = name();
4712  int si = n.find('(');
4713  int ei = n.find(')');
4714  bool b = ei>si && n.mid(si+1,ei-si-1).stripWhiteSpace().isEmpty();
4715  return b;
4716 }
4717 
4719 {
4720  return m_impl->innerClasses;
4721 }
4722 
4724 {
4725  return m_impl->files;
4726 }
4727 
4729 {
4730  return m_impl->typeConstraints;
4731 }
4732 
4734 {
4735  return m_impl->exampleSDict;
4736 }
4737 
4739 {
4740  return m_impl->subGrouping;
4741 }
4742 
4743 void ClassDef::setName(const char *name)
4744 {
4745  m_impl->isAnonymous = QCString(name).find('@')!=-1;
4746  Definition::setName(name);
4747 }
4748 
4750 {
4751  return m_impl->isAnonymous;
4752 }
static QCString name
Definition: declinfo.cpp:673
void endMemberDocumentation(OutputList &ol)
Definition: classdef.cpp:1458
QCString convertToXML(const char *s)
Definition: util.cpp:5717
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
ClassDef * classDef
Definition: classdef.h:520
virtual QCString trExamples()=0
void writeRuler()
Definition: outputlist.h:240
CompoundType compoundType() const
Definition: classdef.cpp:4394
QCString type
Definition: arguments.h:67
bool isMaybeAmbiguous() const
Definition: memberdef.cpp:4422
bool addExample(const char *anchor, const char *name, const char *file)
Definition: classdef.cpp:2500
virtual QCString trGeneratedFromFilesFortran(ClassDef::CompoundType compType, bool single)=0
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
MemberListType listType() const
Definition: memberlist.h:38
void startDotGraph()
Definition: outputlist.h:382
bool resize(uint newlen)
Definition: qcstring.h:225
void addMembersToTemplateInstance(ClassDef *cd, const char *templSpec)
Definition: classdef.cpp:3771
QCString docFile() const
Specifier virt
Definition: membername.h:64
void setMemberType(MemberType t)
Definition: memberdef.cpp:4613
virtual QCString trInheritsList(int numEntries)=0
void append(const MemberDef *md)
Definition: memberlist.cpp:246
bool isOptional() const
Definition: memberdef.cpp:4310
void setAnchors(MemberList *ml)
Definition: util.cpp:2254
void writeInheritanceGraph(OutputList &ol)
Definition: classdef.cpp:1181
FileDef * getFileDef() const
Definition: classdef.cpp:4429
void endFile(OutputList &ol, bool skipNavIndex, bool skipEndContents, const QCString &navPath)
Definition: index.cpp:263
bool isBound() const
Definition: memberdef.cpp:4397
static const uint64 Published
Definition: entry.h:182
void endMemberItem()
Definition: outputlist.h:220
This class represents an function or template argument list.
Definition: arguments.h:82
void endFileWithNavPath(Definition *d, OutputList &ol)
Definition: index.cpp:282
void endGroupHeader(int extraLevels=0)
Definition: outputlist.h:178
void writeDetailedDescription(OutputList &ol, const QCString &pageType, bool exampleFlag, const QCString &title, const QCString &anchor=QCString())
Definition: classdef.cpp:1017
QCString stripWhiteSpace() const
Definition: qcstring.cpp:295
bool isLinkableInProject() const
Definition: classdef.cpp:2707
bool isArtificial() const
ClassDef * getVariableInstance(const char *templSpec)
Definition: classdef.cpp:3726
static QCString scope
Definition: declinfo.cpp:668
void startItemListItem()
Definition: outputlist.h:182
bool isMutable() const
Definition: memberdef.cpp:4220
bool matchArguments2(Definition *srcScope, FileDef *srcFileScope, ArgumentList *srcAl, Definition *dstScope, FileDef *dstFileScope, ArgumentList *dstAl, bool checkCV)
Definition: util.cpp:3647
void combineDeclarationAndDefinition(MemberDef *mdec, MemberDef *mdef)
Definition: memberdef.cpp:4946
void writeInheritedMemberDeclarations(OutputList &ol, MemberListType lt, int lt2, const QCString &title, ClassDef *inheritedFrom, bool invert, bool showAlways, QPtrDict< void > *visitedClasses)
Definition: classdef.cpp:4242
MemberNameInfoSDict * allMemberNameInfoSDict
Definition: classdef.cpp:88
bool isFunctionPtr() const
Definition: memberdef.cpp:4165
BaseClassList * subClasses() const
Definition: classdef.cpp:4404
IncludeInfo * includeInfo() const
Definition: classdef.cpp:4449
virtual QCString getReference() const
bool isLinkable() const
Definition: filedef.h:117
Definition: types.h:29
virtual QCString trCompounds()=0
void inSort(const char *key, const T *d)
Definition: sortdict.h:197
void getTitleForMemberListType(MemberListType type, QCString &title, QCString &subtitle)
Definition: classdef.cpp:4143
void removeMemberFromLists(MemberDef *md)
Definition: classdef.cpp:4684
static QCString trVhdlType(uint64 type, bool sing=true)
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
QCString getReference() const
Definition: memberdef.cpp:1001
void endLabels()
Definition: outputlist.h:471
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
void startFile(OutputList &ol, const char *name, const char *manName, const char *title, HighlightedItem hli, bool additionalIndices, const char *altSidebarName)
Definition: index.cpp:244
bool isFriend() const
Definition: memberdef.cpp:4175
void addUsedByClass(ClassDef *cd, const char *accessName, Protection prot)
Definition: classdef.cpp:3267
void writeSimpleMemberDocumentation(OutputList &ol, MemberListType lt)
Definition: classdef.cpp:4364
QCString convertNameToFile(const char *name, bool allowDots=FALSE) const
void msg(const char *fmt,...)
Definition: message.cpp:107
bool isGeneric
Definition: classdef.cpp:190
NamespaceDef * getNamespaceDef() const
Definition: classdef.cpp:4424
void writeTagFile(FTextStream &)
Definition: classdef.cpp:1560
BaseClassList * inheritedBy
Definition: classdef.cpp:77
MemberGroupSDict * memberGroupSDict
Definition: classdef.cpp:150
uint length() const
Definition: qcstring.h:195
virtual bool isLinkableInProject() const =0
static ClassSDict * hiddenClasses
Definition: doxygen.h:100
bool isExtension() const
Definition: classdef.cpp:4709
void append(const type *d)
Definition: qlist.h:73
bool subGrouping
Definition: classdef.cpp:170
ClassDef * tagLessRef
Definition: classdef.cpp:185
bool isUNOProperty() const
Definition: memberdef.cpp:4387
Definition: types.h:29
bool generateSourceFile() const
Definition: filedef.cpp:1396
bool isAnonymous
Definition: classdef.cpp:192
virtual QCString trInheritedByList(int numEntries)=0
int guessSection(const char *name)
Definition: util.cpp:315
bool isSimple() const
Definition: classdef.cpp:4584
virtual void setName(const char *name)
Definition: definition.cpp:396
const ExampleSDict * exampleList() const
Definition: classdef.cpp:4733
Protection protection() const
Definition: memberdef.cpp:4120
static const uint64 Abstract
Definition: entry.h:151
QList< ListItemInfo > * xrefListItems() const
FileDef * fileDef
Definition: classdef.cpp:85
Definition: types.h:26
static QCString htmlFileExtension
Definition: doxygen.h:130
void writePlainDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
void writeTagFile(FTextStream &)
void writeString(const char *text)
Definition: outputlist.h:119
MemberListType type
Definition: layout.h:96
int countGroupedInheritedMembers(MemberListType lt)
bool generateDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const QCString &docStr, bool indexWords, bool isExample, const char *exampleName=0, bool singleLine=FALSE, bool linkFromIndex=FALSE)
Definition: outputlist.cpp:131
static const uint64 ForwardDecl
Definition: entry.h:136
bool isForwardDeclared() const
Definition: classdef.cpp:4499
QCString inbodyDocumentation() const
void setLanguage(SrcLangExt lang)
type * first()
Definition: qinternallist.h:87
const ClassList * taggedInnerClasses() const
Definition: classdef.cpp:4660
void startIndent()
Definition: outputlist.h:330
int countInheritedDecMembers(MemberListType lt, ClassDef *inheritedFrom, bool invert, bool showAlways, QPtrDict< void > *visitedClasses)
Definition: classdef.cpp:4104
ArgumentList * templateArguments() const
Definition: classdef.cpp:4419
QCString defval
Definition: arguments.h:71
static const uint64 Sealed
Definition: entry.h:157
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
char & at(uint i) const
Definition: qcstring.h:326
virtual QCString trCollaborationDiagram(const char *clName)=0
virtual QCString trEnumName()=0
void startParagraph()
Definition: outputlist.h:115
void writeDetailedDocumentationBody(OutputList &ol)
Definition: classdef.cpp:959
void lineBreak(const char *style=0)
Definition: outputlist.h:302
void writeBriefDescription(OutputList &ol, bool exampleFlag)
Definition: classdef.cpp:936
FileDef * getBodyDef() const
void addGroupedInheritedMembers(OutputList &ol, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
Definition: classdef.cpp:4339
void setArtificial(bool b)
QCString compoundTypeString() const
Definition: classdef.cpp:3499
virtual bool hasDocumentation() const
MemberNameInfoSDict * memberNameInfoSDict() const
Definition: classdef.cpp:4409
void startSubsubsection()
Definition: outputlist.h:290
virtual QCString trClass(bool first_capital, bool singular)=0
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1459
void addIndexItem(const char *s1, const char *s2)
Definition: outputlist.h:338
void writeNavigationPath(OutputList &ol) const
void setTemplateBaseClassNames(QDict< int > *templateNames)
Definition: classdef.cpp:3747
int countInheritanceNodes()
Definition: classdef.cpp:1156
virtual QCString trServiceReference(const char *sName)=0
void writeDocumentation(OutputList &ol, const char *scopeName, Definition *container, const char *title, bool showEnumValues=FALSE, bool showInline=FALSE)
Definition: memberlist.cpp:655
virtual QCString trSingletonGeneratedFromFiles(bool single)=0
void endDescForItem()
Definition: outputlist.h:284
const bool FALSE
Definition: qglobal.h:370
friend class Iterator
Definition: sortdict.h:598
bool isReference() const
Definition: classdef.cpp:3826
void writeTypeConstraints(OutputList &ol, Definition *d, ArgumentList *al)
Definition: util.cpp:7585
static LayoutDocManager & instance()
Definition: layout.cpp:1359
Definition: types.h:26
void writeMemberGroups(OutputList &ol, bool showInline=FALSE)
Definition: classdef.cpp:1408
Protection prot
Definition: membername.h:63
bool isLinkableInProject() const
Definition: memberdef.cpp:1150
void setUsedOnly(bool b)
Definition: classdef.cpp:4574
void setMemberGroupId(int id)
Definition: memberdef.cpp:4740
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
bool isAbstract
Definition: classdef.cpp:153
bool isAbstract() const
Definition: classdef.cpp:4479
bool declVisible(const ClassDef::CompoundType *filter=0) const
Definition: classlist.cpp:65
UsesClassDict * usesImplClassDict
Definition: classdef.cpp:117
void addUsedInterfaceClasses(MemberDef *md, const char *typeStr)
GroupPri_t
Definition: types.h:64
type * at(uint i) const
Definition: qlist.h:94
Protection prot
Definition: classdef.h:530
virtual QCString trMemberList()=0
QDict< ClassDef > * templateInstances
Definition: classdef.cpp:126
bool hasNonReferenceSuperClass()
Definition: classdef.cpp:2620
int countMembersIncludingGrouped(MemberListType lt, ClassDef *inheritedFrom, bool additional)
Definition: classdef.cpp:4213
void startMemberSections()
Definition: outputlist.h:186
MemberType
Definition: types.h:195
QCString left(uint len) const
Definition: qcstring.cpp:213
MemberDef * memberDef
Definition: membername.h:62
static QCString getClassName(const ClassDef *)
Definition: vhdldocgen.cpp:977
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
void writeLabel(const char *l, bool isLast)
Definition: outputlist.h:469
void writeDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool showInline=FALSE)
virtual QCString trEnumValue()=0
ConstraintClassDict * constraintClassDict
Definition: classdef.cpp:121
static bool suppressDocWarnings
Definition: doxygen.h:142
int briefLine() const
void writeTagFile(FTextStream &)
Definition: memberlist.cpp:963
ClassDef * insertTemplateInstance(const QCString &fileName, int startLine, int startColumn, const QCString &templSpec, bool &freshInstance)
Definition: classdef.cpp:3702
virtual bool isReference() const
void writePlainMemberDeclaration(OutputList &ol, MemberListType lt, bool inGroup, ClassDef *inheritedFrom, const char *inheritId)
Definition: classdef.cpp:4371
bool protectionLevelVisible(Protection prot)
Definition: util.cpp:8098
bool addClass(const ClassDef *def)
Definition: groupdef.cpp:149
bool isSignal() const
Definition: memberdef.cpp:4130
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
bool isSlot() const
Definition: memberdef.cpp:4135
QCString displayName(bool includeScope=TRUE) const
Definition: classdef.cpp:312
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
int count() const
Definition: sortdict.h:284
MemberDef * getMemberByName(const QCString &) const
Definition: classdef.cpp:3968
bool isCSharp() const
Definition: classdef.cpp:4509
bool isVariable() const
Definition: memberdef.cpp:4140
void setClassName(const char *name)
Definition: classdef.cpp:3926
void writeDeclarationLink(OutputList &ol, bool &found, const char *header, bool localNames)
Definition: classdef.cpp:1847
ClassDef * classDef
Definition: classdef.h:477
void findSectionsInDocumentation()
Definition: classdef.cpp:758
virtual QCString getOutputFileBase() const =0
int find(const type *d) const
Definition: qlist.h:88
void startMemberList()
Definition: outputlist.h:206
UsesClassDict * usesIntfClassDict
Definition: classdef.cpp:119
bool isInline() const
Definition: memberdef.cpp:4210
GroupList * partOfGroups() const
void append(const char *key, const T *d)
Definition: sortdict.h:135
static constexpr double mg
Definition: Units.h:145
bool subGrouping() const
Definition: classdef.cpp:4738
void mergeCategory(ClassDef *category)
Definition: classdef.cpp:3095
QCString templSpecifiers
Definition: classdef.h:485
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
Definition: types.h:26
tm
Definition: demo.py:21
QCString getReference() const
Definition: classdef.cpp:3814
Represents of a member definition list with configurable title.
Definition: layout.h:105
Definition: types.h:29
bool isBaseClass(ClassDef *bcd, bool followInstances, int level=0)
Definition: classdef.cpp:2777
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
bool isSealed() const
Definition: classdef.cpp:4489
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1440
ClassSDict * getClassSDict()
Definition: classdef.cpp:4389
bool hasDetailedDescription() const
Definition: classdef.cpp:1007
void addInnerCompound(Definition *d)
Definition: classdef.cpp:3637
QCString removeAnonymousScopes(const QCString &s)
Definition: util.cpp:164
virtual QCString trSingletonReference(const char *sName)=0
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
Protection protection() const
Definition: classdef.cpp:4414
QCString getDefFileName() const
ClassList * taggedInnerClasses
Definition: classdef.cpp:184
void writeMemberList(OutputList &ol)
Definition: classdef.cpp:2250
void computeAnchors()
Definition: classdef.cpp:719
QCString copy() const
Definition: qcstring.h:250
bool declVisible() const
Definition: memberlist.cpp:256
ClassDef * getClass(const char *n)
Definition: util.cpp:472
ArgumentList * typeConstraints
Definition: classdef.cpp:94
Represents of a member declaration list with configurable title and subtitle.
Definition: layout.h:89
ArgumentList * tempArgs
Definition: classdef.cpp:91
void writeDocAnchorsToTagFile(FTextStream &)
Definition: definition.cpp:520
void insert(void *k, const type *d)
Definition: qptrdict.h:57
void sortMemberLists()
Definition: classdef.cpp:4047
ClassDef * templateMaster
Definition: classdef.cpp:137
virtual QCString trDataTypes()=0
int getDefColumn() const
Definition: definition.h:191
bool isTemplateArgument() const
Definition: classdef.cpp:4474
void setAutoDelete(bool val)
Definition: sortdict.h:222
void addGroupedInheritedMembers(OutputList &ol, ClassDef *cd, MemberListType lt, ClassDef *inheritedFrom, const QCString &inheritId)
void endDotGraph(const DotClassGraph &g)
Definition: outputlist.h:384
void writeInlineDocumentation(OutputList &ol)
Definition: classdef.cpp:1675
bool isTemplArg
Definition: classdef.cpp:164
virtual QCString trCompoundReference(const char *clName, ClassDef::CompoundType compType, bool isTemplate)=0
static QCString stripFromPath(const QCString &path, QStrList &l)
Definition: util.cpp:274
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
virtual QCString trServiceGeneratedFromFiles(bool single)=0
QCString typeConstraint
Definition: arguments.h:73
void countDocMembers(bool countEnumValues=FALSE)
Definition: memberlist.cpp:208
static NamespaceDef * globalScope
Definition: doxygen.h:128
virtual QCString trClassDiagram(const char *clName)=0
bool isJavaEnum() const
Definition: classdef.cpp:4694
void setName(const char *name)
Definition: classdef.cpp:4743
void popGeneratorState()
Definition: outputlist.cpp:121
QCString ambiguityResolutionScope
Definition: membername.h:67
void endMemberHeader()
Definition: outputlist.h:196
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
virtual DefType definitionType() const =0
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
def process(f, kind)
Definition: search.py:254
def cli(ctx)
Definition: main.py:7
bool isExplicit() const
Definition: memberdef.cpp:4215
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
static const uint64 Final
Definition: entry.h:150
const char * typeString() const
Definition: memberdef.cpp:4035
void endBold()
Definition: outputlist.h:306
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition: util.cpp:8065
Definition: type_traits.h:61
virtual QCString trEnumReference(const char *name)=0
uint count() const
Definition: qlist.h:66
void writeQuickMemberLinks(OutputList &ol, MemberDef *md) const
Definition: classdef.cpp:2175
const ClassSDict * innerClasses() const
Definition: classdef.cpp:4718
void makeImplementationDetail()
Definition: memberdef.cpp:4745
QCString className() const
Definition: classdef.cpp:3914
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor=0, const char *title=0)
Definition: index.h:142
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
QCString className
Definition: classdef.cpp:140
void endParagraph()
Definition: outputlist.h:117
bool isJavaEnum
Definition: classdef.cpp:188
void setClassSpecifier(uint64 spec)
Definition: classdef.cpp:4704
BaseClassList * inherits
Definition: classdef.cpp:73
void insertMember(MemberDef *)
Definition: classdef.cpp:713
const QCString & name() const
Definition: definition.h:114
QList< MemberList > memberLists
Definition: classdef.cpp:147
const double e
QCString getFileBase() const
Definition: classdef.cpp:3591
MemberDef * createTemplateInstanceMember(ArgumentList *formalArgs, ArgumentList *actualArgs)
Definition: memberdef.cpp:3406
int getDefLine() const
Definition: definition.h:188
bool isEnumValue() const
Definition: memberdef.cpp:4150
FileList files
Definition: classdef.cpp:97
void writeSummaryLink(const char *file, const char *anchor, const char *title, bool first)
Definition: outputlist.h:362
void inSort(const type *d)
Definition: qlist.h:71
QCString inbodyFile() const
static void writeInheritanceSpecifier(OutputList &ol, BaseClassDef *bcd)
Definition: classdef.cpp:798
UsesClassDict * usedInterfaceClasses() const
Definition: classdef.cpp:4464
fileName
Definition: dumpTree.py:9
void writeNestedClasses(OutputList &ol, const QCString &title)
Definition: classdef.cpp:1431
void findSectionsInDocumentation()
Definition: memberlist.cpp:818
ClassDef * category() const
Definition: memberdef.cpp:4796
bool allMembersInSameSection() const
Definition: membergroup.h:67
void setTemplateMaster(ClassDef *tm)
Definition: classdef.cpp:4559
bool isRemovable() const
Definition: memberdef.cpp:4260
void setGroupDefForAllMembers(GroupDef *g, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs)
Definition: classdef.cpp:3615
void pushGeneratorState()
Definition: outputlist.cpp:111
void startMemberDeclaration()
Definition: outputlist.h:312
bool isLinkableInProject() const
Definition: filedef.cpp:1877
void setDocumentation(const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
Definition: memberdef.cpp:1126
QCString name() const
Definition: filedef.cpp:1193
QCString getInstanceOutputFileBase() const
Definition: classdef.cpp:3579
virtual QCString getSourceFileBase() const
Definition: definition.cpp:885
void setInbodyDocumentation(const char *d, const char *inbodyFile, int inbodyLine)
Definition: memberdef.cpp:1138
void setMemberClass(ClassDef *cd)
Definition: memberdef.cpp:3392
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
bool hasDocumentation() const
Definition: classdef.cpp:2767
QCString getMemberListFileName() const
Definition: classdef.cpp:307
bool hasBriefDescription() const
bool isTemplate() const
Definition: classdef.cpp:4444
void moveTo(Definition *)
Definition: memberdef.cpp:832
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
int numDocMembers() const
Definition: memberlist.h:52
QCString getSourceFileBase() const
Definition: filedef.cpp:1771
QCString right(uint len) const
Definition: qcstring.cpp:231
static void writeVhdlDeclarations(MemberList *, OutputList &, GroupDef *, ClassDef *, FileDef *, NamespaceDef *)
SrcLangExt getLanguage() const
std::void_t< T > n
void setProtection(Protection p)
Definition: classdef.cpp:4544
void startDescForItem()
Definition: outputlist.h:282
virtual QCString trAuthor(bool first_capital, bool singular)=0
const ArgumentList * typeConstraints() const
Definition: classdef.cpp:4728
const double a
QCString title() const
Definition: classdef.cpp:2076
void setCategoryOf(ClassDef *cd)
Definition: classdef.cpp:4569
void sort()
Definition: qlist.h:85
virtual void addWord(const char *word, bool hiPriority)=0
bool isAnonymous() const
Definition: classdef.cpp:4749
void writeIncludeFiles(OutputList &ol)
Definition: classdef.cpp:1341
ClassDef(const char *fileName, int startLine, int startColumn, const char *name, CompoundType ct, const char *ref=0, const char *fName=0, bool isSymbol=TRUE, bool isJavaEnum=FALSE)
Definition: classdef.cpp:286
QCString anchor() const
Definition: classdef.cpp:4606
Specifier
Definition: types.h:29
bool insertMember(MemberDef *def, bool docOnly=FALSE)
Definition: groupdef.cpp:259
bool inherited
Definition: membername.h:65
type * find(void *k) const
Definition: qptrdict.h:63
virtual QCString trGeneratedAutomatically(const char *s)=0
void addMemberToList(MemberListType lt, MemberDef *md, bool isBrief)
Definition: classdef.cpp:4035
void setTemplateArguments(ArgumentList *al)
Definition: classdef.cpp:2603
void setTemplateMaster(MemberDef *mt)
Definition: memberdef.cpp:4765
void setInGroup(bool b)
static void print(DebugMask mask, int prio, const char *fmt,...)
Definition: debug.cpp:84
virtual QCString trCompoundReferenceFortran(const char *clName, ClassDef::CompoundType compType, bool isTemplate)=0
void stringToArgumentList(const char *argsString, ArgumentList *al, QCString *extraTypeChars)
Definition: defargs.cpp:2922
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
bool isLocal() const
Definition: classdef.cpp:4384
p
Definition: test.py:223
void setTagLessReference(ClassDef *cd)
Definition: classdef.cpp:4679
bool isConstructor() const
Definition: memberdef.cpp:3702
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
virtual QCString trDefinedIn()=0
bool hasExamples() const
Definition: classdef.cpp:2521
void append(const type *d)
Definition: qinternallist.h:61
QCString id() const
Definition: definition.cpp:413
void addMembersToMemberGroup()
Definition: classdef.cpp:388
void setNeedsSorting(bool b)
Definition: memberlist.cpp:902
static bool generatingXmlOutput
Definition: doxygen.h:152
A bunch of utility functions.
QDict< int > * getTemplateBaseClassNames() const
Definition: classdef.cpp:3766
void writeAdditionalInheritedMembers(OutputList &ol)
Definition: classdef.cpp:4193
void writeDocumentation(OutputList &ol)
Definition: classdef.cpp:2120
ConstraintClassDict * templateTypeConstraints() const
Definition: classdef.cpp:4469
const char * data() const
Definition: qcstring.h:207
bool isEmbeddedInOuterScope() const
Definition: classdef.cpp:4630
void addGroupListToTitle(OutputList &ol, Definition *d)
Definition: util.cpp:6528
bool isConstrained() const
Definition: memberdef.cpp:4402
uint64 spec
Definition: classdef.cpp:194
void addToDeclarationSection()
void startMemberDeclarations(OutputList &ol)
Definition: classdef.cpp:1468
bool isLinkable() const
Definition: classdef.cpp:2729
QCString anchor() const
Definition: memberdef.cpp:1031
#define Config_getString(val)
Definition: config.cpp:660
bool isFinal() const
Definition: classdef.cpp:4484
type * current() const
Definition: qlist.h:146
void addListReferences()
Definition: classdef.cpp:3931
void setInGroup(bool inGroup)
Definition: memberlist.h:73
void writeDoc(DocRoot *root, Definition *ctx, MemberDef *md)
Definition: outputlist.cpp:162
void writeSynopsis()
Definition: outputlist.h:340
bool invert(ublas::matrix< T, L, A > &m)
void writeSummaryLinks(OutputList &ol)
Definition: classdef.cpp:1501
QCString includeName
Definition: filedef.h:50
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType, bool single)=0
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define Config_getBool(val)
Definition: config.cpp:664
void setReference(const char *r)
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
ClassSDict * innerClasses
Definition: classdef.cpp:114
static bool isStandardFunc(MemberDef *md)
Definition: classdef.cpp:2832
void setSectionList(Definition *d, MemberList *sl)
Definition: memberdef.cpp:3548
QCString briefFile() const
bool isTrivial() const
Definition: dot.cpp:2988
type * getFirst() const
Definition: qlist.h:95
QCString anchor
Definition: example.h:30
IncludeInfo * incInfo
Definition: classdef.cpp:68
MemberList * createMemberList(MemberListType lt)
Definition: classdef.cpp:4003
bool isObjCMethod() const
Definition: memberdef.cpp:3956
void writeDocumentationContents(OutputList &ol, const QCString &pageTitle)
Definition: classdef.cpp:1954
void writeSimpleDocumentation(OutputList &ol, Definition *container)
Definition: memberlist.cpp:697
QCString generatedFromFiles() const
Definition: classdef.cpp:1053
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
virtual QCString qualifiedName() const
void distributeMemberGroupDocumentation()
Definition: classdef.cpp:745
QCString getSourceFileBase() const
Definition: classdef.cpp:3603
void startBold()
Definition: outputlist.h:304
type * next()
Definition: qinternallist.h:89
void sort()
Definition: sortdict.h:522
void startSimpleSect(SectionTypes t, const char *file, const char *anchor, const char *title)
Definition: outputlist.h:321
void err(const char *fmt,...)
Definition: message.cpp:226
bool visited
Definition: classdef.h:402
QCString name
Definition: example.h:31
SDict< QCString > vhdlSummaryTitles
Definition: classdef.cpp:176
const char * memberName() const
Definition: membername.h:77
bool isReadonly() const
Definition: memberdef.cpp:4392
MemberType memberType() const
Definition: memberdef.cpp:4125
QCString includeStatement() const
Definition: classdef.cpp:1323
virtual QCString trMore()=0
bool isTooBig() const
Definition: dot.cpp:2997
int inbodyLine() const
virtual QCString briefDescription(bool abbreviate=FALSE) const
QCString scopePath
Definition: membername.h:66
QCString qualifiedNameWithTemplateParameters(QList< ArgumentList > *actualParams=0, int *actualParamIndex=0) const
Definition: classdef.cpp:3855
void addUsedClass(ClassDef *cd, const char *accessName, Protection prot)
Definition: classdef.cpp:3233
void setCompoundType(CompoundType t)
Definition: classdef.cpp:4554
void startMemberDoc(const char *clName, const char *memName, const char *anchor, const char *title, bool showInline)
Definition: outputlist.h:261
QCString removeRedundantWhiteSpace(const QCString &s)
Definition: util.cpp:1655
int extractClassNameFromType(const QCString &type, int &pos, QCString &name, QCString &templSpec, SrcLangExt lang)
Definition: util.cpp:5963
void writeDeclaration(OutputList &ol, MemberDef *md, bool inGroup, ClassDef *inheritedFrom, const char *inheritId)
Definition: classdef.cpp:2657
void startGroupHeader(int extraLevels=0)
Definition: outputlist.h:176
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
void endQuickIndices()
Definition: outputlist.h:352
QDict< ClassDef > * variableInstances
Definition: classdef.cpp:132
void writeMemberPages(OutputList &ol)
Definition: classdef.cpp:2152
QCString getOutputFileBase() const
Definition: filedef.h:83
static QCString getClassTitle(const ClassDef *)
Definition: vhdldocgen.cpp:963
void writeExample(OutputList &ol, ExampleSDict *ed)
Definition: util.cpp:2106
int match(const QCString &str, int index=0, int *len=0, bool indexIsStart=TRUE) const
Definition: qregexp.cpp:649
void writeDocumentationPage(OutputList &ol, const char *scopeName, Definition *container)
Definition: memberlist.cpp:715
void endContents()
Definition: outputlist.h:366
ClassDef * categoryOf() const
Definition: classdef.cpp:4514
void setMemberSpecifiers(uint64 s)
Definition: memberdef.cpp:4638
QCString subtitle(SrcLangExt lang) const
Definition: layout.cpp:1452
void endMemberDoc(bool hasArgs)
Definition: outputlist.h:264
int countMemberDeclarations(MemberListType lt, ClassDef *inheritedFrom, int lt2, bool invert, bool showAlways, QPtrDict< void > *visitedClasses)
Definition: classdef.cpp:4061
void insertBaseClass(ClassDef *, const char *name, Protection p, Specifier s, const char *t=0)
Definition: classdef.cpp:358
Protection prot
Definition: classdef.cpp:109
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
MemberGroupSDict * getMemberGroupSDict() const
Definition: classdef.cpp:4524
Specifier virt
Definition: classdef.h:535
bool visibleInParentsDeclList() const
Definition: classdef.cpp:1835
void endItemListItem()
Definition: outputlist.h:184
bool local
Definition: filedef.h:51
MemberListType type
Definition: layout.h:111
int countInheritableMembers(ClassDef *inheritedFrom) const
Definition: memberlist.cpp:92
void setCategory(ClassDef *)
Definition: memberdef.cpp:4801
virtual Definition * getOuterScope() const
QCString fileName
Definition: classdef.cpp:63
void internalInsertMember(MemberDef *md, Protection prot, bool addToAllList)
Definition: classdef.cpp:417
QCString documentation() const
Definition: memberdef.cpp:5085
bool isMaybeVoid() const
Definition: memberdef.cpp:4412
bool isHidden() const
static QCString getProtectionName(int prot)
ExampleSDict * exampleSDict
Definition: classdef.cpp:100
FileDef * fileDef
Definition: filedef.h:49
void init(const char *defFileName, const char *name, const QCString &ctStr, const char *fName)
Definition: classdef.cpp:197
void writeDeclaration(OutputList &ol, const ClassDef::CompoundType *filter=0, const char *header=0, bool localNames=FALSE)
Definition: classlist.cpp:94
void writeCollaborationGraph(OutputList &ol)
Definition: classdef.cpp:1306
void sort()
Definition: sortdict.h:188
ClassDef * tagLessReference() const
Definition: classdef.cpp:4674
UsesClassDict * usedByImplementationClasses() const
Definition: classdef.cpp:4459
void startTitle(OutputList &ol, const char *fileName, Definition *def)
Definition: index.cpp:228
void insertSubClass(ClassDef *, Protection p, Specifier s, const char *t=0)
Definition: classdef.cpp:373
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
static Specifier virt
QCString templSpecifiers
Definition: classdef.h:538
void addClassAttributes(OutputList &ol)
Definition: classdef.cpp:1929
MemberDef * deepCopy() const
Definition: memberdef.cpp:758
SrcLangExt getLanguageFromFileName(const QCString fileName)
Definition: util.cpp:7061
bool isVisibleInHierarchy()
Definition: classdef.cpp:2743
int getStartBodyLine() const
void showUsedFiles(OutputList &ol)
Definition: classdef.cpp:1084
void countDecMembers(bool countEnumValues=FALSE, GroupDef *gd=0)
Definition: memberlist.cpp:136
virtual QCString trEnumGeneratedFromFiles(bool single)=0
void startTypewriter()
Definition: outputlist.h:172
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
QCString tempArgListToString(ArgumentList *al, SrcLangExt lang)
Definition: util.cpp:2197
bool isSubClass(ClassDef *bcd, int level=0)
Definition: classdef.cpp:2807
QDict< ClassDef > * getTemplateInstances() const
Definition: classdef.cpp:4434
void writeSourceDef(OutputList &ol, const char *scopeName)
Definition: definition.cpp:918
virtual QCString trListOfAllMembers()=0
int getMemberGroupId() const
Definition: memberdef.cpp:4532
bool isGeneric() const
Definition: classdef.cpp:4699
void endItemList()
Definition: outputlist.h:139
virtual QCString trAdditionalInheritedMembers()=0
void startTextBlock(bool dense=FALSE)
Definition: outputlist.h:404
void setIsStatic(bool b)
Definition: classdef.cpp:4549
uint toUInt(bool *ok=0) const
Definition: qcstring.cpp:445
QCString getPath() const
Definition: filedef.h:110
static void writeInlineClassLink(const ClassDef *, OutputList &ol)
Definition: vhdldocgen.cpp:996
QCString name
Definition: arguments.h:69
void endMemberDocName()
Definition: outputlist.h:416
void endMemberDeclarations(OutputList &ol)
Definition: classdef.cpp:1474
virtual Kind kind() const =0
virtual QCString trType(bool first_capital, bool singular)=0
void enableAll()
Definition: outputlist.cpp:59
void writeMoreLink(OutputList &ol, const QCString &anchor)
Definition: classdef.cpp:1792
Base class representing a piece of a documentation page.
Definition: layout.h:30
void endClassDiagram(const ClassDiagram &d, const char *f, const char *n)
Definition: outputlist.h:344
CompoundType
Definition: classdef.h:63
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
const int maxInheritanceDepth
Definition: util.cpp:148
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
void startClassDiagram()
Definition: outputlist.h:342
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition: util.cpp:5527
void writeAnchor(const char *fileName, const char *name)
Definition: outputlist.h:242
NamespaceDef * nspace
Definition: classdef.cpp:82
bool isAccessibleMember(MemberDef *md)
Definition: classdef.cpp:3998
void endIndent()
Definition: outputlist.h:332
void endMemberDescription()
Definition: outputlist.h:310
ClassDef * getClassDefOfAnonymousType()
Definition: memberdef.cpp:1236
static bool * b
Definition: config.cpp:1043
bool isPublished() const
Definition: classdef.cpp:4494
bool isMaybeDefault() const
Definition: memberdef.cpp:4417
void addAccessor(const char *s)
Definition: classdef.h:584
void addRefItem(const QList< ListItemInfo > *sli, const char *key, const char *prefix, const char *name, const char *title, const char *args, Definition *scope)
Definition: util.cpp:6456
void writeMemberDocumentation(OutputList &ol, MemberListType lt, const QCString &title, bool showInline=FALSE)
Definition: classdef.cpp:4357
Protection
Definition: types.h:26
static void searchTemplateSpecs(Definition *d, QList< ArgumentList > &result, QCString &name, SrcLangExt lang)
Definition: classdef.cpp:859
Translator * theTranslator
Definition: language.cpp:157
void writeDocumentation(OutputList &ol, Definition *container=0)
Definition: classlist.cpp:119
MemberDef * isSmartPointer() const
Definition: classdef.cpp:4589
bool needsSorting() const
Definition: memberlist.h:53
void setTypeConstraints(ArgumentList *al)
Definition: classdef.cpp:2590
void endSubsubsection()
Definition: outputlist.h:292
void mergeMembers()
Definition: classdef.cpp:2844
void setAnchors()
UsesClassDict * usedByImplClassDict
Definition: classdef.cpp:118
void endSimpleSect()
Definition: outputlist.h:324
static QCString listTypeAsString(MemberListType type)
Definition: memberlist.cpp:907
int countAdditionalInheritedMembers()
Definition: classdef.cpp:4167
void endTextBlock(bool paraBreak=FALSE)
Definition: outputlist.h:406
MemberListType
Definition: types.h:104
void endTitle(OutputList &ol, const char *fileName, const char *name)
Definition: index.cpp:237
virtual QCString trThisIsTheListOfAllMembers()=0
void writeDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, const char *title, const char *subtitle, bool showEnumValues=FALSE, bool showInline=FALSE, ClassDef *inheritedFrom=0, MemberListType lt=MemberListType_pubMethods)
Definition: memberlist.cpp:519
void reclassifyMember(MemberDef *md, MemberType t)
Definition: classdef.cpp:4594
void endMemberSections()
Definition: outputlist.h:188
bool isFunction() const
Definition: memberdef.cpp:4160
ClassDefImpl * m_impl
Definition: classdef.h:451
bool isEmpty() const
Definition: docparser.h:1409
void setIncludeFile(FileDef *fd, const char *incName, bool local, bool force)
Definition: classdef.cpp:820
void convertProtectionLevel(MemberListType inListType, Protection inProt, int *outListType1, int *outListType2)
Definition: util.cpp:8378
void getTemplateParameterLists(QList< ArgumentList > &lists) const
Definition: classdef.cpp:3838
void createSubDirs(QDir &d)
Definition: util.cpp:5458
friend class Iterator
Definition: sortdict.h:289
MemberDef * arrowOperator
Definition: classdef.cpp:182
static void writeTemplateSpec(OutputList &ol, Definition *d, const QCString &type, SrcLangExt lang)
Definition: classdef.cpp:894
void distributeMemberGroupDocumentation()
bool membersMerged
Definition: classdef.cpp:159
bool isUsedOnly() const
Definition: classdef.cpp:4579
void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=0)
Definition: memberdef.cpp:3363
UsesClassDict * usedImplementationClasses() const
Definition: classdef.cpp:4454
QCString includeName() const
Definition: filedef.cpp:1784
ClassDef * ambigClass
Definition: membername.h:68
bool isRelated() const
Definition: memberdef.cpp:4195
void makeTemplateArgument(bool b=TRUE)
Definition: classdef.cpp:4564
int docLine() const
ClassDef * categoryOf
Definition: classdef.cpp:145
void docFindSections(const char *input, Definition *d, MemberGroup *mg, const char *fileName)
Definition: docparser.cpp:7434
const char * argsString() const
Definition: memberdef.cpp:4040
void insertUsedFile(FileDef *)
Definition: classdef.cpp:783
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
QCString lower() const
Definition: qcstring.cpp:263
void startMemberHeader(const char *anchor)
Definition: outputlist.h:194
bool isStatic() const
Definition: memberdef.cpp:4205
void docify(const char *s)
Definition: outputlist.h:145
void startMemberDocumentation(OutputList &ol)
Definition: classdef.cpp:1448
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
void findSectionsInDocumentation()
unsigned long long uint64
Definition: qglobal.h:361
uint count() const
Definition: qinternallist.h:56
const FileList & usedFiles() const
Definition: classdef.cpp:4723
Q_EXPORT int qstrcmp(const char *str1, const char *str2)
Definition: qcstring.h:95
bool isTypedef() const
Definition: memberdef.cpp:4155
T * find(const char *key)
Definition: sortdict.h:232
static bool isSpecialization(const QList< ArgumentList > &srcTempArgLists, const QList< ArgumentList > &dstTempArgLists)
Definition: doxygen.cpp:5605
bool isObjectiveC() const
Definition: classdef.cpp:4504
void writeInlineClasses(OutputList &ol)
Definition: classdef.cpp:1440
virtual QCString documentation() const
bool remove(uint i)
Definition: qlist.h:76
ClassDef * getResolvedClass(Definition *scope, FileDef *fileScope, const char *n, MemberDef **pTypeDef, QCString *pTemplSpec, bool mayBeUnlinkable, bool mayBeHidden, QCString *pResolvedType)
Definition: util.cpp:1563
void writeObjectLink(const char *ref, const char *file, const char *anchor, const char *name)
Definition: outputlist.h:149
void setSubGrouping(bool enabled)
Definition: classdef.cpp:4539
void setNamespace(NamespaceDef *nd)
Definition: classdef.cpp:4529
void startItemList()
Definition: outputlist.h:137
unsigned uint
Definition: qglobal.h:351
void setAutoDelete(bool enable)
Definition: qlist.h:99
bool isLinkable() const
Definition: memberdef.cpp:1161
QAsciiDict< Entry > ns
void addTaggedInnerClass(ClassDef *cd)
Definition: classdef.cpp:4665
void addTypeConstraints()
Definition: classdef.cpp:2564
void endTextLink()
Definition: outputlist.h:161
void addListReferences(Definition *def)
Definition: memberlist.cpp:784
const QList< MemberList > & getMemberLists() const
Definition: classdef.cpp:4519
QDict< int > * templBaseClassNames
Definition: classdef.cpp:134
void setBriefDescription(const char *b, const char *briefFile, int briefLine)
Definition: memberdef.cpp:1132
const QCString & docName() const
Definition: filedef.h:99
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
void setFileDef(FileDef *fd)
Definition: classdef.cpp:4534
QCString stripExtension(const char *fName)
Definition: util.cpp:6799
QCString file
Definition: example.h:32
static QCString * s
Definition: config.cpp:1042
void writeAuthorSection(OutputList &ol)
Definition: classdef.cpp:1488
virtual QCString trIncludingInheritedMembers()=0
QCString localName() const
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
void writeMemberDeclarations(OutputList &ol, MemberListType lt, const QCString &title, const char *subTitle=0, bool showInline=FALSE, ClassDef *inheritedFrom=0, int lt2=-1, bool invert=FALSE, bool showAlways=FALSE, QPtrDict< void > *visitedClasses=0)
Definition: classdef.cpp:4291
static IndexList * indexList
Definition: doxygen.h:149
bool isTransient() const
Definition: memberdef.cpp:4407
void addTypeConstraint(const QCString &typeConstraint, const QCString &type)
Definition: classdef.cpp:2529
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
QCString title(SrcLangExt lang) const
Definition: layout.cpp:1447
QTextStream & endl(QTextStream &s)
bool isAttribute() const
Definition: memberdef.cpp:4382
bool isEnumerate() const
Definition: memberdef.cpp:4145
QCString getVersion() const
Definition: filedef.h:113
int numDecMembers() const
Definition: memberlist.h:51
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
void writePlainDeclarations(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, ClassDef *inheritedFrom, const char *inheritId)
Definition: memberlist.cpp:321
int minClassDistance(const ClassDef *cd, const ClassDef *bcd, int level)
Definition: util.cpp:2527
void startContents()
Definition: outputlist.h:364
bool isDestructor() const
Definition: memberdef.cpp:3743
void startLabels()
Definition: outputlist.h:467
ClassDef::CompoundType compType
Definition: classdef.cpp:103
void addListReferences(Definition *d)
void endTypewriter()
Definition: outputlist.h:174
void writeDocumentationForInnerClasses(OutputList &ol)
Definition: classdef.cpp:2225
void addAccessor(const char *s)
Definition: classdef.h:469
QDict< void > * accessors
Definition: classdef.h:482
type * toFirst()
Definition: qlist.h:135
virtual Definition * findInnerCompound(const char *name)
Definition: classdef.cpp:3651
void setCategoryRelation(MemberDef *)
Definition: memberdef.cpp:4811
void startMemberDocName(bool align)
Definition: outputlist.h:414