memberdef.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #include <stdio.h>
17 #include <qglobal.h>
18 #include <qregexp.h>
19 #include <assert.h>
20 #include "md5.h"
21 #include "memberdef.h"
22 #include "membername.h"
23 #include "doxygen.h"
24 #include "util.h"
25 #include "code.h"
26 #include "message.h"
27 #include "htmlhelp.h"
28 #include "language.h"
29 #include "outputlist.h"
30 #include "example.h"
31 #include "membergroup.h"
32 #include "groupdef.h"
33 #include "defargs.h"
34 #include "docparser.h"
35 #include "dot.h"
36 #include "searchindex.h"
37 #include "parserintf.h"
38 #include "marshal.h"
39 #include "objcache.h"
40 
41 #include "vhdldocgen.h"
42 #include "arguments.h"
43 #include "memberlist.h"
44 #include "namespacedef.h"
45 #include "filedef.h"
46 #include "config.h"
47 
48 //-----------------------------------------------------------------------------
49 
51 
52 //-----------------------------------------------------------------------------
53 
54 static QCString addTemplateNames(const QCString &s,const QCString &n,const QCString &t)
55 {
57  QCString clRealName=n;
58  int p=0,i;
59  if ((i=clRealName.find('<'))!=-1)
60  {
61  clRealName=clRealName.left(i); // strip template specialization
62  }
63  if ((i=clRealName.findRev("::"))!=-1)
64  {
65  clRealName=clRealName.right(clRealName.length()-i-2);
66  }
67  while ((i=s.find(clRealName,p))!=-1)
68  {
69  result+=s.mid(p,i-p);
70  uint j=clRealName.length()+i;
71  if (s.length()==j || (s.at(j)!='<' && !isId(s.at(j))))
72  { // add template names
73  //printf("Adding %s+%s\n",clRealName.data(),t.data());
74  result+=clRealName+t;
75  }
76  else
77  { // template names already present
78  //printf("Adding %s\n",clRealName.data());
79  result+=clRealName;
80  }
81  p=i+clRealName.length();
82  }
83  result+=s.right(s.length()-p);
84  //printf("addTemplateNames(%s,%s,%s)=%s\n",s.data(),n.data(),t.data(),result.data());
85  return result;
86 }
87 
88 // ol.startMemberDocName has already been done before this is called.
89 // when this function returns TRUE, ol.endParameterList will be called.
90 //
91 // typical sequence:
92 // ol.startMemberDoc
93 // ol.startMemberDocName
94 // --- enter writeDefArgumentList
95 // ol.endMemberDocName
96 // ol.startParameterList
97 // ...
98 // ol.startParameterType(first=TRUE)
99 // ol.endParameterType
100 // ol.startParameterName
101 // ol.endParameterName(last==FALSE)
102 // ...
103 // ol.startParameterType(first=FALSE)
104 // ol.endParamtereType
105 // ol.startParameterName
106 // ol.endParameterName(last==TRUE)
107 // ...
108 // --- leave writeDefArgumentList with return value TRUE
109 // ol.endParameterList
110 // ol.endMemberDoc(hasArgs=TRUE)
111 //
112 // For an empty list the function should return FALSE, the sequence is
113 // ol.startMemberDoc
114 // ol.startMemberDocName
115 // --- enter writeDefArgumentList
116 // --- leave writeDefArgumentList with return value FALSE
117 // ol.endMemberDocName
118 // ol.endMemberDoc(hasArgs=FALSE);
119 //
120 
122 {
123  ArgumentList *defArgList=(md->isDocsForDefinition()) ?
124  md->argumentList() : md->declArgumentList();
125  //printf("writeDefArgumentList `%s' isDocsForDefinition()=%d\n",md->name().data(),md->isDocsForDefinition());
126  if (defArgList==0 || md->isProperty())
127  {
128  return FALSE; // member has no function like argument list
129  }
130 
131  // simple argument list for tcl
132  if (md->getLanguage()==SrcLangExt_Tcl)
133  {
134  if (defArgList->count()==0) return FALSE;
135  ArgumentListIterator ali(*defArgList);
136  Argument *a;
137  ol.endMemberDocName();
139  ol.startParameterType(TRUE,0);
140  ol.endParameterType();
142  for (;(a=ali.current());++ali)
143  {
144  if (a->defval.isEmpty())
145  {
146  ol.docify(a->name+" ");
147  }
148  else
149  {
150  ol.docify("?"+a->name+"? ");
151  }
152  }
154  return TRUE;
155  }
156 
157  if (!md->isDefine()) ol.docify(" ");
158 
159  //printf("writeDefArgList(%d)\n",defArgList->count());
160  ol.pushGeneratorState();
161  //ol.disableAllBut(OutputGenerator::Html);
162  bool htmlOn = ol.isEnabled(OutputGenerator::Html);
163  bool latexOn = ol.isEnabled(OutputGenerator::Latex);
164  {
165  // html and latex
166  if (htmlOn) ol.enable(OutputGenerator::Html);
167  if (latexOn) ol.enable(OutputGenerator::Latex);
168 
169  ol.endMemberDocName();
170  ol.startParameterList(!md->isObjCMethod());
171  }
172  ol.enableAll();
175  {
176  // other formats
177  if (!md->isObjCMethod()) ol.docify("("); // start argument list
178  ol.endMemberDocName();
179  }
180  ol.popGeneratorState();
181  //printf("===> name=%s isDefine=%d\n",md->name().data(),md->isDefine());
182 
183  QCString cName;
184  if (scope)
185  {
186  cName=scope->name();
187  int il=cName.find('<');
188  int ir=cName.findRev('>');
189  if (il!=-1 && ir!=-1 && ir>il)
190  {
191  cName=cName.mid(il,ir-il+1);
192  //printf("1. cName=%s\n",cName.data());
193  }
194  else if (scope->definitionType()==Definition::TypeClass && ((ClassDef*)scope)->templateArguments())
195  {
196  cName=tempArgListToString(((ClassDef*)scope)->templateArguments(),scope->getLanguage());
197  //printf("2. cName=%s\n",cName.data());
198  }
199  else // no template specifier
200  {
201  cName.resize(0);
202  }
203  }
204  //printf("~~~ %s cName=%s\n",md->name().data(),cName.data());
205 
206  bool first=TRUE;
207  bool paramTypeStarted=FALSE;
208  bool isDefine = md->isDefine();
209  ArgumentListIterator ali(*defArgList);
210  Argument *a=ali.current();
211  while (a)
212  {
213  if (isDefine || first)
214  {
215  ol.startParameterType(first,0);
216  paramTypeStarted=TRUE;
217  if (isDefine)
218  {
219  ol.endParameterType();
221  }
222  }
223  QRegExp re(")("),res("(.*\\*");
224  int vp=a->type.find(re);
225  int wp=a->type.find(res);
226 
227  // use the following to put the function pointer type before the name
228  bool hasFuncPtrType=FALSE;
229 
230  if (!a->attrib.isEmpty() && !md->isObjCMethod()) // argument has an IDL attribute
231  {
232  ol.docify(a->attrib+" ");
233  }
234  if (hasFuncPtrType) // argument type is a function pointer
235  {
236  //printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
237  QCString n=a->type.left(vp);
238  if (hasFuncPtrType) n=a->type.left(wp);
239  if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
240  if (!cName.isEmpty()) n=addTemplateNames(n,scope->name(),cName);
241  linkifyText(TextGeneratorOLImpl(ol),scope,md->getBodyDef(),md,n);
242  }
243  else // non-function pointer type
244  {
245  QCString n=a->type;
246  if (md->isObjCMethod()) { n.prepend("("); n.append(")"); }
247  if (a->type!="...")
248  {
249  if (!cName.isEmpty()) n=addTemplateNames(n,scope->name(),cName);
250  linkifyText(TextGeneratorOLImpl(ol),scope,md->getBodyDef(),md,n);
251  }
252  }
253  if (!isDefine)
254  {
255  if (paramTypeStarted)
256  {
257  ol.endParameterType();
258  paramTypeStarted=FALSE;
259  }
260  ol.startParameterName(defArgList->count()<2);
261  }
262  if (hasFuncPtrType)
263  {
264  ol.docify(a->type.mid(wp,vp-wp));
265  }
266  if (!a->name.isEmpty() || a->type=="...") // argument has a name
267  {
268  //if (!hasFuncPtrType)
269  //{
270  // ol.docify(" ");
271  //}
274  ol.docify(" "); /* man page */
275  if (htmlOn) ol.enable(OutputGenerator::Html);
277  ol.startEmphasis();
279  if (latexOn) ol.enable(OutputGenerator::Latex);
280  if (a->name.isEmpty()) ol.docify(a->type); else ol.docify(a->name);
283  ol.endEmphasis();
285  if (latexOn) ol.enable(OutputGenerator::Latex);
286  }
287  if (!a->array.isEmpty())
288  {
289  ol.docify(a->array);
290  }
291  if (hasFuncPtrType) // write the part of the argument type
292  // that comes after the name
293  {
295  md,a->type.right(a->type.length()-vp));
296  }
297  if (!a->defval.isEmpty()) // write the default value
298  {
299  QCString n=a->defval;
300  if (!cName.isEmpty()) n=addTemplateNames(n,scope->name(),cName);
301  ol.docify(" = ");
302 
303  ol.startTypewriter();
305  ol.endTypewriter();
306 
307  }
308  ++ali;
309  a=ali.current();
310  if (a)
311  {
312  if (!md->isObjCMethod()) ol.docify(", "); // there are more arguments
313  if (!isDefine)
314  {
315  QCString key;
316  if (md->isObjCMethod() && a->attrib.length()>=2)
317  {
318  //printf("Found parameter keyword %s\n",a->attrib.data());
319  // strip [ and ]
320  key=a->attrib.mid(1,a->attrib.length()-2);
321  if (key!=",") key+=":"; // for normal keywords add colon
322  }
324  if (paramTypeStarted)
325  {
326  ol.endParameterType();
327  }
328  ol.startParameterType(FALSE,key);
329  paramTypeStarted=TRUE;
330  }
331  else // isDefine
332  {
334  }
335  }
336  first=FALSE;
337  }
338  ol.pushGeneratorState();
341  if (!md->isObjCMethod()) ol.docify(")"); // end argument list
342  ol.enableAll();
343  if (htmlOn) ol.enable(OutputGenerator::Html);
344  if (latexOn) ol.enable(OutputGenerator::Latex);
345  if (first) ol.startParameterName(defArgList->count()<2);
346  ol.endParameterName(TRUE,defArgList->count()<2,!md->isObjCMethod());
347  ol.popGeneratorState();
348  if (md->extraTypeChars())
349  {
350  ol.docify(md->extraTypeChars());
351  }
352  if (defArgList->constSpecifier)
353  {
354  ol.docify(" const");
355  }
356  if (defArgList->volatileSpecifier)
357  {
358  ol.docify(" volatile");
359  }
360  if (!defArgList->trailingReturnType.isEmpty())
361  {
362  linkifyText(TextGeneratorOLImpl(ol), // out
363  scope, // scope
364  md->getBodyDef(), // fileScope
365  md, // self
366  defArgList->trailingReturnType, // text
367  FALSE // autoBreak
368  );
369 
370  }
371  return TRUE;
372 }
373 
375  OutputList &ol, ClassDef *cd, MemberDef *md, QCString const& exception)
376 {
377  // this is ordinary exception spec - there must be a '('
378  //printf("exception='%s'\n",exception.data());
379  int index = exception.find('(');
380  if (index!=-1)
381  {
382  ol.exceptionEntry(exception.left(index),false);
383  ++index; // paren in second column so skip it here
384  for (int comma = exception.find(',', index); comma!=-1; )
385  {
386  ++comma; // include comma
388  exception.mid(index,comma-index));
389  ol.exceptionEntry(0,false);
390  index=comma;
391  comma = exception.find(',', index);
392  }
393  int close = exception.find(')', index);
394  if (close!=-1)
395  {
396  QCString type=removeRedundantWhiteSpace(exception.mid(index,close-index));
398  ol.exceptionEntry(0,true);
399  }
400  else
401  {
402  warn(md->getDefFileName(),md->getDefLine(),
403  "missing ) in exception list on member %s",qPrint(md->name()));
404  }
405  }
406  else // Java Exception
407  {
408  ol.docify(" ");
410  }
411 }
412 
414 {
415  QCString exception(QCString(md->excpString()).stripWhiteSpace());
416  if ('{'==exception.at(0))
417  {
418  // this is an UNO IDL attribute - need special handling
419  int index = exception.find(';');
420  int oldIndex = 1;
421  while (-1 != index) // there should be no more than 2 (set / get)
422  {
423  // omit '{' and ';' -> "set raises (...)"
424  writeExceptionListImpl(ol,cd,md,exception.mid(oldIndex,index-oldIndex));
425  oldIndex=index+1;
426  index = exception.find(';',oldIndex);
427  }
428  // the rest is now just '}' - omit that
429  }
430  else
431  {
433  }
434 }
435 
437 {
438  ol.docify("template<");
439  ArgumentListIterator ali(*al);
440  Argument *a = ali.current();
441  while (a)
442  {
443  ol.docify(a->type);
444  ol.docify(" ");
445  ol.docify(a->name);
446  if (a->defval.length()!=0)
447  {
448  ol.docify(" = ");
449  ol.docify(a->defval);
450  }
451  ++ali;
452  a=ali.current();
453  if (a) ol.docify(", ");
454  }
455  ol.docify("> ");
456 }
457 
458 //-----------------------------------------------------------------------------
459 //-----------------------------------------------------------------------------
460 //-----------------------------------------------------------------------------
461 
463 {
464  public:
465  MemberDefImpl();
466  ~MemberDefImpl();
467  void init(Definition *def,const char *t,const char *a,const char *e,
469  MemberType mt,const ArgumentList *tal,
470  const ArgumentList *al
471  );
472 
473  ClassDef *classDef; // member of or related to
474  FileDef *fileDef; // member of file definition
475  NamespaceDef *nspace; // the namespace this member is in.
476 
477  MemberDef *enumScope; // the enclosing scope, if this is an enum field
479  MemberDef *annEnumType; // the anonymous enum that is the type of this member
480  MemberList *enumFields; // enumeration fields
481 
482  MemberDef *redefines; // the members that this member redefines
483  MemberList *redefinedBy; // the list of members that redefine this one
484 
485  MemberDef *memDef; // member definition for this declaration
486  MemberDef *memDec; // member declaration for this definition
487  ClassDef *relatedAlso; // points to class marked by relatedAlso
488 
489  ExampleSDict *exampleSDict; // a dictionary of all examples for quick access
490 
491  QCString type; // return actual type
492  QCString accessorType; // return type that tell how to get to this member
493  ClassDef *accessorClass; // class that this member accesses (for anonymous types)
494  QCString args; // function arguments/variable array specifiers
495  QCString def; // member definition in code (fully qualified name)
496  QCString anc; // HTML anchor name
497  Specifier virt; // normal/virtual/pure virtual
498  Protection prot; // protection type [Public/Protected/Private]
499  QCString decl; // member declaration in class
500 
501  QCString bitfields; // struct member bitfields
502  QCString read; // property read accessor
503  QCString write; // property write accessor
504  QCString exception; // exceptions that can be thrown
505  QCString initializer; // initializer
506  QCString extraTypeChars; // extra type info found after the argument list
507  QCString enumBaseType; // base type of the enum (C++11)
508  int initLines; // number of lines in the initializer
509 
510  uint64 memSpec; // The specifiers present for this member
511  MemberType mtype; // returns the kind of member
512  int maxInitLines; // when the initializer will be displayed
513  int userInitLines; // result of explicit \hideinitializer or \showinitializer
515 
516  ArgumentList *defArgList; // argument list of this member definition
517  ArgumentList *declArgList; // argument list of this member declaration
518 
519  ArgumentList *tArgList; // template argument list of function template
520  ArgumentList *typeConstraints; // type constraints for template parameters
522  QList<ArgumentList> *defTmpArgLists; // lists of template argument lists
523  // (for template functions in nested template classes)
524 
525  ClassDef *cachedAnonymousType; // if the member has an anonymous compound
526  // as its type then this is computed by
527  // getClassDefOfAnonymousType() and
528  // cached here.
530 
531  MemberDef *groupAlias; // Member containing the definition
532  int grpId; // group id
533  MemberGroup *memberGroup; // group's member definition
534  GroupDef *group; // group in which this member is in
535  Grouping::GroupPri_t grouppri; // priority of this definition
536  QCString groupFileName; // file where this grouping was defined
537  int groupStartLine; // line " " " " "
539 
544 
545  // inbody documentation
546  //int inbodyLine;
547  //QCString inbodyFile;
548  //QCString inbodyDocs;
549 
550  // documentation inheritance
552 
553  // to store the output file base from tag files
555 
556  // objective-c
557  bool implOnly; // function found in implementation but not
558  // in the interface
561  bool isDMember;
562  Relationship related; // relationship of this to the class
563  bool stat; // is it a static function?
564  bool proto; // is it a prototype;
565  bool docEnumValues; // is an enum with documented enum values.
566  bool annScope; // member is part of an annoymous scope
567  bool annUsed;
570  bool explExt; // member was explicitly declared external
571  bool tspec; // member is a template specialization
572  bool groupHasDocs; // true if the entry that caused the grouping was documented
573  bool docsForDefinition; // TRUE => documentation block is put before
574  // definition.
575  // FALSE => block is put before declaration.
578 };
579 
581  enumFields(0),
582  redefinedBy(0),
583  exampleSDict(0),
584  defArgList(0),
585  declArgList(0),
586  tArgList(0),
587  typeConstraints(0),
588  defTmpArgLists(0),
590  category(0),
592 {
593 }
594 
596 {
597  delete redefinedBy;
598  delete exampleSDict;
599  delete enumFields;
600  delete defArgList;
601  delete tArgList;
602  delete typeConstraints;
603  delete defTmpArgLists;
604  delete classSectionSDict;
605  delete declArgList;
606 }
607 
609  const char *t,const char *a,const char *e,
611  MemberType mt,const ArgumentList *tal,
612  const ArgumentList *al
613  )
614 {
615  classDef=0;
616  fileDef=0;
617  redefines=0;
618  relatedAlso=0;
619  redefinedBy=0;
620  accessorClass=0;
621  nspace=0;
622  memDef=0;
623  memDec=0;
624  group=0;
625  grpId=-1;
626  exampleSDict=0;
627  enumFields=0;
628  enumScope=0;
630  defTmpArgLists=0;
633  initLines=0;
634  type=t;
635  if (mt==MemberType_Typedef) type.stripPrefix("typedef ");
636  // type.stripPrefix("struct ");
637  // type.stripPrefix("class " );
638  // type.stripPrefix("union " );
640  args=a;
642  if (type.isEmpty()) decl=def->name()+args; else decl=type+" "+def->name()+args;
643 
644  memberGroup=0;
645  virt=v;
646  prot=p;
647  related=r;
648  stat=s;
649  mtype=mt;
650  exception=e;
651  proto=FALSE;
652  annScope=FALSE;
653  memSpec=0;
654  annMemb=0;
655  annUsed=FALSE;
656  annEnumType=0;
657  groupAlias=0;
658  explExt=FALSE;
659  tspec=FALSE;
661  maxInitLines=Config_getInt("MAX_INITIALIZER_LINES");
662  userInitLines=-1;
664  // copy function template arguments (if any)
665  if (tal)
666  {
667  tArgList = tal->deepCopy();
668  }
669  else
670  {
671  tArgList=0;
672  }
673  //printf("new member al=%p\n",al);
674  // copy function definition arguments (if any)
675  if (al)
676  {
677  defArgList = al->deepCopy();
678  }
679  else
680  {
681  defArgList=0;
682  }
683  // convert function declaration arguments (if any)
684  if (!args.isEmpty())
685  {
688  //printf("setDeclArgList %s to %s const=%d\n",args.data(),
689  // argListToString(declArgList).data(),declArgList->constSpecifier);
690  }
691  else
692  {
693  declArgList = 0;
694  }
695  templateMaster = 0;
696  classSectionSDict = 0;
699  cachedTypedefValue = 0;
700  //inbodyLine = -1;
701  implOnly=FALSE;
702  groupMember = 0;
705  docProvider = 0;
706  isDMember = def->getDefFileName().right(2).lower()==".d";
707 }
708 
709 
710 //-----------------------------------------------------------------------------
711 //-----------------------------------------------------------------------------
712 //-----------------------------------------------------------------------------
713 
714 /*! Creates a new member definition.
715  *
716  * \param df File containing the definition of this member.
717  * \param dl Line at which the member definition was found.
718  * \param dc Column at which the member definition was found.
719  * \param t A string representing the type of the member.
720  * \param na A string representing the name of the member.
721  * \param a A string representing the arguments of the member.
722  * \param e A string representing the throw clause of the members.
723  * \param p The protection context of the member, possible values are:
724  * \c Public, \c Protected, \c Private.
725  * \param v The degree of `virtualness' of the member, possible values are:
726  * \c Normal, \c Virtual, \c Pure.
727  * \param s A boolean that is true iff the member is static.
728  * \param r The relationship between the class and the member.
729  * \param mt The kind of member. See #MemberType for a list of
730  * all types.
731  * \param tal The template arguments of this member.
732  * \param al The arguments of this member. This is a structured form of
733  * the string past as argument \a a.
734  */
735 
736 MemberDef::MemberDef(const char *df,int dl,int dc,
737  const char *t,const char *na,const char *a,const char *e,
739  const ArgumentList *tal,const ArgumentList *al
740  ) : Definition(df,dl,dc,removeRedundantWhiteSpace(na)), visited(FALSE)
741 {
742  //printf("MemberDef::MemberDef(%s)\n",na);
743  m_impl = new MemberDefImpl;
744  m_impl->init(this,t,a,e,p,v,s,r,mt,tal,al);
745  m_isLinkableCached = 0;
748 }
749 
751 {
752  m_impl = new MemberDefImpl;
753  m_isLinkableCached = 0;
756 }
757 
759 {
760  //MemberDef *result = new MemberDef(getDefFileName(),getDefLine(),name());
761  MemberDef *result = new MemberDef(*this);
762  // first copy everything by reference
763  *result->m_impl = *m_impl;
764  // clear pointers owned by object
765  result->m_impl->redefinedBy= 0;
766  result->m_impl->exampleSDict=0;
767  result->m_impl->enumFields=0;
768  result->m_impl->defArgList=0;
769  result->m_impl->tArgList=0;
770  result->m_impl->typeConstraints=0;
771  result->m_impl->defTmpArgLists=0;
772  result->m_impl->classSectionSDict=0;
773  result->m_impl->declArgList=0;
774  // replace pointers owned by the object by deep copies
775  if (m_impl->redefinedBy)
776  {
778  MemberDef *md;
779  for (mli.toFirst();(md=mli.current());++mli)
780  {
781  result->insertReimplementedBy(md);
782  }
783  }
784  if (m_impl->exampleSDict)
785  {
787  Example *e;
788  for (it.toFirst();(e=it.current());++it)
789  {
790  result->addExample(e->anchor,e->name,e->file);
791  }
792  }
793  if (m_impl->enumFields)
794  {
796  MemberDef *md;
797  for (mli.toFirst();(md=mli.current());++mli)
798  {
799  result->insertEnumField(md);
800  }
801  }
802  if (m_impl->defArgList)
803  {
804  result->m_impl->defArgList = m_impl->defArgList->deepCopy();
805  }
806  if (m_impl->tArgList)
807  {
808  result->m_impl->tArgList = m_impl->tArgList->deepCopy();
809  }
810  if (m_impl->typeConstraints)
811  {
813  }
816  {
817  result->m_impl->classSectionSDict = new SDict<MemberList>(7);
819  MemberList *ml;
820  for (it.toFirst();(ml=it.current());++it)
821  {
822  result->m_impl->classSectionSDict->append(it.currentKey(),ml);
823  }
824  }
825  if (m_impl->declArgList)
826  {
828  }
829  return result;
830 }
831 
833 {
834  setOuterScope(scope);
836  {
837  m_impl->classDef = (ClassDef*)scope;
838  }
839  else if (scope->definitionType()==Definition::TypeFile)
840  {
841  m_impl->fileDef = (FileDef*)scope;
842  }
843  else if (scope->definitionType()==Definition::TypeNamespace)
844  {
845  m_impl->nspace = (NamespaceDef*)scope;
846  }
847  m_isLinkableCached = 0;
849 }
850 
851 
852 /*! Destroys the member definition. */
854 {
855  delete m_impl;
856  //printf("%p: ~MemberDef()\n",this);
857  m_impl=0;
858 }
859 
861 {
862  m_impl->redefines = md;
863 }
864 
866 {
867  if (m_impl->templateMaster)
868  {
870  }
872  if (m_impl->redefinedBy->findRef(md)==-1)
873  {
874  m_impl->redefinedBy->inSort(md);
875  }
876 }
877 
879 {
880  return m_impl->redefines;
881 }
882 
884 {
885  return m_impl->redefinedBy;
886 }
887 
889 {
890  if (cd && m_impl->redefinedBy)
891  {
893  MemberDef *md;
894  for (mi.toFirst();(md=mi.current());++mi)
895  {
896  ClassDef *mcd = md->getClassDef();
897  if (mcd)
898  {
899  if (cd==mcd || cd->isBaseClass(mcd,TRUE))
900  {
901  return TRUE;
902  }
903  }
904  }
905  }
906  return FALSE;
907 }
908 
910 {
912  m_impl->enumFields->append(md);
913 }
914 
915 bool MemberDef::addExample(const char *anchor,const char *nameStr,
916  const char *file)
917 {
918  //printf("%s::addExample(%s,%s,%s)\n",name().data(),anchor,nameStr,file);
920  if (m_impl->exampleSDict->find(nameStr)==0)
921  {
922  //printf("Add reference to example %s to member %s\n",nameStr,name.data());
923  Example *e=new Example;
924  e->anchor=anchor;
925  e->name=nameStr;
926  e->file=file;
927  m_impl->exampleSDict->inSort(nameStr,e);
928  return TRUE;
929  }
930  return FALSE;
931 }
932 
934 {
935  if (m_impl->exampleSDict==0)
936  return FALSE;
937  else
938  return m_impl->exampleSDict->count()>0;
939 }
940 
942 {
943  static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
944  static bool inlineSimpleClasses = Config_getBool("INLINE_SIMPLE_STRUCTS");
946 
947  //printf("Member: %s: templateMaster=%p group=%p classDef=%p nspace=%p fileDef=%p\n",
948  // name().data(),m_impl->templateMaster,m_impl->group,m_impl->classDef,
949  // m_impl->nspace,m_impl->fileDef);
951  {
953  }
954  else if (m_impl->templateMaster)
955  {
957  }
958  else if (m_impl->group)
959  {
960  baseName=m_impl->group->getOutputFileBase();
961  }
962  else if (m_impl->classDef)
963  {
964  baseName=m_impl->classDef->getOutputFileBase();
965  if (inlineSimpleClasses && m_impl->classDef->isSimple())
966  {
967  return baseName;
968  }
969  }
970  else if (m_impl->nspace && m_impl->nspace->isLinkableInProject())
971  {
972  baseName=m_impl->nspace->getOutputFileBase();
973  }
974  else if (m_impl->fileDef)
975  {
976  baseName=m_impl->fileDef->getOutputFileBase();
977  }
978 
979  if (baseName.isEmpty())
980  {
982  "Internal inconsistency: member %s does not belong to any"
983  " container!",qPrint(name())
984  );
985  return "dummy";
986  }
987  else if (separateMemberPages && isDetailedSectionLinkable())
988  {
989  if (getEnumScope()) // enum value, which is part of enum's documentation
990  {
991  baseName+="_"+getEnumScope()->anchor();
992  }
993  else
994  {
995  baseName+="_"+anchor();
996  }
997  }
998  return baseName;
999 }
1000 
1002 {
1004  if (!ref.isEmpty())
1005  {
1006  return ref;
1007  }
1008  if (m_impl->templateMaster)
1009  {
1010  return m_impl->templateMaster->getReference();
1011  }
1012  else if (m_impl->group)
1013  {
1014  return m_impl->group->getReference();
1015  }
1016  else if (m_impl->classDef)
1017  {
1018  return m_impl->classDef->getReference();
1019  }
1020  else if (m_impl->nspace)
1021  {
1022  return m_impl->nspace->getReference();
1023  }
1024  else if (m_impl->fileDef)
1025  {
1026  return m_impl->fileDef->getReference();
1027  }
1028  return "";
1029 }
1030 
1032 {
1034  if (m_impl->groupAlias) return m_impl->groupAlias->anchor();
1036  if (m_impl->enumScope && m_impl->enumScope!=this) // avoid recursion for C#'s public enum E { E, F }
1037  {
1038  result.prepend(m_impl->enumScope->anchor());
1039  }
1040  if (m_impl->group)
1041  {
1042  if (m_impl->groupMember)
1043  {
1044  result=m_impl->groupMember->anchor();
1045  }
1046  else if (getReference().isEmpty())
1047  {
1048  result.prepend("g");
1049  }
1050  }
1051  return result;
1052 }
1053 
1055 {
1056  static bool extractStatic = Config_getBool("EXTRACT_STATIC");
1057  m_isLinkableCached = 2; // linkable
1058  //printf("MemberDef::isLinkableInProject(name=%s)\n",name().data());
1059  if (isHidden())
1060  {
1061  //printf("is hidden\n");
1062  m_isLinkableCached = 1;
1063  return;
1064  }
1065  if (m_impl->templateMaster)
1066  {
1067  //printf("has template master\n");
1069  return;
1070  }
1071  if (name().isEmpty() || name().at(0)=='@')
1072  {
1073  //printf("name invalid\n");
1074  m_isLinkableCached = 1; // not a valid or a dummy name
1075  return;
1076  }
1077  if (!hasDocumentation() && !isReference())
1078  {
1079  //printf("no docs or reference\n");
1080  m_isLinkableCached = 1; // no documentation
1081  return;
1082  }
1084  {
1085  //printf("group but group not linkable!\n");
1086  m_isLinkableCached = 1; // group but group not linkable
1087  return;
1088  }
1090  {
1091  //printf("in a class but class not linkable!\n");
1092  m_isLinkableCached = 1; // in class but class not linkable
1093  return;
1094  }
1096  && (m_impl->fileDef==0 || !m_impl->fileDef->isLinkableInProject()))
1097  {
1098  //printf("in a namespace but namespace not linkable!\n");
1099  m_isLinkableCached = 1; // in namespace but namespace not linkable
1100  return;
1101  }
1102  if (!m_impl->group && !m_impl->nspace &&
1103  !m_impl->related && !m_impl->classDef &&
1105  {
1106  //printf("in a file but file not linkable!\n");
1107  m_isLinkableCached = 1; // in file (and not in namespace) but file not linkable
1108  return;
1109  }
1111  {
1112  //printf("private and invisible!\n");
1113  m_isLinkableCached = 1; // hidden due to protection
1114  return;
1115  }
1116  if (m_impl->stat && m_impl->classDef==0 && !extractStatic)
1117  {
1118  //printf("static and invisible!\n");
1119  m_isLinkableCached = 1; // hidden due to staticness
1120  return;
1121  }
1122  //printf("linkable!\n");
1123  return; // linkable!
1124 }
1125 
1126 void MemberDef::setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace)
1127 {
1128  Definition::setDocumentation(d,docFile,docLine,stripWhiteSpace);
1129  m_isLinkableCached = 0;
1130 }
1131 
1132 void MemberDef::setBriefDescription(const char *b,const char *briefFile,int briefLine)
1133 {
1134  Definition::setBriefDescription(b,briefFile,briefLine);
1135  m_isLinkableCached = 0;
1136 }
1137 
1139 {
1140  Definition::setInbodyDocumentation(d,inbodyFile,inbodyLine);
1141  m_isLinkableCached = 0;
1142 }
1143 
1145 {
1147  m_isLinkableCached = 0;
1148 }
1149 
1151 {
1152  if (m_isLinkableCached==0)
1153  {
1154  MemberDef *that = (MemberDef*)this;
1155  that->_computeLinkableInProject();
1156  }
1158  return m_isLinkableCached==2;
1159 }
1160 
1162 {
1163  if (m_impl->templateMaster)
1164  {
1165  return m_impl->templateMaster->isLinkable();
1166  }
1167  else
1168  {
1169  return isLinkableInProject() || isReference();
1170  }
1171 }
1172 
1173 
1175 {
1176  if (lists)
1177  {
1180  }
1181 }
1182 
1184  FileDef *fd,GroupDef *gd,bool onlyText)
1185 {
1186  SrcLangExt lang = getLanguage();
1187  static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
1189  QCString n = name();
1190  if (!hideScopeNames)
1191  {
1193  {
1194  n.prepend(m_impl->enumScope->displayName()+sep);
1195  }
1196  if (m_impl->classDef && gd && !isRelated())
1197  {
1198  n.prepend(m_impl->classDef->displayName()+sep);
1199  }
1200  else if (m_impl->nspace && (gd || fd))
1201  {
1202  n.prepend(m_impl->nspace->displayName()+sep);
1203  }
1204  }
1205 
1206  if (isObjCMethod())
1207  {
1208  if (isStatic()) ol.docify("+ "); else ol.docify("- ");
1209  }
1210  if (!onlyText && isLinkable()) // write link
1211  {
1212  if (m_impl->mtype==MemberType_EnumValue && getGroupDef()==0 && // enum value is not grouped
1213  getEnumScope() && getEnumScope()->getGroupDef()) // but its container is
1214  {
1215  GroupDef *enumValGroup = getEnumScope()->getGroupDef();
1216  ol.writeObjectLink(enumValGroup->getReference(),
1217  enumValGroup->getOutputFileBase(),
1218  anchor(),n);
1219  }
1220  else
1221  {
1223  }
1224  }
1225  else // write only text
1226  {
1227  ol.startBold();
1228  ol.docify(n);
1229  ol.endBold();
1230  }
1231 }
1232 
1233 /*! If this member has an anonymous class/struct/union as its type, then
1234  * this method will return the ClassDef that describes this return type.
1235  */
1237 {
1239 
1240  QCString cname;
1241  if (getClassDef()!=0)
1242  {
1243  cname=getClassDef()->name().copy();
1244  }
1245  else if (getNamespaceDef()!=0)
1246  {
1247  cname=getNamespaceDef()->name().copy();
1248  }
1249  QCString ltype(m_impl->type);
1250  // strip `static' keyword from ltype
1251  //if (ltype.left(7)=="static ") ltype=ltype.right(ltype.length()-7);
1252  // strip `friend' keyword from ltype
1253  ltype.stripPrefix("friend ");
1254  static QRegExp r("@[0-9]+");
1255  int l,i=r.match(ltype,0,&l);
1256  //printf("ltype=`%s' i=%d\n",ltype.data(),i);
1257  // search for the last anonymous scope in the member type
1258  ClassDef *annoClassDef=0;
1259  if (i!=-1) // found anonymous scope in type
1260  {
1261  int il=i-1,ir=i+l;
1262  // extract anonymous scope
1263  while (il>=0 && (isId(ltype.at(il)) || ltype.at(il)==':' || ltype.at(il)=='@')) il--;
1264  if (il>0) il++; else if (il<0) il=0;
1265  while (ir<(int)ltype.length() && (isId(ltype.at(ir)) || ltype.at(ir)==':' || ltype.at(ir)=='@')) ir++;
1266 
1267  QCString annName = ltype.mid(il,ir-il);
1268 
1269  // if inside a class or namespace try to prepend the scope name
1270  if (!cname.isEmpty() && annName.left(cname.length()+2)!=cname+"::")
1271  {
1272  QCString ts=stripAnonymousNamespaceScope(cname+"::"+annName);
1273  annoClassDef=getClass(ts);
1274  }
1275  // if not found yet, try without scope name
1276  if (annoClassDef==0)
1277  {
1279  annoClassDef=getClass(ts);
1280  }
1281  }
1282  m_impl->cachedAnonymousType = annoClassDef;
1283  return annoClassDef;
1284 }
1285 
1286 /*! This methods returns TRUE iff the brief section (also known as
1287  * declaration section) is visible in the documentation.
1288  */
1290 {
1291  static bool extractStatic = Config_getBool("EXTRACT_STATIC");
1292  static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
1293  static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
1294  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
1295  static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
1296 
1297  //printf("Member %s grpId=%d docs=%s file=%s args=%s\n",
1298  // name().data(),
1299  // 0,"", //grpId,grpId==-1?"<none>":Doxygen::memberDocDict[grpId]->data(),
1300  // "", //getFileDef()->name().data(),
1301  // argsString());
1302 
1304  //printf("name=%s m_impl->grpId=%d info=%p\n",name().data(),m_impl->grpId,info);
1305  //QCString *pMemGrp = Doxygen::memberDocDict[grpId];
1306  bool hasDocs = hasDocumentation() ||
1307  // part of a documented member group
1308  (m_impl->grpId!=-1 && info && !(info->doc.isEmpty() && info->header.isEmpty()));
1309 
1310  // only include static members with file/namespace scope if
1311  // explicitly enabled in the config file
1312  bool visibleIfStatic = !(getClassDef()==0 &&
1313  isStatic() &&
1314  !extractStatic
1315  );
1316 
1317  // only include members is the are documented or
1318  // HIDE_UNDOC_MEMBERS is NO in the config file
1319  bool visibleIfDocumented = (!hideUndocMembers ||
1320  hasDocs ||
1322  );
1323 
1324  // hide members with no detailed description and brief descriptions
1325  // explicitly disabled.
1326  bool visibleIfEnabled = !(hideUndocMembers &&
1327  documentation().isEmpty() &&
1328  !briefMemberDesc &&
1329  !repeatBrief
1330  );
1331 
1332  // Hide friend (class|struct|union) declarations if HIDE_FRIEND_COMPOUNDS is true
1333  bool visibleIfFriendCompound = !(hideFriendCompounds &&
1334  isFriend() &&
1335  (m_impl->type=="friend class" ||
1336  m_impl->type=="friend struct" ||
1337  m_impl->type=="friend union"
1338  )
1339  );
1340 
1341  // only include members that are non-private unless EXTRACT_PRIVATE is
1342  // set to YES or the member is part of a group
1343  bool visibleIfPrivate = (protectionLevelVisible(protection()) ||
1345  );
1346 
1347  // hide member if it overrides a member in a superclass and has no
1348  // documentation of its own
1349  //bool visibleIfDocVirtual = !reimplements() ||
1350  // !Config_getBool("INHERIT_DOCS") ||
1351  // hasDocs;
1352 
1353  // true if this member is a constructor or destructor
1354  bool cOrDTor = isConstructor() || isDestructor();
1355 
1356  // hide default constructors or destructors (no args) without
1357  // documentation
1358  bool visibleIfNotDefaultCDTor = !(cOrDTor &&
1359  m_impl->defArgList &&
1360  (m_impl->defArgList->isEmpty() ||
1361  m_impl->defArgList->getFirst()->type == "void"
1362  ) &&
1363  !hasDocs
1364  );
1365 
1366 
1367  //printf("visibleIfStatic=%d visibleIfDocumented=%d visibleIfEnabled=%d "
1368  // "visibleIfPrivate=%d visibltIfNotDefaultCDTor=%d "
1369  // "visibleIfFriendCompound=%d !annScope=%d\n",
1370  // visibleIfStatic,visibleIfDocumented,
1371  // visibleIfEnabled,visibleIfPrivate,visibleIfNotDefaultCDTor,
1372  // visibleIfFriendCompound,!m_impl->annScope);
1373 
1374  bool visible = visibleIfStatic && visibleIfDocumented &&
1375  visibleIfEnabled && visibleIfPrivate &&
1376  /*visibleIfDocVirtual &&*/ visibleIfNotDefaultCDTor &&
1377  visibleIfFriendCompound &&
1378  !m_impl->annScope && !isHidden();
1379  //printf("MemberDef::isBriefSectionVisible() %d\n",visible);
1380  return visible;
1381 }
1382 
1384 {
1385  QCString ltype(m_impl->type);
1387  {
1388  ltype.prepend("typedef ");
1389  }
1390  if (isAlias())
1391  {
1392  ltype="using";
1393  }
1394  // strip `friend' keyword from ltype
1395  ltype.stripPrefix("friend ");
1396  if (ltype=="@") // rename type from enum values
1397  {
1398  ltype="";
1399  }
1400  else
1401  {
1402  if (isObjCMethod())
1403  {
1404  ltype.prepend("(");
1405  ltype.append(")");
1406  }
1407  }
1408  return ltype;
1409 }
1410 
1412  ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd,
1413  bool inGroup, ClassDef *inheritedFrom,const char *inheritId)
1414 {
1415  //printf("%s MemberDef::writeDeclaration() inGroup=%d\n",qualifiedName().data(),inGroup);
1416 
1417  // hide enum value, since they appear already as part of the enum, unless they
1418  // are explicitly grouped.
1419  if (!inGroup && m_impl->mtype==MemberType_EnumValue) return;
1420 
1421 
1422  Definition *d=0;
1423  ASSERT (cd!=0 || nd!=0 || fd!=0 || gd!=0); // member should belong to something
1424  if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd;
1425 
1426  //_writeTagData(compoundType);
1428 
1429  QCString cname = d->name();
1430  QCString cdname = d->displayName();
1431  QCString cfname = getOutputFileBase();
1432 
1433  // search for the last anonymous scope in the member type
1434  ClassDef *annoClassDef=getClassDefOfAnonymousType();
1435 
1437 
1438  // start a new member declaration
1439  bool isAnonymous = annoClassDef || m_impl->annMemb || m_impl->annEnumType;
1440  ///printf("startMemberItem for %s\n",name().data());
1441  ol.startMemberItem(anchor(),
1442  isAnonymous ? 1 : m_impl->tArgList ? 3 : 0,
1443  inheritId
1444  );
1445 
1446  // If there is no detailed description we need to write the anchor here.
1447  bool detailsVisible = isDetailedSectionLinkable();
1448  bool writeAnchor = (inGroup || m_impl->group==0) && // only write anchors for member that have no details and are
1449  !detailsVisible && !m_impl->annMemb; // rendered inside the group page or are not grouped at all
1450  if (writeAnchor)
1451  {
1452  QCString doxyArgs=argsString();
1453  QCString doxyName=name();
1454  if (!cname.isEmpty())
1455  {
1456  doxyName.prepend(cdname+getLanguageSpecificSeparator(getLanguage()));
1457  }
1458  ol.startDoxyAnchor(cfname,cname,anchor(),doxyName,doxyArgs);
1459  }
1460 
1461  if (!detailsVisible)
1462  {
1463  ol.pushGeneratorState();
1466  ol.docify("\n");
1467  ol.popGeneratorState();
1468  }
1469 
1470  if (annoClassDef || m_impl->annMemb)
1471  {
1472  int j;
1473  for (j=0;j<s_indentLevel;j++)
1474  {
1475  ol.writeNonBreakableSpace(3);
1476  }
1477  }
1478 
1479  // *** write template lists
1481  {
1482  if (!isAnonymous) ol.startMemberTemplateParams();
1484  if (!isAnonymous) ol.endMemberTemplateParams(anchor(),inheritId);
1485  }
1486 
1487  // *** write type
1488  QCString ltype(m_impl->type);
1489  if (m_impl->mtype==MemberType_Typedef) ltype.prepend("typedef ");
1490  if (isAlias())
1491  {
1492  ltype="using";
1493  }
1494  // strip `friend' keyword from ltype
1495  ltype.stripPrefix("friend ");
1496  static QRegExp r("@[0-9]+");
1497 
1498  bool endAnonScopeNeeded=FALSE;
1499  int l,i=r.match(ltype,0,&l);
1500  if (i!=-1) // member has an anonymous type
1501  {
1502  //printf("annoClassDef=%p annMemb=%p scopeName=`%s' anonymous=`%s'\n",
1503  // annoClassDef,annMemb,cname.data(),ltype.mid(i,l).data());
1504 
1505  if (annoClassDef) // type is an anonymous compound
1506  {
1507  int ir=i+l;
1508  //printf("<<<<<<<<<<<<<<\n");
1510  annoClassDef->writeDeclaration(ol,m_impl->annMemb,inGroup,inheritedFrom,inheritId);
1511  //printf(">>>>>>>>>>>>>> startMemberItem(2)\n");
1512  ol.startMemberItem(anchor(),2,inheritId);
1513  int j;
1514  for (j=0;j< s_indentLevel-1;j++)
1515  {
1516  ol.writeNonBreakableSpace(3);
1517  }
1518  QCString varName=ltype.right(ltype.length()-ir).stripWhiteSpace();
1519  //printf(">>>>>> ltype=`%s' varName=`%s'\n",ltype.data(),varName.data());
1520  ol.docify("}");
1521  if (varName.isEmpty() && (name().isEmpty() || name().at(0)=='@'))
1522  {
1523  ol.docify(";");
1524  }
1525  else if (!varName.isEmpty() && (varName.at(0)=='*' || varName.at(0)=='&'))
1526  {
1527  ol.docify(" ");
1528  ol.docify(varName);
1529  }
1530  endAnonScopeNeeded=TRUE;
1531  }
1532  else
1533  {
1534  if (getAnonymousEnumType()) // type is an anonymous enum
1535  {
1536  linkifyText(TextGeneratorOLImpl(ol), // out
1537  d, // scope
1538  getBodyDef(), // fileScope
1539  this, // self
1540  ltype.left(i), // text
1541  FALSE // autoBreak
1542  );
1543  getAnonymousEnumType()->writeEnumDeclaration(ol,cd,nd,fd,gd);
1544  //ol+=*getAnonymousEnumType()->enumDecl();
1545  linkifyText(TextGeneratorOLImpl(ol),d,m_impl->fileDef,this,ltype.right(ltype.length()-i-l),TRUE);
1546  }
1547  else
1548  {
1549  ltype = ltype.left(i) + " { ... } " + removeAnonymousScopes(ltype.right(ltype.length()-i-l));
1550  linkifyText(TextGeneratorOLImpl(ol), // out
1551  d, // scope
1552  getBodyDef(), // fileScope
1553  this, // self
1554  ltype, // text
1555  FALSE // autoBreak
1556  );
1557  }
1558  }
1559  }
1560  else if (ltype=="@") // rename type from enum values
1561  {
1562  ltype="";
1563  }
1564  else
1565  {
1566  if (isObjCMethod())
1567  {
1568  ltype.prepend("(");
1569  ltype.append(")");
1570  }
1571  linkifyText(TextGeneratorOLImpl(ol), // out
1572  d, // scope
1573  getBodyDef(), // fileScope
1574  this, // self
1575  ltype, // text
1576  FALSE // autoBreak
1577  );
1578  }
1579  bool htmlOn = ol.isEnabled(OutputGenerator::Html);
1580  if (htmlOn && !ltype.isEmpty())
1581  {
1583  }
1584  if (!ltype.isEmpty()) ol.docify(" ");
1585  if (htmlOn)
1586  {
1588  }
1589 
1590  if (m_impl->annMemb)
1591  {
1592  ol.pushGeneratorState();
1594  ol.writeNonBreakableSpace(3);
1595  ol.popGeneratorState();
1596  }
1597  else
1598  {
1600  }
1601 
1602  // *** write name
1603  if (!name().isEmpty() && name().at(0)!='@') // hide anonymous stuff
1604  {
1605  //printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
1606  if (!(name().isEmpty() || name().at(0)=='@') && // name valid
1607  (hasDocumentation() || isReference()) && // has docs
1608  !(m_impl->prot==Private && !Config_getBool("EXTRACT_PRIVATE") && m_impl->mtype!=MemberType_Friend) && // hidden due to protection
1609  !(isStatic() && m_impl->classDef==0 && !Config_getBool("EXTRACT_STATIC")) // hidden due to static-ness
1610  )
1611  {
1612  if (m_impl->annMemb)
1613  {
1614  //printf("anchor=%s ann_anchor=%s\n",anchor(),annMemb->anchor());
1615  m_impl->annMemb->writeLink(ol,
1620  );
1622  setAnonymousUsed();
1623  }
1624  else
1625  {
1626  //printf("writeLink %s->%d\n",name.data(),hasDocumentation());
1627  ClassDef *rcd = cd;
1628  if (isReference() && m_impl->classDef) rcd = m_impl->classDef;
1629  writeLink(ol,rcd,nd,fd,gd);
1630  }
1631  }
1632  else if (isDocumentedFriendClass())
1633  // if the member is an undocumented friend declaration for some class,
1634  // then maybe we can link to the class
1635  {
1636  writeLink(ol,getClass(name()),0,0,0);
1637  }
1638  else
1639  // there is a brief member description and brief member
1640  // descriptions are enabled or there is no detailed description.
1641  {
1642  if (m_impl->annMemb)
1643  {
1645  setAnonymousUsed();
1646  }
1647  ClassDef *rcd = cd;
1648  if (isReference() && m_impl->classDef) rcd = m_impl->classDef;
1649  writeLink(ol,rcd,nd,fd,gd,TRUE);
1650  }
1651  }
1652 
1653  // add to index
1654  if (isEnumerate() && name().at(0)=='@')
1655  {
1656  // don't add to index
1657  }
1658  else // index member
1659  {
1660  //static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
1661  //QCString cfname = getOutputFileBase();
1662  //QCString cfiname = d->getOutputFileBase();
1663  //Doxygen::indexList->addIndexItem(
1664  // cname, // level1
1665  // name(), // level2
1666  // separateMemPages ? cfname : cfiname, // contRef
1667  // cfname, // memRef
1668  // anchor(), // anchor
1669  // this); // memberdef
1671  }
1672 
1673  // *** write arguments
1674  if (argsString() && !isObjCMethod())
1675  {
1676  if (!isDefine() && !isTypedef()) ol.writeString(" ");
1677  linkifyText(TextGeneratorOLImpl(ol), // out
1678  d, // scope
1679  getBodyDef(), // fileScope
1680  this, // self
1681  isDefine() ?
1682  (const char*)substitute(argsString(),",",", ") :
1683  isTypedef() ?
1684  (const char*)substitute(argsString(),")(",") (") :
1685  argsString(), // text
1686  m_impl->annMemb, // autoBreak
1687  TRUE, // external
1688  FALSE, // keepSpaces
1690  );
1691  }
1692  // *** write exceptions
1693  if (excpString())
1694  {
1695  ol.writeString(" ");
1696  ol.docify(excpString());
1697  }
1698 
1699  // *** write bitfields
1700  if (!m_impl->bitfields.isEmpty()) // add bitfields
1701  {
1703  }
1704  else if (hasOneLineInitializer()
1705  //!init.isEmpty() && initLines==0 && // one line initializer
1706  //((maxInitLines>0 && userInitLines==-1) || userInitLines>0) // enabled by default or explicitly
1707  ) // add initializer
1708  {
1709  if (!isDefine())
1710  {
1711  //ol.writeString(" = ");
1712  ol.writeString(" ");
1714  }
1715  else
1716  {
1717  ol.writeNonBreakableSpace(3);
1719  }
1720  }
1721  else if (isAlias()) // using template alias
1722  {
1723  ol.writeString(" = ");
1725  }
1726 
1727 
1728  if ((isObjCMethod() || isObjCProperty()) && isImplementation())
1729  {
1730  ol.startTypewriter();
1731  ol.docify(" [implementation]");
1732  ol.endTypewriter();
1733  }
1734 
1735  bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
1736 
1737  if (isProperty() && (isSettable() || isGettable() ||
1740  {
1741  ol.writeLatexSpacing();
1742  ol.startTypewriter();
1743  ol.docify(" [");
1744  QStrList sl;
1745 
1746  if (isGettable()) sl.append("get");
1747  if (isProtectedGettable()) sl.append("protected get");
1748  if (isSettable()) sl.append("set");
1749  if (isProtectedSettable()) sl.append("protected set");
1750  if (extractPrivate)
1751  {
1752  if (isPrivateGettable()) sl.append("private get");
1753  if (isPrivateSettable()) sl.append("private set");
1754  }
1755  const char *s=sl.first();
1756  while (s)
1757  {
1758  ol.docify(s);
1759  s=sl.next();
1760  if (s) ol.docify(", ");
1761  }
1762  ol.docify("]");
1763  ol.endTypewriter();
1764  }
1765 
1766  if (isEvent() && (isAddable() || isRemovable() || isRaisable()))
1767  {
1768  ol.writeLatexSpacing();
1769  ol.startTypewriter();
1770  ol.docify(" [");
1771  QStrList sl;
1772  if (isAddable()) sl.append("add");
1773  if (isRemovable()) sl.append("remove");
1774  if (isRaisable()) sl.append("raise");
1775  const char *s=sl.first();
1776  while (s)
1777  {
1778  ol.docify(s);
1779  s=sl.next();
1780  if (s) ol.docify(", ");
1781  }
1782  ol.docify("]");
1783  ol.endTypewriter();
1784  }
1785 
1786  if (writeAnchor)
1787  {
1788  ol.endDoxyAnchor(cfname,anchor());
1789  }
1790 
1791  //printf("endMember %s annoClassDef=%p annEnumType=%p\n",
1792  // name().data(),annoClassDef,annEnumType);
1793  ol.endMemberItem();
1794  if (endAnonScopeNeeded)
1795  {
1797  }
1798 
1799  // write brief description
1800  if (!briefDescription().isEmpty() &&
1801  Config_getBool("BRIEF_MEMBER_DESC")
1802  /* && !annMemb */
1803  )
1804  {
1807  TRUE,FALSE,0,TRUE,FALSE);
1808 
1809  if (rootNode && !rootNode->isEmpty())
1810  {
1811  ol.startMemberDescription(anchor(),inheritId);
1812  ol.writeDoc(rootNode,getOuterScope()?getOuterScope():d,this);
1813  if (detailsVisible)
1814  {
1815  static bool separateMemberPages = Config_getBool("SEPARATE_MEMBER_PAGES");
1816  ol.pushGeneratorState();
1818  //ol.endEmphasis();
1819  ol.docify(" ");
1820  if (separateMemberPages ||
1821  (m_impl->group!=0 && gd==0) ||
1822  (m_impl->nspace!=0 && nd==0)
1823  ) // forward link to the page or group or namespace
1824  {
1826  }
1827  else // local link
1828  {
1829  ol.startTextLink(0,anchor());
1830  }
1832  ol.endTextLink();
1833  //ol.startEmphasis();
1834  ol.popGeneratorState();
1835  }
1836  // for RTF we need to add an extra empty paragraph
1837  ol.pushGeneratorState();
1839  ol.startParagraph();
1840  ol.endParagraph();
1841  ol.popGeneratorState();
1842  ol.endMemberDescription();
1843  }
1844  delete rootNode;
1845  }
1846 
1847  ol.endMemberDeclaration(anchor(),inheritId);
1848 
1850 }
1851 
1853 {
1854  static bool extractAll = Config_getBool("EXTRACT_ALL");
1855  static bool alwaysDetailedSec = Config_getBool("ALWAYS_DETAILED_SEC");
1856  static bool repeatBrief = Config_getBool("REPEAT_BRIEF");
1857  static bool briefMemberDesc = Config_getBool("BRIEF_MEMBER_DESC");
1858  static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
1859  static bool extractStatic = Config_getBool("EXTRACT_STATIC");
1860 
1861  // the member has details documentation for any of the following reasons
1862  bool docFilter =
1863  // treat everything as documented
1864  extractAll ||
1865  // has detailed docs
1866  !documentation().isEmpty() ||
1867  // has inbody docs
1869  // is an enum with values that are documented
1871  // is documented enum value
1873  // has brief description that is part of the detailed description
1874  (!briefDescription().isEmpty() && // has brief docs
1875  (alwaysDetailedSec && // they are visible in
1876  (repeatBrief || // detailed section or
1877  !briefMemberDesc // they are explicitly not
1878  ) // shown in brief section
1879  )
1880  ) ||
1881  // has a multi-line initialization block
1882  //(initLines>0 && initLines<maxInitLines) ||
1883  (hasMultiLineInitializer() && !hideUndocMembers) ||
1884  // has one or more documented arguments
1886  // is an attribute or property - need to display that tag
1888  // has user comments
1890  ;
1891 
1892  // this is not a global static or global statics should be extracted
1893  bool staticFilter = getClassDef()!=0 || !isStatic() || extractStatic;
1894 
1895  // only include members that are non-private unless EXTRACT_PRIVATE is
1896  // set to YES or the member is part of a group
1897  bool privateFilter = protectionLevelVisible(protection()) || m_impl->mtype==MemberType_Friend;
1898 
1899  // member is part of an anonymous scope that is the type of
1900  // another member in the list.
1901  //
1902  //bool inAnonymousScope = !briefDescription().isEmpty() && annUsed;
1903 
1904  // hide friend (class|struct|union) member if HIDE_FRIEND_COMPOUNDS
1905  // is true
1906  bool friendCompoundFilter = !(Config_getBool("HIDE_FRIEND_COMPOUNDS") &&
1907  isFriend() &&
1908  (m_impl->type=="friend class" ||
1909  m_impl->type=="friend struct" ||
1910  m_impl->type=="friend union"
1911  )
1912  );
1913 
1914 
1915  bool result = ((docFilter && staticFilter && privateFilter && friendCompoundFilter && !isHidden()));
1916  //printf("%s::isDetailedSectionLinkable: %d\n",name().data(),result);
1917  return result;
1918 }
1919 
1920 bool MemberDef::isDetailedSectionVisible(bool inGroup,bool inFile) const
1921 {
1922  static bool separateMemPages = Config_getBool("SEPARATE_MEMBER_PAGES");
1923  static bool inlineSimpleStructs = Config_getBool("INLINE_SIMPLE_STRUCTS");
1924  static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
1925  bool groupFilter = getGroupDef()==0 || inGroup || separateMemPages;
1926  bool fileFilter = getNamespaceDef()==0 || !getNamespaceDef()->isLinkable() || !inFile;
1927  bool simpleFilter = (hasBriefDescription() || !hideUndocMembers) && inlineSimpleStructs &&
1928  getClassDef()!=0 && getClassDef()->isSimple();
1929 
1930  bool visible = isDetailedSectionLinkable() && groupFilter && fileFilter &&
1931  !isReference();
1932  bool result = visible || simpleFilter;
1933  //printf("%s::isDetailedSectionVisble: %d groupFilter=%d fileFilter=%d\n",
1934  // name().data(),result,groupFilter,fileFilter);
1935  return result;
1936 }
1937 
1938 void MemberDef::getLabels(QStrList &sl,Definition *container) const
1939 {
1940  static bool inlineInfo = Config_getBool("INLINE_INFO");
1941 
1942  Specifier lvirt=virtualness();
1943  if ((!isObjCMethod() || isOptional() || isRequired()) &&
1944  (protection()!=Public || lvirt!=Normal ||
1945  isFriend() || isRelated() ||
1946  (isInline() && inlineInfo) ||
1947  isSignal() || isSlot() ||
1948  isStatic() ||
1949  (m_impl->classDef && m_impl->classDef!=container && container->definitionType()==TypeClass) ||
1950  (m_impl->memSpec & ~Entry::Inline)!=0
1951  )
1952  )
1953  {
1954  // write the member specifier list
1955  //ol.writeLatexSpacing();
1956  //ol.startTypewriter();
1957  //ol.docify(" [");
1958  SrcLangExt lang = getLanguage();
1959  bool optVhdl = lang==SrcLangExt_VHDL;
1960  bool extractPrivate = Config_getBool("EXTRACT_PRIVATE");
1961  if (optVhdl)
1962  {
1964  }
1965  else
1966  {
1967  if (isFriend()) sl.append("friend");
1968  else if (isRelated()) sl.append("related");
1969  else
1970  {
1971  if (Config_getBool("INLINE_INFO") && isInline()) sl.append("inline");
1972  if (isExplicit()) sl.append("explicit");
1973  if (isMutable()) sl.append("mutable");
1974  if (isStatic()) sl.append("static");
1975  if (isGettable()) sl.append("get");
1976  if (isProtectedGettable()) sl.append("protected get");
1977  if (isSettable()) sl.append("set");
1978  if (isProtectedSettable()) sl.append("protected set");
1979  if (extractPrivate)
1980  {
1981  if (isPrivateGettable()) sl.append("private get");
1982  if (isPrivateSettable()) sl.append("private set");
1983  }
1984  if (isAddable()) sl.append("add");
1985  if (!isUNOProperty() && isRemovable()) sl.append("remove");
1986  if (isRaisable()) sl.append("raise");
1987  if (isReadable()) sl.append("read");
1988  if (isWritable()) sl.append("write");
1989  if (isFinal()) sl.append("final");
1990  if (isAbstract()) sl.append("abstract");
1991  if (isOverride()) sl.append("override");
1992  if (isInitonly()) sl.append("initonly");
1993  if (isSealed()) sl.append("sealed");
1994  if (isNew()) sl.append("new");
1995  if (isOptional()) sl.append("optional");
1996  if (isRequired()) sl.append("required");
1997 
1998  if (isNonAtomic()) sl.append("nonatomic");
1999  else if (isObjCProperty()) sl.append("atomic");
2000 
2001  // mutual exclusive Objective 2.0 property attributes
2002  if (isAssign()) sl.append("assign");
2003  else if (isCopy()) sl.append("copy");
2004  else if (isRetain()) sl.append("retain");
2005  else if (isWeak()) sl.append("weak");
2006  else if (isStrong()) sl.append("strong");
2007  else if (isUnretained()) sl.append("unsafe_unretained");
2008 
2009  if (!isObjCMethod())
2010  {
2011  if (protection()==Protected) sl.append("protected");
2012  else if (protection()==Private) sl.append("private");
2013  else if (protection()==Package) sl.append("package");
2014 
2015  if (lvirt==Virtual) sl.append("virtual");
2016  else if (lvirt==Pure) sl.append("pure virtual");
2017  if (isSignal()) sl.append("signal");
2018  if (isSlot()) sl.append("slot");
2019  if (isDefault()) sl.append("default");
2020  if (isDelete()) sl.append("delete");
2021  if (isNoExcept()) sl.append("noexcept");
2022  if (isAttribute()) sl.append("attribute");
2023  if (isUNOProperty()) sl.append("property");
2024  if (isReadonly()) sl.append("readonly");
2025  if (isBound()) sl.append("bound");
2026  if (isUNOProperty() && isRemovable()) sl.append("removable");
2027  if (isConstrained()) sl.append("constrained");
2028  if (isTransient()) sl.append("transient");
2029  if (isMaybeVoid()) sl.append("maybevoid");
2030  if (isMaybeDefault()) sl.append("maybedefault");
2031  if (isMaybeAmbiguous()) sl.append("maybeambiguous");
2032  if (isPublished()) sl.append("published"); // enum
2033  }
2034  if (isObjCProperty() && isImplementation())
2035  {
2036  sl.append("implementation");
2037  }
2038  }
2039  if (m_impl->classDef &&
2040  container->definitionType()==TypeClass &&
2041  m_impl->classDef!=container &&
2042  !isRelated()
2043  )
2044  {
2045  sl.append("inherited");
2046  }
2047  }
2048  }
2049  else if (isObjCMethod() && isImplementation())
2050  {
2051  sl.append("implementation");
2052  }
2053 }
2054 
2056 {
2057  // write call graph
2058  if (m_impl->hasCallGraph
2059  && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
2060  )
2061  {
2062  DotCallGraph callGraph(this,FALSE);
2063  if (callGraph.isTooBig())
2064  {
2065  warn_uncond("Call graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(qualifiedName()));
2066  }
2067  else if (!callGraph.isTrivial())
2068  {
2069  msg("Generating call graph for function %s\n",qPrint(qualifiedName()));
2071  ol.startParagraph();
2072  ol.startCallGraph();
2074  ol.endCallGraph(callGraph);
2075  ol.endParagraph();
2076  ol.enableAll();
2077  }
2078  }
2079 }
2080 
2082 {
2083  if (m_impl->hasCallerGraph
2084  && (isFunction() || isSlot() || isSignal()) && Config_getBool("HAVE_DOT")
2085  )
2086  {
2087  DotCallGraph callerGraph(this, TRUE);
2088  if (callerGraph.isTooBig())
2089  {
2090  warn_uncond("Caller graph for '%s' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.\n",qPrint(qualifiedName()));
2091  }
2092  else if (!callerGraph.isTrivial() && !callerGraph.isTooBig())
2093  {
2094  msg("Generating caller graph for function %s\n",qPrint(qualifiedName()));
2096  ol.startParagraph();
2097  ol.startCallGraph();
2099  ol.endCallGraph(callerGraph);
2100  ol.endParagraph();
2101  ol.enableAll();
2102  }
2103  }
2104 }
2105 
2107 {
2108  MemberDef *bmd=reimplements();
2109  ClassDef *bcd=0;
2110  if (bmd && (bcd=bmd->getClassDef()))
2111  {
2112  // write class that contains a member that is reimplemented by this one
2113  if (bcd->isLinkable())
2114  {
2115  ol.startParagraph();
2116  QCString reimplFromLine;
2117  if (bmd->virtualness()!=Pure && bcd->compoundType()!=ClassDef::Interface)
2118  {
2119  reimplFromLine = theTranslator->trReimplementedFromList(1);
2120  }
2121  else
2122  {
2123  reimplFromLine = theTranslator->trImplementedFromList(1);
2124  }
2125  int markerPos = reimplFromLine.find("@0");
2126  if (markerPos!=-1) // should always pass this.
2127  {
2128  ol.parseText(reimplFromLine.left(markerPos)); //text left from marker
2129  if (bmd->isLinkable()) // replace marker with link
2130  {
2131  //Definition *bd=bmd->group;
2132  //if (bd==0) bd=bcd;
2134  bmd->anchor(),bcd->displayName());
2135 
2136  //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
2137  // bmd->anchor(),bcd->name());
2138  if ( bmd->isLinkableInProject() )
2139  {
2140  writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
2141  }
2142  }
2143  else
2144  {
2146  0,bcd->displayName());
2147  if (bcd->isLinkableInProject()/* && !Config_getBool("PDF_HYPERLINKS")*/ )
2148  {
2149  writePageRef(ol,bcd->getOutputFileBase(),bcd->anchor());
2150  }
2151  }
2152  ol.parseText(reimplFromLine.right(
2153  reimplFromLine.length()-markerPos-2)); // text right from marker
2154 
2155  }
2156  else
2157  {
2158  err("translation error: no marker in trReimplementsFromList()\n");
2159  }
2160  ol.endParagraph();
2161  }
2162  }
2163 }
2164 
2166 {
2167  MemberList *bml=reimplementedBy();
2168  if (bml)
2169  {
2170  MemberListIterator mli(*bml);
2171  MemberDef *bmd=0;
2172  uint count=0;
2173  ClassDef *bcd=0;
2174  for (mli.toFirst();(bmd=mli.current()) && (bcd=bmd->getClassDef());++mli)
2175  {
2176  // count the members that directly inherit from md and for
2177  // which the member and class are visible in the docs.
2178  if ( bmd->isLinkable() && bcd->isLinkable() )
2179  {
2180  count++;
2181  }
2182  }
2183  if (count>0)
2184  {
2185  mli.toFirst();
2186  // write the list of classes that overwrite this member
2187  ol.startParagraph();
2188 
2189  QCString reimplInLine;
2191  {
2192  reimplInLine = theTranslator->trImplementedInList(count);
2193  }
2194  else
2195  {
2196  reimplInLine = theTranslator->trReimplementedInList(count);
2197  }
2198  static QRegExp marker("@[0-9]+");
2199  int index=0,newIndex,matchLen;
2200  // now replace all markers in reimplInLine with links to the classes
2201  while ((newIndex=marker.match(reimplInLine,index,&matchLen))!=-1)
2202  {
2203  ol.parseText(reimplInLine.mid(index,newIndex-index));
2204  bool ok;
2205  uint entryIndex = reimplInLine.mid(newIndex+1,matchLen-1).toUInt(&ok);
2206  //bmd=bml->at(entryIndex);
2207 
2208  count=0;
2209  // find the entryIndex-th documented entry in the inheritance list.
2210  for (mli.toLast();(bmd=mli.current()) && (bcd=bmd->getClassDef());--mli)
2211  {
2212  if ( bmd->isLinkable() && bcd->isLinkable())
2213  {
2214  if (count==entryIndex) break;
2215  count++;
2216  }
2217  }
2218 
2219  if (ok && bcd && bmd) // write link for marker
2220  {
2221  //ol.writeObjectLink(bcd->getReference(),bcd->getOutputFileBase(),
2222  // bmd->anchor(),bcd->name());
2224  bmd->anchor(),bcd->displayName());
2225 
2226  if (bmd->isLinkableInProject() )
2227  {
2228  writePageRef(ol,bmd->getOutputFileBase(),bmd->anchor());
2229  }
2230  }
2231  ++mli;
2232  index=newIndex+matchLen;
2233  }
2234  ol.parseText(reimplInLine.right(reimplInLine.length()-index));
2235  ol.endParagraph();
2236  }
2237  }
2238 }
2239 
2241 {
2242  if (m_impl->classDef) // this should be a member of a class/category
2243  {
2244  //printf("%s: category %s relation %s class=%s categoryOf=%s\n",
2245  // name().data(),
2246  // m_impl->category ? m_impl->category->name().data() : "<none>",
2247  // m_impl->categoryRelation ? m_impl->categoryRelation->name().data() : "<none>",
2248  // m_impl->classDef->name().data(),
2249  // m_impl->classDef->categoryOf() ? m_impl->classDef->categoryOf()->name().data() : "<none>"
2250  // );
2251  QCString text;
2252  QCString ref;
2253  QCString file;
2254  QCString anc;
2255  QCString name;
2256  int i=-1;
2258  {
2259  if (m_impl->category)
2260  {
2261  // this member is in a normal class and implements method categoryRelation from category
2262  // so link to method 'categoryRelation' with 'provided by category 'category' text.
2264  name = m_impl->category->displayName();
2265  }
2266  else if (m_impl->classDef->categoryOf())
2267  {
2268  // this member is part of a category so link to the corresponding class member of the class we extend
2269  // so link to method 'categoryRelation' with 'extends class 'classDef->categoryOf()'
2270  text = theTranslator->trExtendsClass();
2271  name = m_impl->classDef->categoryOf()->displayName();
2272  }
2273  i=text.find("@0");
2274  if (i!=-1)
2275  {
2277  ref = md->getReference();
2278  file = md->getOutputFileBase();
2279  anc = md->anchor();
2280  }
2281  }
2282  if (i!=-1 && !name.isEmpty())
2283  {
2284  ol.startParagraph();
2285  ol.parseText(text.left(i));
2286  ol.writeObjectLink(ref,file,anc,name);
2287  ol.parseText(text.mid(i+2));
2288  ol.endParagraph();
2289  }
2290  }
2291 }
2292 
2294 {
2295  // write the list of examples that use this member
2296  if (hasExamples())
2297  {
2299  ol.startDescForItem();
2301  ol.endDescForItem();
2302  ol.endSimpleSect();
2303  }
2304 }
2305 
2307 {
2308  if (m_impl->typeConstraints)
2309  {
2311  }
2312 }
2313 
2315  const QCString &cfname,const QCString &ciname,
2316  const QCString &cname)
2317 {
2318  // For enum, we also write the documented enum values
2319  if (isEnumerate())
2320  {
2321  bool first=TRUE;
2322  MemberList *fmdl=enumFieldList();
2323  //printf("** %s: enum values=%d\n",name().data(),fmdl!=0 ? fmdl->count() : 0);
2324  if (fmdl)
2325  {
2326  MemberListIterator it(*fmdl);
2327  MemberDef *fmd;
2328  for (;(fmd=it.current());++it)
2329  {
2330  //printf("Enum %p: isLinkable()=%d\n",fmd,fmd->isLinkable());
2331  if (fmd->isLinkable())
2332  {
2333  if (first)
2334  {
2335  //ol.startSimpleSect(BaseOutputDocInterface::EnumValues,0,0,theTranslator->trEnumerationValues()+": ");
2336  //ol.startDescForItem();
2338  }
2339 
2340  ol.addIndexItem(fmd->name(),ciname);
2341  ol.addIndexItem(ciname,fmd->name());
2342 
2343  //Doxygen::indexList->addIndexItem(
2344  // ciname, // level1
2345  // fmd->name(), // level2
2346  // separateMemPages ? cfname : cfiname, // contRef
2347  // cfname, // memRef
2348  // fmd->anchor(), // anchor
2349  // fmd); // memberdef
2350  Doxygen::indexList->addIndexItem(container,fmd);
2351 
2352  //ol.writeListItem();
2353  ol.startDescTableTitle();
2354  ol.startDoxyAnchor(cfname,cname,fmd->anchor(),fmd->name(),fmd->argsString());
2355  first=FALSE;
2356  //ol.startEmphasis();
2357  ol.docify(fmd->name());
2358  //ol.endEmphasis();
2360  ol.writeString(" ");
2361  ol.enableAll();
2362  ol.endDoxyAnchor(cfname,fmd->anchor());
2363  ol.endDescTableTitle();
2364  //ol.newParagraph();
2365  ol.startDescTableData();
2366 
2367  bool hasBrief = !fmd->briefDescription().isEmpty();
2368  bool hasDetails = !fmd->documentation().isEmpty();
2369 
2370  if (hasBrief)
2371  {
2372  ol.generateDoc(fmd->briefFile(),fmd->briefLine(),
2373  getOuterScope()?getOuterScope():container,
2374  fmd,fmd->briefDescription(),TRUE,FALSE);
2375  }
2376  // FIXME:PARA
2377  //if (!fmd->briefDescription().isEmpty() &&
2378  // !fmd->documentation().isEmpty())
2379  //{
2380  // ol.newParagraph();
2381  //}
2382  if (hasDetails)
2383  {
2384  ol.generateDoc(fmd->docFile(),fmd->docLine(),
2385  getOuterScope()?getOuterScope():container,
2386  fmd,fmd->documentation()+"\n",TRUE,FALSE);
2387  }
2388  ol.endDescTableData();
2389  }
2390  }
2391  }
2392  if (!first)
2393  {
2394  //ol.endItemList();
2395  ol.endDescTable();
2396  //ol.endDescForItem();
2397  //ol.endSimpleSect();
2398  //ol.writeChar('\n');
2399  }
2400  }
2401 }
2402 
2404 {
2405  QCString ldef = definition();
2406  QCString title = name();
2407  if (isEnumerate())
2408  {
2409  if (title.at(0)=='@')
2410  {
2411  ldef = title = "anonymous enum";
2412  if (!m_impl->enumBaseType.isEmpty())
2413  {
2414  ldef+=" : "+m_impl->enumBaseType;
2415  }
2416  }
2417  else
2418  {
2419  ldef.prepend("enum ");
2420  }
2421  }
2422  else if (isEnumValue())
2423  {
2424  if (ldef.at(0)=='@')
2425  {
2426  ldef=ldef.mid(2);
2427  }
2428  }
2429  static QRegExp r("@[0-9]+");
2430  int l,i=r.match(ldef,0,&l);
2431  if (i!=-1) // replace anonymous parts with { ... }
2432  {
2433  int si=ldef.find(' '),pi,ei=i+l;
2434  if (si==-1) si=0;
2435  while ((pi=r.match(ldef,i+l,&l))!=-1)
2436  {
2437  i=pi;
2438  ei=i+l;
2439  }
2440  int ni=ldef.find("::",si);
2441  if (ni>=ei) ei=ni+2;
2442  ldef = ldef.left(si) + " { ... } " + ldef.right(ldef.length()-ei);
2443  }
2444  ClassDef *cd=getClassDef();
2445  if (cd && cd->isObjectiveC())
2446  {
2447  // strip scope name
2448  int ep = ldef.find("::");
2449  if (ep!=-1)
2450  {
2451  int sp=ldef.findRev(' ',ep);
2452  if (sp!=-1)
2453  {
2454  ldef=ldef.left(sp+1)+ldef.mid(ep+2);
2455  }
2456  }
2457  // strip keywords
2458  int dp = ldef.find(':');
2459  if (dp!=-1)
2460  {
2461  ldef=ldef.left(dp+1);
2462  }
2463  l=ldef.length();
2464  //printf("start >%s<\n",ldef.data());
2465  i=l-1;
2466  while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
2467  while (i>=0 && isspace((uchar)ldef.at(i))) i--;
2468  if (i>0)
2469  {
2470  // insert braches around the type
2471  QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
2472  ldef=tmp;
2473  }
2474  //printf("end >%s< i=%d\n",ldef.data(),i);
2475  if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
2476  }
2477  SrcLangExt lang = getLanguage();
2479  return substitute(ldef,"::",sep);
2480 }
2481 
2483 {
2484  // only write out the include file if this is not part of a class or file
2485  // definition
2486  static bool showGroupedMembInc = Config_getBool("SHOW_GROUPED_MEMB_INC");
2487  FileDef *fd = getFileDef();
2488  QCString nm;
2489  if (fd) nm = getFileDef()->docName();
2490  if (inGroup && fd && showGroupedMembInc && !nm.isEmpty())
2491  {
2492  ol.startParagraph();
2493  ol.startTypewriter();
2494  SrcLangExt lang = getLanguage();
2495  bool isIDLorJava = lang==SrcLangExt_IDL || lang==SrcLangExt_Java;
2496  if (isIDLorJava)
2497  {
2498  ol.docify("import ");
2499  }
2500  else
2501  {
2502  ol.docify("#include ");
2503  }
2504 
2505  if (isIDLorJava) ol.docify("\""); else ol.docify("<");
2506 
2507  if (fd->isLinkable())
2508  {
2509  ol.writeObjectLink(fd->getReference(),fd->getOutputFileBase(),fd->anchor(),nm);
2510  }
2511  else
2512  {
2513  ol.docify(nm);
2514  }
2515 
2516  if (isIDLorJava) ol.docify("\""); else ol.docify(">");
2517 
2518  ol.endTypewriter();
2519  ol.endParagraph();
2520  }
2521 }
2522 
2523 /*! Writes the "detailed documentation" section of this member to
2524  * all active output formats.
2525  */
2527  const char *scName,
2528  Definition *container,
2529  bool inGroup,
2530  bool showEnumValues,
2531  bool showInline
2532  )
2533 {
2534  // if this member is in a group find the real scope name.
2535  bool hasParameterList = FALSE;
2536  bool inFile = container->definitionType()==Definition::TypeFile;
2537  bool hasDocs = isDetailedSectionVisible(inGroup,inFile);
2538 
2539  //printf("MemberDef::writeDocumentation(): name=`%s' hasDocs=`%d' containerType=%d inGroup=%d sectionLinkable=%d\n",
2540  // name().data(),hasDocs,container->definitionType(),inGroup,isDetailedSectionLinkable());
2541 
2542  if ( !hasDocs ) return;
2543  if (isEnumValue() && !showEnumValues) return;
2544 
2545  SrcLangExt lang = getLanguage();
2546  //printf("member=%s lang=%d\n",name().data(),lang);
2547  bool optVhdl = lang==SrcLangExt_VHDL;
2549 
2550  QCString scopeName = scName;
2551  QCString memAnchor = anchor();
2552  QCString ciname = container->name();
2553  if (container->definitionType()==TypeGroup)
2554  {
2555  if (getClassDef()) scopeName=getClassDef()->displayName();
2556  else if (getNamespaceDef()) scopeName=getNamespaceDef()->displayName();
2557  else if (getFileDef()) scopeName=getFileDef()->displayName();
2558  ciname = ((GroupDef *)container)->groupTitle();
2559  }
2560  else if (container->definitionType()==TypeFile && getNamespaceDef())
2561  { // member is in a namespace, but is written as part of the file documentation
2562  // as well, so we need to make sure its label is unique.
2563  memAnchor.prepend("file_");
2564  }
2565 
2566  QCString cname = container->name();
2567  QCString cfname = getOutputFileBase();
2568 
2569  // get member name
2570  QCString doxyName=name();
2571  // prepend scope if there is any. TODO: make this optional for C only docs
2572  if (!scopeName.isEmpty())
2573  {
2574  doxyName.prepend(scopeName+sep);
2575  }
2576  QCString doxyArgs=argsString();
2577 
2578  QCString ldef = definition();
2579  QCString title = name();
2580  //printf("member `%s' def=`%s'\n",name().data(),ldef.data());
2581  if (isEnumerate())
2582  {
2583  if (title.at(0)=='@')
2584  {
2585  ldef = title = "anonymous enum";
2586  if (!m_impl->enumBaseType.isEmpty())
2587  {
2588  ldef+=" : "+m_impl->enumBaseType;
2589  }
2590  }
2591  else
2592  {
2593  ldef.prepend("enum ");
2594  }
2595  }
2596  else if (isEnumValue())
2597  {
2598  if (ldef.at(0)=='@')
2599  {
2600  ldef=ldef.mid(2);
2601  }
2602  }
2603  else if (isFunction())
2604  {
2605  title+=argsString();
2606  }
2607  int i=0,l;
2608  static QRegExp r("@[0-9]+");
2609 
2610  //----------------------------------------
2611 
2612  ol.pushGeneratorState();
2613 
2614  bool htmlEndLabelTable=FALSE;
2615  QStrList sl;
2616  getLabels(sl,container);
2617 
2618  if ((isVariable() || isTypedef()) && (i=r.match(ldef,0,&l))!=-1)
2619  {
2620  // find enum type and insert it in the definition
2621  QListIterator<MemberDef> vmli(*ml);
2622  MemberDef *vmd;
2623  bool found=FALSE;
2624  for ( ; (vmd=vmli.current()) && !found ; ++vmli)
2625  {
2626  if (vmd->isEnumerate() && ldef.mid(i,l)==vmd->name())
2627  {
2628  ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
2629  ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
2630  linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.left(i));
2632  linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-i-l));
2633 
2634  found=TRUE;
2635  }
2636  }
2637  if (!found) // anonymous compound
2638  {
2639  //printf("Anonymous compound `%s'\n",cname.data());
2640  ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
2641  ol.startMemberDoc(ciname,name(),memAnchor,name(),showInline);
2642  // search for the last anonymous compound name in the definition
2643  int si=ldef.find(' '),pi,ei=i+l;
2644  if (si==-1) si=0;
2645  while ((pi=r.match(ldef,i+l,&l))!=-1)
2646  {
2647  i=pi;
2648  ei=i+l;
2649  }
2650  // first si characters of ldef contain compound type name
2652  ol.docify(ldef.left(si));
2653  ol.docify(" { ... } ");
2654  // last ei characters of ldef contain pointer/reference specifiers
2655  int ni=ldef.find("::",si);
2656  if (ni>=ei) ei=ni+2;
2657  linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,ldef.right(ldef.length()-ei));
2658  }
2659  }
2660  else // not an enum value or anonymous compound
2661  {
2662  ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
2663  ol.startMemberDoc(ciname,name(),memAnchor,title,showInline);
2664 
2665  ClassDef *cd=getClassDef();
2667  if (!Config_getBool("HIDE_SCOPE_NAMES"))
2668  {
2669  bool first=TRUE;
2670  SrcLangExt lang = getLanguage();
2671  if (m_impl->defTmpArgLists && lang==SrcLangExt_Cpp)
2672  // definition has explicit template parameter declarations
2673  {
2675  ArgumentList *tal;
2676  for (ali.toFirst();(tal=ali.current());++ali)
2677  {
2678  if (tal->count()>0)
2679  {
2680  if (!first) ol.docify(" ");
2682  writeTemplatePrefix(ol,tal);
2684  }
2685  }
2686  }
2687  else // definition gets it template parameters from its class
2688  // (since no definition was found)
2689  {
2690  if (cd && lang==SrcLangExt_Cpp && !isTemplateSpecialization())
2691  {
2692  QList<ArgumentList> tempParamLists;
2693  cd->getTemplateParameterLists(tempParamLists);
2694  //printf("#tempParamLists=%d\n",tempParamLists.count());
2695  QListIterator<ArgumentList> ali(tempParamLists);
2696  ArgumentList *tal;
2697  for (ali.toFirst();(tal=ali.current());++ali)
2698  {
2699  if (tal->count()>0)
2700  {
2701  if (!first) ol.docify(" ");
2703  writeTemplatePrefix(ol,tal);
2705  }
2706  }
2707  }
2708  if (m_impl->tArgList && lang==SrcLangExt_Cpp) // function template prefix
2709  {
2713  }
2714  }
2715  }
2716 
2717  if (sl.count()>0)
2718  {
2719  ol.pushGeneratorState();
2720  ol.disableAll();
2722  ol.writeString("<table class=\"mlabels\">\n");
2723  ol.writeString(" <tr>\n");
2724  ol.writeString(" <td class=\"mlabels-left\">\n");
2725  ol.popGeneratorState();
2726  htmlEndLabelTable=TRUE;
2727  }
2728 
2730  if (cd && cd->isObjectiveC())
2731  {
2732  // strip scope name
2733  int ep = ldef.find("::");
2734  if (ep!=-1)
2735  {
2736  int sp=ldef.findRev(' ',ep);
2737  if (sp!=-1)
2738  {
2739  ldef=ldef.left(sp+1)+ldef.mid(ep+2);
2740  } else {
2741  ldef=ldef.mid(ep+2);
2742  }
2743  }
2744  // strip keywords
2745  int dp = ldef.find(':');
2746  if (dp!=-1)
2747  {
2748  ldef=ldef.left(dp+1);
2749  }
2750  int l=ldef.length();
2751  //printf("start >%s<\n",ldef.data());
2752  int i=l-1;
2753  while (i>=0 && (isId(ldef.at(i)) || ldef.at(i)==':')) i--;
2754  while (i>=0 && isspace((uchar)ldef.at(i))) i--;
2755  if (i>0)
2756  {
2757  // insert braches around the type
2758  QCString tmp("("+ldef.left(i+1)+")"+ldef.mid(i+1));
2759  ldef=tmp;
2760  }
2761  //printf("end >%s< i=%d\n",ldef.data(),i);
2762  if (isStatic()) ldef.prepend("+ "); else ldef.prepend("- ");
2763  }
2764 
2765  if (optVhdl)
2766  {
2767  hasParameterList=VhdlDocGen::writeVHDLTypeDocumentation(this,container,ol);
2768  }
2769  else
2770  {
2772  container,
2773  getBodyDef(),
2774  this,
2775  substitute(ldef,"::",sep)
2776  );
2777  Definition *scope = cd;
2778  if (scope==0) scope = nd;
2779  hasParameterList=writeDefArgumentList(ol,scope,this);
2780  }
2781 
2782  if (hasOneLineInitializer()) // add initializer
2783  {
2784  if (!isDefine())
2785  {
2786  //ol.docify(" = ");
2787  ol.docify(" ");
2789  linkifyText(TextGeneratorOLImpl(ol),container,getBodyDef(),this,init);
2790  }
2791  else
2792  {
2793  ol.writeNonBreakableSpace(3);
2795  }
2796  }
2797  if (excpString()) // add exception list
2798  {
2799  writeExceptionList(ol,cd,this);
2800  hasParameterList=true; // call endParameterList below
2801  }
2802  }
2803 
2804  ol.pushGeneratorState();
2806  if (sl.count()>0)
2807  {
2808  ol.startLabels();
2809  const char *s=sl.first();
2810  while (s)
2811  {
2812  const char *ns = sl.next();
2813  ol.writeLabel(s,ns==0);
2814  s=ns;
2815  }
2816  ol.endLabels();
2817  }
2818  ol.popGeneratorState();
2819 
2820  if (hasParameterList)
2821  {
2822  ol.endParameterList();
2823  ol.endMemberDoc(TRUE);
2824  }
2825  else
2826  {
2827  ol.endMemberDocName();
2828  ol.endMemberDoc(FALSE);
2829  }
2830 
2831  // for HTML write the labels here
2832  ol.pushGeneratorState();
2833  ol.disableAll();
2835  if (htmlEndLabelTable)
2836  {
2837  ol.writeString(" </td>\n");
2838  ol.writeString(" <td class=\"mlabels-right\">\n");
2839  ol.startLabels();
2840  const char *s=sl.first();
2841  while (s)
2842  {
2843  const char *ns = sl.next();
2844  ol.writeLabel(s,ns==0);
2845  s=ns;
2846  }
2847  ol.endLabels();
2848  ol.writeString(" </td>\n");
2849  ol.writeString(" </tr>\n");
2850  ol.writeString("</table>\n");
2851  }
2852  ol.writeString("</div>");
2853  ol.popGeneratorState();
2854 
2855 
2856  ol.endDoxyAnchor(cfname,memAnchor);
2857  ol.startIndent();
2858 
2859  _writeGroupInclude(ol,inGroup);
2860 
2861  /* write multi-line initializer (if any) */
2863  //initLines>0 && ((initLines<maxInitLines && userInitLines==-1) // implicitly enabled
2864  // || initLines<userInitLines // explicitly enabled
2865  // )
2866  )
2867  {
2868  //printf("md=%s initLines=%d init=`%s'\n",name().data(),initLines,init.data());
2869  ol.startBold();
2872  else
2874  ol.endBold();
2876  pIntf->resetCodeParserState();
2877  ol.startCodeFragment();
2878  pIntf->parseCode(ol,scopeName,m_impl->initializer,lang,FALSE,0,getFileDef(),
2879  -1,-1,TRUE,this,FALSE,this);
2880  ol.endCodeFragment();
2881  }
2882 
2884  QCString detailed = documentation();
2885  ArgumentList *docArgList = m_impl->defArgList;
2886  if (m_impl->templateMaster)
2887  {
2889  detailed = m_impl->templateMaster->documentation();
2890  docArgList = m_impl->templateMaster->argumentList();
2891  }
2892 
2893  /* write brief description */
2894  if (!brief.isEmpty() &&
2895  (Config_getBool("REPEAT_BRIEF") ||
2896  !Config_getBool("BRIEF_MEMBER_DESC")
2897  )
2898  )
2899  {
2900  ol.startParagraph();
2902  getOuterScope()?getOuterScope():container,this,
2903  brief,FALSE,FALSE,0,TRUE,FALSE);
2904  ol.endParagraph();
2905  }
2906 
2907  /* write detailed description */
2908  if (!detailed.isEmpty() ||
2910  {
2911  // write vhdl inline code with or without option INLINE_SOURCE
2912  if (optVhdl && VhdlDocGen::isMisc(this))
2913  {
2914  VhdlDocGen::writeSource(this,ol,cname);
2915  return;
2916  }
2917  else
2918  {
2919  ol.generateDoc(docFile(),docLine(),getOuterScope()?getOuterScope():container,this,detailed+"\n",TRUE,FALSE);
2920  }
2921 
2922  if (!inbodyDocumentation().isEmpty())
2923  {
2925  getOuterScope()?getOuterScope():container,this,
2926  inbodyDocumentation()+"\n",TRUE,FALSE);
2927  }
2928  }
2929  else if (!brief.isEmpty() && (Config_getBool("REPEAT_BRIEF") ||
2930  !Config_getBool("BRIEF_MEMBER_DESC")))
2931  {
2932  if (!inbodyDocumentation().isEmpty())
2933  {
2935  }
2936  }
2937 
2938 
2939  //printf("***** defArgList=%p name=%s docs=%s hasDocs=%d\n",
2940  // defArgList,
2941  // defArgList?defArgList->hasDocumentation():-1);
2942  if (docArgList!=0 && docArgList->hasDocumentation())
2943  {
2944  QCString paramDocs;
2945  ArgumentListIterator ali(*docArgList);
2946  Argument *a;
2947  // convert the parameter documentation into a list of @param commands
2948  for (ali.toFirst();(a=ali.current());++ali)
2949  {
2950  if (a->hasDocumentation())
2951  {
2953  paramDocs+="@param"+direction+" "+a->name+" "+a->docs;
2954  }
2955  }
2956  // feed the result to the documentation parser
2957  ol.generateDoc(
2958  docFile(),docLine(),
2959  getOuterScope()?getOuterScope():container,
2960  this, // memberDef
2961  paramDocs, // docStr
2962  TRUE, // indexWords
2963  FALSE // isExample
2964  );
2965 
2966  }
2967 
2968  _writeEnumValues(ol,container,cfname,ciname,cname);
2969  _writeReimplements(ol);
2972  _writeExamples(ol);
2974  writeSourceDef(ol,cname);
2975  writeSourceRefs(ol,cname);
2976  writeSourceReffedBy(ol,cname);
2977  writeInlineCode(ol,cname);
2978  _writeCallGraph(ol);
2979  _writeCallerGraph(ol);
2980 
2982  {
2983  ol.pushGeneratorState();
2985  QCString cmd = "<? $root=$_SERVER['DOCUMENT_ROOT']; "
2986  "passthru(\"$root/doxynotes --lookup "+
2987  getOutputFileBase()+":"+anchor()+"\") ?>";
2988  ol.writeString(cmd);
2989  ol.popGeneratorState();
2990  }
2991 
2992  ol.endIndent();
2993 
2994  // enable LaTeX again
2995  //if (Config_getBool("EXTRACT_ALL") && !hasDocs) ol.enable(OutputGenerator::Latex);
2996  ol.popGeneratorState();
2997 
2998  //------------------------------------------------
2999 
3000  if (!Config_getBool("EXTRACT_ALL") &&
3001  Config_getBool("WARN_IF_UNDOCUMENTED") &&
3002  Config_getBool("WARN_NO_PARAMDOC") &&
3004  {
3005  if (!hasDocumentedParams())
3006  {
3008  "parameters of member %s are not (all) documented",
3009  qPrint(qualifiedName()));
3010  }
3012  {
3014  "return type of member %s is not documented",
3015  qPrint(qualifiedName()));
3016  }
3017  }
3018 }
3019 
3020 // strip scope and field name from the type
3021 // example: "struct N::S.v.c" will become "struct v"
3023 {
3025  if (ts.right(2)=="::") ts = ts.left(ts.length()-2);
3026  static QRegExp re("[A-Z_a-z0-9]+::");
3027  int i,l;
3028  while ((i=re.match(ts,0,&l))!=-1)
3029  {
3030  ts=ts.left(i)+ts.mid(i+l);
3031  }
3032  i=ts.findRev('.');
3033  if (i!=-1) ts = ts.left(i);
3034  i=ts.findRev('.');
3035  if (i!=-1) ts = ts.right(ts.length()-i-1);
3036  //printf("simplifyTypeForTable(%s)->%s\n",s.data(),ts.data());
3037  return ts;
3038 }
3039 
3040 #if 0
3041 /** Returns the type definition corresponding to a member's return type.
3042  * @param[in] scope The scope in which to search for the class definition.
3043  * @param[in] type The string representing the member's return type.
3044  * @param[in] lang The programming language in which the class is defined.
3045  * @param[out] start The string position where the class definition name was found.
3046  * @param[out] length The length of the class definition's name.
3047  */
3048 static Definition *getClassFromType(Definition *scope,const QCString &type,SrcLangExt lang,int &start,int &length)
3049 {
3050  int pos=0;
3051  int i;
3052  QCString name;
3053  QCString templSpec;
3054  while ((i=extractClassNameFromType(type,pos,name,templSpec,lang))!=-1)
3055  {
3056  ClassDef *cd=0;
3057  MemberDef *md=0;
3058  int l = name.length()+templSpec.length();
3059  if (!templSpec.isEmpty())
3060  {
3061  cd = getResolvedClass(scope,0,name+templSpec,&md);
3062  }
3063  cd = getResolvedClass(scope,0,name);
3064  if (cd)
3065  {
3066  start=i;
3067  length=l;
3068  printf("getClassFromType: type=%s name=%s start=%d length=%d\n",type.data(),name.data(),start,length);
3069  return cd;
3070  }
3071  else if (md)
3072  {
3073  start=i;
3074  length=l;
3075  printf("getClassFromType: type=%s name=%s start=%d length=%d\n",type.data(),name.data(),start,length);
3076  return md;
3077  }
3078  pos=i+l;
3079  }
3080  return 0;
3081 }
3082 #endif
3083 
3085 {
3086  QCString type = m_impl->accessorType;
3087  if (type.isEmpty())
3088  {
3089  type = m_impl->type;
3090  }
3091 
3092  if (isTypedef()) type.prepend("typedef ");
3093  return simplifyTypeForTable(type);
3094 }
3095 
3097 {
3098  Definition *scope = getOuterScope();
3099  QCString doxyName = name();
3100  QCString doxyArgs = argsString();
3101  QCString memAnchor = anchor();
3102  QCString cfname = getOutputFileBase();
3103  QCString cname;
3104  if (scope) cname = scope->name();
3105  if (doxyName.at(0)=='@')
3106  {
3107  doxyName="__unnamed__";
3108  }
3109 
3110  ClassDef *cd = m_impl->accessorClass;
3111  //printf("===> %s::anonymous: %s\n",name().data(),cd?cd->name().data():"<none>");
3112 
3113  ol.startInlineMemberType();
3114  ol.startDoxyAnchor(cfname,cname,memAnchor,doxyName,doxyArgs);
3115 
3116  QCString ts = fieldType();
3117 
3118  if (cd) // cd points to an anonymous struct pointed to by this member
3119  // so we add a link to it from the type column.
3120  {
3121  int i=0;
3122  const char *prefixes[] = { "struct ","union ","class ", 0 };
3123  const char **p = prefixes;
3124  while (*p)
3125  {
3126  int l=qstrlen(*p);
3127  if (ts.left(l)==*p)
3128  {
3129  ol.writeString(*p);
3130  i=l;
3131  }
3132  p++;
3133  }
3134  ol.writeObjectLink(cd->getReference(),
3135  cd->getOutputFileBase(),
3136  cd->anchor(),ts.mid(i));
3137  }
3138  else // use standard auto linking
3139  {
3140  linkifyText(TextGeneratorOLImpl(ol), // out
3141  scope, // scope
3142  getBodyDef(), // fileScope
3143  this, // self
3144  ts, // text
3145  TRUE // autoBreak
3146  );
3147  }
3148  ol.endDoxyAnchor(cfname,memAnchor);
3149  ol.endInlineMemberType();
3150 
3151  ol.startInlineMemberName();
3152  ol.docify(doxyName);
3153  if (isVariable() && argsString() && !isObjCMethod())
3154  {
3156  }
3157  if (!m_impl->bitfields.isEmpty()) // add bitfields
3158  {
3160  }
3161  ol.endInlineMemberName();
3162 
3163  ol.startInlineMemberDoc();
3164 
3166  QCString detailed = documentation();
3167 
3168  /* write brief description */
3169  if (!brief.isEmpty())
3170  {
3172  getOuterScope()?getOuterScope():container,this,
3173  brief,FALSE,FALSE,0,TRUE,FALSE);
3174  }
3175 
3176  /* write detailed description */
3177  if (!detailed.isEmpty())
3178  {
3179  ol.generateDoc(docFile(),docLine(),
3180  getOuterScope()?getOuterScope():container,this,
3181  detailed+"\n",FALSE,FALSE,0,FALSE,FALSE);
3182 
3183  }
3184 
3185  ol.endInlineMemberDoc();
3186 }
3187 
3189 {
3190  switch (m_impl->mtype)
3191  {
3192  case MemberType_Define: return "macro definition";
3193  case MemberType_Function: return "function";
3194  case MemberType_Variable: return "variable";
3195  case MemberType_Typedef: return "typedef";
3196  case MemberType_Enumeration: return "enumeration";
3197  case MemberType_EnumValue: return "enumvalue";
3198  case MemberType_Signal: return "signal";
3199  case MemberType_Slot: return "slot";
3200  case MemberType_Friend: return "friend";
3201  case MemberType_DCOP: return "dcop";
3202  case MemberType_Property: return "property";
3203  case MemberType_Event: return "event";
3204  case MemberType_Interface: return "interface";
3205  case MemberType_Service: return "service";
3206  default: return "unknown";
3207  }
3208 }
3209 
3211 {
3212  if (m_impl->memberGroup) return;
3213  ClassDef *cd = getClassDef();
3214  NamespaceDef *nd = getNamespaceDef();
3215  FileDef *fd = getFileDef();
3216  GroupDef *gd = getGroupDef();
3217  Definition *d=0;
3218  const char *t=0;
3219  if (cd)
3220  t="class", d=cd;
3221  else if (nd)
3222  {
3223  d=nd;
3224  if (d->getLanguage() == SrcLangExt_Fortran)
3225  t="module";
3226  else
3227  t="namespace";
3228  }
3229  else if (gd)
3230  t="group", d=gd;
3231  else
3232  t="file", d=fd;
3233  static bool extractAll = Config_getBool("EXTRACT_ALL");
3234 
3235  //printf("%s:warnIfUndoc: hasUserDocs=%d isFriendClass=%d protection=%d isRef=%d isDel=%d\n",
3236  // name().data(),
3237  // hasUserDocumentation(),isFriendClass(),protectionLevelVisible(m_impl->prot),isReference(),isDeleted());
3238  if ((!hasUserDocumentation() && !extractAll) &&
3239  !isFriendClass() &&
3240  name().find('@')==-1 && d && d->name().find('@')==-1 &&
3242  !isReference() && !isDeleted()
3243  )
3244  {
3245  warn_undoc(getDefFileName(),getDefLine(),"Member %s%s (%s) of %s %s is not documented.",
3247  }
3248 }
3249 
3250 
3251 
3253 {
3254  return (isFriend() &&
3255  (m_impl->type=="friend class" || m_impl->type=="friend struct" ||
3256  m_impl->type=="friend union"));
3257 }
3258 
3260 {
3261  ClassDef *fcd=0;
3263  int i=baseName.find('<');
3264  if (i!=-1) baseName=baseName.left(i);
3265  return (isFriendClass() &&
3266  (fcd=getClass(baseName)) && fcd->isLinkable());
3267 }
3268 
3270 {
3272 }
3273 
3275 {
3276  return Definition::hasDocumentation() ||
3277  (m_impl->mtype==MemberType_Enumeration && m_impl->docEnumValues) || // has enum values
3278  (m_impl->defArgList!=0 && m_impl->defArgList->hasDocumentation()); // has doc arguments
3279 }
3280 
3281 #if 0
3283 {
3284  bool hasDocs = Definition::hasUserDocumentation();
3285  return hasDocs;
3286 }
3287 #endif
3288 
3289 
3291 {
3292  m_impl->memberGroup = grp;
3293 }
3294 
3295 bool MemberDef::visibleMemberGroup(bool hideNoHeader)
3296 {
3297  return m_impl->memberGroup!=0 &&
3298  (!hideNoHeader || m_impl->memberGroup->header()!="[NOHEADER]");
3299 }
3300 
3302 {
3303  QCString result;
3304  if (getClassDef()) result=getClassDef()->displayName();
3305  else if (getNamespaceDef()) result=getNamespaceDef()->displayName();
3306  return result;
3307 }
3308 
3309 #if 0
3310 static QCString escapeAnchor(const QCString &anchor)
3311 {
3312  QCString result;
3313  int l = anchor.length(),i;
3314  for (i=0;i<l;i++)
3315  {
3316  char c = anchor.at(i);
3317  if ((c>='a' && c<='z') || (c>='A' && c<='Z'))
3318  {
3319  result+=c;
3320  }
3321  else
3322  {
3323  static char hexStr[]="0123456789ABCDEF";
3324  char escChar[]={ '_', 0, 0, 0 };
3325  escChar[1]=hexStr[c>>4];
3326  escChar[2]=hexStr[c&0xf];
3327  result+=escChar;
3328  }
3329  }
3330  return result;
3331 }
3332 #endif
3333 
3335 {
3336  QCString memAnchor = name();
3337  if (!m_impl->args.isEmpty()) memAnchor+=m_impl->args;
3338 
3339  memAnchor.prepend(definition()); // actually the method name is now included
3340  // twice, which is silly, but we keep it this way for backward
3341  // compatibility.
3342 
3343  // include number of template arguments as well,
3344  // to distinguish between two template
3345  // specializations that only differ in the template parameters.
3346  if (m_impl->tArgList)
3347  {
3348  char buf[20];
3349  qsnprintf(buf,20,"%d:",m_impl->tArgList->count());
3350  buf[19]='\0';
3351  memAnchor.prepend(buf);
3352  }
3353 
3354  // convert to md5 hash
3355  uchar md5_sig[16];
3356  QCString sigStr(33);
3357  MD5Buffer((const unsigned char *)memAnchor.data(),memAnchor.length(),md5_sig);
3358  //printf("memAnchor=%s\n",memAnchor.data());
3359  MD5SigToString(md5_sig,sigStr.rawData(),33);
3360  m_impl->anc = "a"+sigStr;
3361 }
3362 
3364  const QCString &fileName,int startLine,
3365  bool hasDocs,MemberDef *member)
3366 {
3367  //printf("%s MemberDef::setGroupDef(%s)\n",name().data(),gd->name().data());
3368  m_impl->group=gd;
3369  m_impl->grouppri=pri;
3371  m_impl->groupStartLine=startLine;
3372  m_impl->groupHasDocs=hasDocs;
3373  m_impl->groupMember=member;
3374  m_isLinkableCached = 0;
3375 }
3376 
3378 {
3379  m_impl->enumScope=md;
3381  if (md->getGroupDef())
3382  {
3383  m_impl->group=md->getGroupDef();
3384  m_impl->grouppri=md->getGroupPri();
3388  m_isLinkableCached = 0;
3389  }
3390 }
3391 
3393 {
3394  m_impl->classDef=cd;
3395  m_isLinkableCached = 0;
3397  setOuterScope(cd);
3398 }
3399 
3401 {
3402  m_impl->nspace=nd;
3403  setOuterScope(nd);
3404 }
3405 
3407  ArgumentList *formalArgs,ArgumentList *actualArgs)
3408 {
3409  //printf(" Member %s %s %s\n",typeString(),name().data(),argsString());
3410  ArgumentList *actualArgList = 0;
3411  if (m_impl->defArgList)
3412  {
3413  actualArgList = m_impl->defArgList->deepCopy();
3414 
3415  // replace formal arguments with actuals
3416  ArgumentListIterator ali(*actualArgList);
3417  Argument *arg;
3418  for (;(arg=ali.current());++ali)
3419  {
3420  arg->type = substituteTemplateArgumentsInString(arg->type,formalArgs,actualArgs);
3421  }
3422  actualArgList->trailingReturnType =
3423  substituteTemplateArgumentsInString(actualArgList->trailingReturnType,formalArgs,actualArgs);
3424  }
3425 
3426  QCString methodName=name();
3427  if (methodName.left(9)=="operator ") // conversion operator
3428  {
3429  methodName=substituteTemplateArgumentsInString(methodName,formalArgs,actualArgs);
3430  }
3431 
3432  MemberDef *imd = new MemberDef(
3434  substituteTemplateArgumentsInString(m_impl->type,formalArgs,actualArgs),
3435  methodName,
3436  substituteTemplateArgumentsInString(m_impl->args,formalArgs,actualArgs),
3439  );
3440  imd->setArgumentList(actualArgList);
3441  imd->setDefinition(substituteTemplateArgumentsInString(m_impl->def,formalArgs,actualArgs));
3442  imd->setBodyDef(getBodyDef());
3444  //imd->setBodyMember(this);
3445 
3446  // TODO: init other member variables (if needed).
3447  // TODO: reimplemented info
3448  return imd;
3449 }
3450 
3452 {
3453  //printf("%s: init=%s, initLines=%d maxInitLines=%d userInitLines=%d\n",
3454  // name().data(),m_impl->initializer.data(),m_impl->initLines,
3455  // m_impl->maxInitLines,m_impl->userInitLines);
3456  return !m_impl->initializer.isEmpty() && m_impl->initLines==0 && // one line initializer
3457  ((m_impl->maxInitLines>0 && m_impl->userInitLines==-1) || m_impl->userInitLines>0); // enabled by default or explicitly
3458 }
3459 
3461 {
3462  //printf("initLines=%d userInitLines=%d maxInitLines=%d\n",
3463  // initLines,userInitLines,maxInitLines);
3464  return m_impl->initLines>0 &&
3465  ((m_impl->initLines<m_impl->maxInitLines && m_impl->userInitLines==-1) // implicitly enabled
3466  || m_impl->initLines<m_impl->userInitLines // explicitly enabled
3467  );
3468 }
3469 
3471 {
3473  int l=m_impl->initializer.length();
3474  int p=l-1;
3475  while (p>=0 && isspace((uchar)m_impl->initializer.at(p))) p--;
3478  //printf("%s::setInitializer(%s)\n",name().data(),m_impl->initializer.data());
3479 }
3480 
3482 {
3483  static bool optimizeOutputForC = Config_getBool("OPTIMIZE_OUTPUT_FOR_C");
3484  //static bool hideScopeNames = Config_getBool("HIDE_SCOPE_NAMES");
3485  //static bool optimizeOutputJava = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
3486  //static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
3487  SrcLangExt lang = getLanguage();
3488  visited=TRUE;
3489  if (!isLinkableInProject()) return;
3490  QCString memLabel;
3491  if (optimizeOutputForC)
3492  {
3493  memLabel=theTranslator->trGlobal(TRUE,TRUE);
3494  }
3495  else if (lang==SrcLangExt_Fortran)
3496  {
3497  memLabel=theTranslator->trSubprogram(TRUE,TRUE);
3498  }
3499  else
3500  {
3501  memLabel=theTranslator->trMember(TRUE,TRUE);
3502  }
3503  QCString memName = name();
3504  Definition *pd=getOuterScope();
3506  ((ClassDef*)pd)->displayName() : pd->name();
3508  QCString memArgs;
3509  if (!isRelated()
3510  /* && commented out as a result of bug 597016
3511  (
3512  (!hideScopeNames && // there is a scope
3513  pd && pd!=Doxygen::globalScope) // and we can show it
3514  ||
3515  (pd=getClassDef()) // it's a class so we
3516  // show the scope anyway
3517  )
3518  */
3519  )
3520  {
3521  if (isObjCMethod())
3522  {
3523  memName = "[" + pd->name() + " " + name() + "]";
3524  }
3525  else
3526  {
3527  if (pd!=Doxygen::globalScope) memName.prepend(pdName+sep);
3528  memArgs = argsString();
3529  }
3530  }
3531  QList<ListItemInfo> *xrefItems = xrefListItems();
3532  if (xrefItems)
3533  {
3534  addRefItem(xrefItems,
3535  qualifiedName()+argsString(), // argsString is needed for overloaded functions (see bug 609624)
3536  memLabel,
3537  getOutputFileBase()+"#"+anchor(),memName,memArgs,pd);
3538  }
3539 }
3540 
3542 {
3543  char key[20];
3544  sprintf(key,"%p",d);
3545  return (d!=0 && m_impl->classSectionSDict) ? m_impl->classSectionSDict->find(key) : 0;
3546 }
3547 
3549 {
3550  //printf("MemberDef::setSectionList(%p,%p) name=%s\n",d,sl,name().data());
3551  char key[20];
3552  sprintf(key,"%p",d);
3553  if (m_impl->classSectionSDict==0)
3554  {
3556  }
3557  m_impl->classSectionSDict->append(key,sl);
3558 }
3559 
3561 {
3562  if (count>25)
3563  {
3565  "Internal inconsistency: recursion detected in overload relation for member %s!"
3566  ,qPrint(name())
3567  );
3568  return Normal;
3569  }
3570  Specifier v = m_impl->virt;
3571  MemberDef *rmd = reimplements();
3572  while (rmd && v==Normal)
3573  {
3574  v = rmd->virtualness(count+1)==Normal ? Normal : Virtual;
3575  rmd = rmd->reimplements();
3576  }
3577  return v;
3578 }
3579 
3581 {
3582  if (!isLinkableInProject()) return;
3583  tagFile << " <member kind=\"";
3584  switch (m_impl->mtype)
3585  {
3586  case MemberType_Define: tagFile << "define"; break;
3587  case MemberType_EnumValue: tagFile << "enumvalue"; break;
3588  case MemberType_Property: tagFile << "property"; break;
3589  case MemberType_Event: tagFile << "event"; break;
3590  case MemberType_Variable: tagFile << "variable"; break;
3591  case MemberType_Typedef: tagFile << "typedef"; break;
3592  case MemberType_Enumeration: tagFile << "enumeration"; break;
3593  case MemberType_Function: tagFile << "function"; break;
3594  case MemberType_Signal: tagFile << "signal"; break;
3595  case MemberType_Friend: tagFile << "friend"; break;
3596  case MemberType_DCOP: tagFile << "dcop"; break;
3597  case MemberType_Slot: tagFile << "slot"; break;
3598  case MemberType_Interface: tagFile << "interface"; break;
3599  case MemberType_Service: tagFile << "service"; break;
3600  }
3601  if (m_impl->prot!=Public)
3602  {
3603  tagFile << "\" protection=\"";
3604  if (m_impl->prot==Protected) tagFile << "protected";
3605  else if (m_impl->prot==Package) tagFile << "package";
3606  else /* Private */ tagFile << "private";
3607  }
3608  if (m_impl->virt!=Normal)
3609  {
3610  tagFile << "\" virtualness=\"";
3611  if (m_impl->virt==Virtual) tagFile << "virtual";
3612  else /* Pure */ tagFile << "pure";
3613  }
3614  if (isStatic())
3615  {
3616  tagFile << "\" static=\"yes";
3617  }
3618  tagFile << "\">" << endl;
3619  if (typeString()!=QCString("@"))
3620  {
3621  tagFile << " <type>" << convertToXML(typeString()) << "</type>" << endl;
3622  }
3623  tagFile << " <name>" << convertToXML(name()) << "</name>" << endl;
3624  tagFile << " <anchorfile>" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension) << "</anchorfile>" << endl;
3625  tagFile << " <anchor>" << convertToXML(anchor()) << "</anchor>" << endl;
3626  QCString idStr = id();
3627  if (!idStr.isEmpty())
3628  {
3629  tagFile << " <clangid>" << convertToXML(idStr) << "</clangid>" << endl;
3630  }
3631  tagFile << " <arglist>" << convertToXML(argsString()) << "</arglist>" << endl;
3632  if (isStrong())
3633  {
3634  MemberList *fmdl=m_impl->enumFields;
3635  if (fmdl)
3636  {
3637  MemberListIterator mli(*fmdl);
3638  MemberDef *fmd;
3639  for (mli.toFirst();(fmd=mli.current());++mli)
3640  {
3641  if (!fmd->isReference())
3642  {
3643  tagFile << " <enumvalue file=\"" << convertToXML(getOutputFileBase()+Doxygen::htmlFileExtension);
3644  tagFile << "\" anchor=\"" << convertToXML(fmd->anchor());
3645  QCString idStr = fmd->id();
3646  if (!idStr.isEmpty())
3647  {
3648  tagFile << "\" clangid=\"" << convertToXML(idStr);
3649  }
3650  tagFile << "\">" << convertToXML(fmd->name()) << "</enumvalue>" << endl;
3651  }
3652  }
3653  }
3654  }
3655  writeDocAnchorsToTagFile(tagFile);
3656  tagFile << " </member>" << endl;
3657 }
3658 
3660 {
3661  m_isConstructorCached=1; // FALSE
3662  if (m_impl->classDef)
3663  {
3664  if (m_impl->isDMember) // for D
3665  {
3666  m_isConstructorCached = name()=="this" ? 2 : 1;
3667  return;
3668  }
3669  else if (getLanguage()==SrcLangExt_PHP) // for PHP
3670  {
3671  m_isConstructorCached = name()=="__construct" ? 2 : 1;
3672  return;
3673  }
3674  else if (name()=="__init__" &&
3675  getLanguage()==SrcLangExt_Python) // for Python
3676  {
3677  m_isConstructorCached = 2; // TRUE
3678  return;
3679  }
3680  else if (getLanguage()==SrcLangExt_Tcl) // for Tcl
3681  {
3682  m_isConstructorCached = name()=="constructor" ? 2 : 1;
3683  return;
3684  }
3685  else // for other languages
3686  {
3687  QCString locName = m_impl->classDef->localName();
3688  int i=locName.find('<');
3689  if (i==-1) // not a template class
3690  {
3691  m_isConstructorCached = name()==locName ? 2 : 1;
3692  }
3693  else
3694  {
3695  m_isConstructorCached = name()==locName.left(i) ? 2 : 1;
3696  }
3697  return;
3698  }
3699  }
3700 }
3701 
3703 {
3704  if (m_isConstructorCached==0)
3705  {
3706  MemberDef *that = (MemberDef*)this;
3707  that->_computeIsConstructor();
3708  }
3710  return m_isConstructorCached==2;
3711 
3712 }
3713 
3715 {
3716  bool isDestructor;
3717  if (m_impl->isDMember) // for D
3718  {
3719  isDestructor = name()=="~this";
3720  }
3721  else if (getLanguage()==SrcLangExt_PHP) // for PHP
3722  {
3723  isDestructor = name()=="__destruct";
3724  }
3725  else if (getLanguage()==SrcLangExt_Tcl) // for Tcl
3726  {
3727  isDestructor = name()=="destructor";
3728  }
3729  else if (name()=="__del__" &&
3730  getLanguage()==SrcLangExt_Python) // for Python
3731  {
3732  isDestructor=TRUE;
3733  }
3734  else // other languages
3735  {
3736  isDestructor =
3737  (name().find('~')!=-1 || name().find('!')!=-1) // The ! is for C++/CLI
3738  && name().find("operator")==-1;
3739  }
3740  m_isDestructorCached = isDestructor ? 2 : 1;
3741 }
3742 
3744 {
3745  if (m_isDestructorCached==0)
3746  {
3747  MemberDef *that=(MemberDef*)this;
3748  that->_computeIsDestructor();
3749  }
3751  return m_isDestructorCached==2;
3752 }
3753 
3755  ClassDef *cd,NamespaceDef *nd,FileDef *fd,GroupDef *gd)
3756 {
3757  int enumMemCount=0;
3758 
3759  MemberList *fmdl=m_impl->enumFields;
3760  uint numVisibleEnumValues=0;
3761  if (fmdl)
3762  {
3763  MemberListIterator mli(*fmdl);
3764  MemberDef *fmd;
3765  for (mli.toFirst();(fmd=mli.current());++mli)
3766  {
3767  if (fmd->isBriefSectionVisible()) numVisibleEnumValues++;
3768  }
3769  }
3770  if (numVisibleEnumValues==0 && !isBriefSectionVisible())
3771  {
3772  return;
3773  }
3774 
3775  QCString n = name();
3776  int i=n.findRev("::");
3777  if (i!=-1) n=n.right(n.length()-i-2); // strip scope (TODO: is this needed?)
3778  if (n[0]!='@') // not an anonymous enum
3779  {
3781  {
3782  //_writeTagData(compoundType);
3784  writeLink(typeDecl,cd,nd,fd,gd);
3785  }
3786  else
3787  {
3788  typeDecl.startBold();
3789  typeDecl.docify(n);
3790  typeDecl.endBold();
3791  }
3792  typeDecl.writeChar(' ');
3793  }
3794  if (!m_impl->enumBaseType.isEmpty())
3795  {
3796  typeDecl.writeChar(':');
3797  typeDecl.writeChar(' ');
3798  typeDecl.docify(m_impl->enumBaseType);
3799  typeDecl.writeChar(' ');
3800  }
3801 
3802  uint enumValuesPerLine = (uint)Config_getInt("ENUM_VALUES_PER_LINE");
3803  if (numVisibleEnumValues>0 && enumValuesPerLine>0)
3804  {
3805  typeDecl.docify("{ ");
3806  if (fmdl)
3807  {
3808  MemberListIterator mli(*fmdl);
3809  MemberDef *fmd=mli.current();
3810  bool fmdVisible = fmd ? fmd->isBriefSectionVisible() : TRUE;
3811  while (fmd)
3812  {
3813  if (fmdVisible)
3814  {
3815  /* in html we start a new line after a number of items */
3816  if (numVisibleEnumValues>enumValuesPerLine
3817  && (enumMemCount%enumValuesPerLine)==0
3818  )
3819  {
3820  typeDecl.pushGeneratorState();
3822  typeDecl.enable(OutputGenerator::Latex);
3823  typeDecl.lineBreak();
3824  typeDecl.disable(OutputGenerator::Latex);
3825  typeDecl.writeString("&#160;&#160;");
3826  typeDecl.popGeneratorState();
3827  }
3828 
3829  if (fmd->hasDocumentation()) // enum value has docs
3830  {
3831  //fmd->_writeTagData(compoundType);
3832  fmd->_addToSearchIndex();
3833  fmd->writeLink(typeDecl,cd,nd,fd,gd);
3834  }
3835  else // no docs for this enum value
3836  {
3837  typeDecl.startBold();
3838  typeDecl.docify(fmd->name());
3839  typeDecl.endBold();
3840  }
3841  if (fmd->hasOneLineInitializer()) // enum value has initializer
3842  {
3843  //typeDecl.writeString(" = ");
3844  typeDecl.writeString(" ");
3845  typeDecl.parseText(fmd->initializer());
3846  }
3847  }
3848 
3849  bool prevVisible = fmdVisible;
3850  ++mli;
3851  fmd=mli.current();
3852  if (fmd && (fmdVisible=fmd->isBriefSectionVisible()))
3853  {
3854  typeDecl.writeString(", ");
3855  }
3856  if (prevVisible)
3857  {
3858  typeDecl.disable(OutputGenerator::Man);
3859  typeDecl.writeString("\n"); // to prevent too long lines in LaTeX
3860  typeDecl.enable(OutputGenerator::Man);
3861  enumMemCount++;
3862  }
3863  }
3864  if (numVisibleEnumValues>enumValuesPerLine)
3865  {
3866  typeDecl.pushGeneratorState();
3868  typeDecl.lineBreak();
3869  typeDecl.popGeneratorState();
3870  }
3871  }
3872  typeDecl.docify(" }");
3873  }
3874 }
3875 
3877 {
3878  if (m_impl->defArgList) delete m_impl->defArgList;
3879  m_impl->defArgList = al;
3880 }
3881 
3883 {
3884  if (m_impl->declArgList) delete m_impl->declArgList;
3885  m_impl->declArgList = al;
3886 }
3887 
3889 {
3890  if (al==0) return;
3894  ArgumentListIterator ali(*al);
3895  Argument *a;
3896  for (;(a=ali.current());++ali)
3897  {
3899  }
3900 }
3901 
3902 void MemberDef::setType(const char *t)
3903 {
3904  m_impl->type = t;
3905 }
3906 
3908 {
3909  m_impl->accessorClass = cd;
3910  m_impl->accessorType = t;
3911 }
3912 
3914 {
3915  return m_impl->accessorClass;
3916 }
3917 
3919 {
3921 }
3922 
3924 {
3927 }
3928 
3930 {
3933 }
3934 
3935 #if 0
3936 bool MemberDef::protectionVisible() const
3937 {
3938  return m_impl->prot==Public ||
3939  (m_impl->prot==Private && Config_getBool("EXTRACT_PRIVATE")) ||
3940  (m_impl->prot==Protected && Config_getBool("EXTRACT_PROTECTED")) ||
3941  (m_impl->prot==Package && Config_getBool("EXTRACT_PACKAGE"));
3942 }
3943 #endif
3944 
3945 #if 0
3946 void MemberDef::setInbodyDocumentation(const char *docs,
3947  const char *docFile,int docLine)
3948 {
3949  m_impl->inbodyDocs = docs;
3950  m_impl->inbodyDocs = m_impl->inbodyDocs.stripWhiteSpace();
3951  m_impl->inbodyLine = docLine;
3952  m_impl->inbodyFile = docFile;
3953 }
3954 #endif
3955 
3957 {
3958  if (m_impl->classDef && m_impl->classDef->isObjectiveC() && isFunction()) return TRUE;
3959  return FALSE;
3960 }
3961 
3963 {
3964  if (m_impl->classDef && m_impl->classDef->isObjectiveC() && isProperty()) return TRUE;
3965  return FALSE;
3966 }
3967 
3969 {
3970  if (isObjCMethod())
3971  {
3972  QCString qm;
3973  if (isStatic()) qm="+"; else qm="-";
3974  qm+="[";
3975  qm+=m_impl->classDef->name()+" ";
3976  qm+=name();
3977  qm+="]";
3978  return qm;
3979  }
3980  else if (m_impl->enumScope && m_impl->enumScope->isStrong())
3981  {
3982  return m_impl->enumScope->qualifiedName()+
3984  localName();
3985  }
3986  else
3987  {
3988  return Definition::qualifiedName();
3989  }
3990 }
3991 
3993 {
3994  if (ti)
3995  {
3996  //printf("%s: Setting tag name=%s anchor=%s\n",name().data(),ti->tagName.data(),ti->anchor.data());
3997  m_impl->anc=ti->anchor;
3998  setReference(ti->tagName);
4000  }
4001 }
4002 
4003 QCString MemberDef::objCMethodName(bool localLink,bool showStatic) const
4004 {
4005  QCString qm;
4006  if (showStatic)
4007  {
4008  if (isStatic()) qm="+ "; else qm="- ";
4009  }
4010  qm+=name();
4011  if (!localLink) // link to method of same class
4012  {
4013  qm+=" (";
4014  qm+=m_impl->classDef->name();
4015  qm+=")";
4016  }
4017  return qm;
4018 }
4019 
4020 const char *MemberDef::declaration() const
4021 {
4022  return m_impl->decl;
4023 }
4024 
4025 const char *MemberDef::definition() const
4026 {
4027  return m_impl->def;
4028 }
4029 
4030 const char *MemberDef::extraTypeChars() const
4031 {
4032  return m_impl->extraTypeChars;
4033 }
4034 
4035 const char *MemberDef::typeString() const
4036 {
4037  return m_impl->type;
4038 }
4039 
4040 const char *MemberDef::argsString() const
4041 {
4042  return m_impl->args;
4043 }
4044 
4045 const char *MemberDef::excpString() const
4046 {
4047  return m_impl->exception;
4048 }
4049 
4050 const char *MemberDef::bitfieldString() const
4051 {
4052  return m_impl->bitfields;
4053 }
4054 
4056 {
4057  return m_impl->initializer;
4058 }
4059 
4061 {
4062  return m_impl->initLines;
4063 }
4064 
4066 {
4067  return m_impl->memSpec;
4068 }
4069 
4071 {
4072  return m_impl->classDef;
4073 }
4074 
4076 {
4077  return m_impl->fileDef;
4078 }
4079 
4081 {
4082  return m_impl->nspace;
4083 }
4084 
4085 const char *MemberDef::getReadAccessor() const
4086 {
4087  return m_impl->read;
4088 }
4089 
4090 const char *MemberDef::getWriteAccessor() const
4091 {
4092  return m_impl->write;
4093 }
4094 
4096 {
4097  return m_impl->group;
4098 }
4099 
4101 {
4102  return m_impl->grouppri;
4103 }
4104 
4105 const char *MemberDef::getGroupFileName() const
4106 {
4107  return m_impl->groupFileName;
4108 }
4109 
4111 {
4112  return m_impl->groupStartLine;
4113 }
4114 
4116 {
4117  return m_impl->groupHasDocs;
4118 }
4119 
4121 {
4122  return m_impl->prot;
4123 }
4124 
4126 {
4127  return m_impl->mtype;
4128 }
4129 
4131 {
4132  return m_impl->mtype==MemberType_Signal;
4133 }
4134 
4135 bool MemberDef::isSlot() const
4136 {
4137  return m_impl->mtype==MemberType_Slot;
4138 }
4139 
4141 {
4142  return m_impl->mtype==MemberType_Variable;
4143 }
4144 
4146 {
4148 }
4149 
4151 {
4153 }
4154 
4156 {
4157  return m_impl->mtype==MemberType_Typedef;
4158 }
4159 
4161 {
4162  return m_impl->mtype==MemberType_Function;
4163 }
4164 
4166 {
4167  return m_impl->mtype==MemberType_Variable && QCString(argsString()).find(")(")!=-1;
4168 }
4169 
4171 {
4172  return m_impl->mtype==MemberType_Define;
4173 }
4174 
4176 {
4177  return m_impl->mtype==MemberType_Friend;
4178 }
4179 
4180 bool MemberDef::isDCOP() const
4181 {
4182  return m_impl->mtype==MemberType_DCOP;
4183 }
4184 
4186 {
4187  return m_impl->mtype==MemberType_Property;
4188 }
4189 
4191 {
4192  return m_impl->mtype==MemberType_Event;
4193 }
4194 
4196 {
4197  return m_impl->related == Related;
4198 }
4199 
4201 {
4202  return m_impl->related == Foreign;
4203 }
4204 
4206 {
4207  return m_impl->stat;
4208 }
4209 
4211 {
4212  return (m_impl->memSpec&Entry::Inline)!=0;
4213 }
4214 
4216 {
4217  return (m_impl->memSpec&Entry::Explicit)!=0;
4218 }
4219 
4221 {
4222  return (m_impl->memSpec&Entry::Mutable)!=0;
4223 }
4224 
4226 {
4227  return (m_impl->memSpec&Entry::Gettable)!=0;
4228 }
4229 
4231 {
4232  return (m_impl->memSpec&Entry::PrivateGettable)!=0;
4233 }
4234 
4236 {
4238 }
4239 
4241 {
4242  return (m_impl->memSpec&Entry::Settable)!=0;
4243 }
4244 
4246 {
4247  return (m_impl->memSpec&Entry::PrivateSettable)!=0;
4248 }
4249 
4251 {
4253 }
4254 
4256 {
4257  return (m_impl->memSpec&Entry::Addable)!=0;
4258 }
4259 
4261 {
4262  return (m_impl->memSpec&Entry::Removable)!=0;
4263 }
4264 
4266 {
4267  return (m_impl->memSpec&Entry::Raisable)!=0;
4268 }
4269 
4271 {
4272  return (m_impl->memSpec&Entry::Readable)!=0;
4273 }
4274 
4276 {
4277  return (m_impl->memSpec&Entry::Writable)!=0;
4278 }
4279 
4281 {
4282  return (m_impl->memSpec&Entry::Final)!=0;
4283 }
4284 
4285 bool MemberDef::isNew() const
4286 {
4287  return (m_impl->memSpec&Entry::New)!=0;
4288 }
4289 
4291 {
4292  return (m_impl->memSpec&Entry::Sealed)!=0;
4293 }
4294 
4296 {
4297  return (m_impl->memSpec&Entry::Override)!=0;
4298 }
4299 
4301 {
4302  return (m_impl->memSpec&Entry::Initonly)!=0;
4303 }
4304 
4306 {
4307  return (m_impl->memSpec&Entry::Abstract)!=0;
4308 }
4309 
4311 {
4312  return (m_impl->memSpec&Entry::Optional)!=0;
4313 }
4314 
4316 {
4317  return (m_impl->memSpec&Entry::Required)!=0;
4318 }
4319 
4321 {
4322  return (m_impl->memSpec&Entry::NonAtomic)!=0;
4323 }
4324 
4325 bool MemberDef::isCopy() const
4326 {
4327  return (m_impl->memSpec&Entry::Copy)!=0;
4328 }
4329 
4331 {
4332  return (m_impl->memSpec&Entry::Assign)!=0;
4333 }
4334 
4336 {
4337  return (m_impl->memSpec&Entry::Retain)!=0;
4338 }
4339 
4340 bool MemberDef::isWeak() const
4341 {
4342  return (m_impl->memSpec&Entry::Weak)!=0;
4343 }
4344 
4346 {
4347  return (m_impl->memSpec&Entry::Strong)!=0;
4348 }
4349 
4351 {
4352  return m_impl->mtype==MemberType_EnumValue &&
4353  m_impl->enumScope &&
4355 }
4356 
4358 {
4359  return (m_impl->memSpec&Entry::Unretained)!=0;
4360 }
4361 
4363 {
4364  return (m_impl->memSpec&Entry::Alias)!=0;
4365 }
4366 
4368 {
4369  return (m_impl->memSpec&Entry::Default)!=0;
4370 }
4371 
4373 {
4374  return (m_impl->memSpec&Entry::Delete)!=0;
4375 }
4376 
4378 {
4379  return (m_impl->memSpec&Entry::NoExcept)!=0;
4380 }
4381 
4383 {
4384  return (m_impl->memSpec&Entry::Attribute)!=0;
4385 }
4386 
4388 {
4389  return (m_impl->memSpec&Entry::Property)!=0;
4390 }
4391 
4393 {
4394  return (m_impl->memSpec&Entry::Readonly)!=0;
4395 }
4396 
4398 {
4399  return (m_impl->memSpec&Entry::Bound)!=0;
4400 }
4401 
4403 {
4404  return (m_impl->memSpec&Entry::Constrained)!=0;
4405 }
4406 
4408 {
4409  return (m_impl->memSpec&Entry::Transient)!=0;
4410 }
4411 
4413 {
4414  return (m_impl->memSpec&Entry::MaybeVoid)!=0;
4415 }
4416 
4418 {
4419  return (m_impl->memSpec&Entry::MaybeDefault)!=0;
4420 }
4421 
4423 {
4424  return (m_impl->memSpec&Entry::MaybeAmbiguous)!=0;
4425 }
4426 
4428 {
4429  return (m_impl->memSpec&Entry::Published)!=0;
4430 }
4431 
4432 
4434 {
4435  return m_impl->implOnly;
4436 }
4437 
4439 {
4440  return m_impl->explExt;
4441 }
4442 
4444 {
4445  return m_impl->tspec;
4446 }
4447 
4449 {
4450  return m_impl->hasDocumentedParams;
4451 }
4452 
4454 {
4456 }
4457 
4459 {
4460  return isFunction() ||
4461  isSlot() ||
4462  isConstructor() ||
4463  isDestructor() ||
4464  isObjCMethod();
4465 }
4466 
4468 {
4469  return m_impl->relatedAlso;
4470 }
4471 
4473 {
4474  return m_impl->docEnumValues;
4475 }
4476 
4478 {
4479  return m_impl->annEnumType;
4480 }
4481 
4483 {
4484  return m_impl->docsForDefinition;
4485 }
4486 
4488 {
4489  return m_impl->enumScope;
4490 }
4491 
4493 {
4494  return m_impl->livesInsideEnum;
4495 }
4496 
4498 {
4499  return m_impl->enumFields;
4500 }
4501 
4503 {
4504  return m_impl->exampleSDict;
4505 }
4506 
4508 {
4509  return m_impl->proto;
4510 }
4511 
4513 {
4514  return m_impl->defArgList;
4515 }
4516 
4518 {
4519  return m_impl->declArgList;
4520 }
4521 
4523 {
4524  return m_impl->tArgList;
4525 }
4526 
4528 {
4529  return m_impl->defTmpArgLists;
4530 }
4531 
4533 {
4534  return m_impl->grpId;
4535 }
4536 
4538 {
4539  return m_impl->memberGroup;
4540 }
4541 
4543 {
4544  return m_impl->annScope;
4545 }
4546 
4548 {
4549  return m_impl->annUsed;
4550 }
4551 
4553 {
4554  m_impl->annUsed = TRUE;
4555 }
4556 
4558 {
4559  return m_impl->hasCallGraph;
4560 }
4561 
4563 {
4564  return m_impl->hasCallerGraph;
4565 }
4566 
4568 {
4569  return m_impl->templateMaster;
4570 }
4571 
4573 {
4574  return m_impl->isTypedefValCached;
4575 }
4576 
4578 {
4579  return m_impl->cachedTypedefValue;
4580 }
4581 
4583 {
4585 }
4586 
4588 {
4589  //printf("MemberDef::getCachedResolvedTypedef()=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
4590  return m_impl->cachedResolvedType;
4591 }
4592 
4594 {
4595  return m_impl->memDef;
4596 }
4597 
4599 {
4600  return m_impl->memDec;
4601 }
4602 
4604 {
4605  return m_impl->docProvider;
4606 }
4607 
4609 {
4610  return m_impl->groupAlias;
4611 }
4612 
4614 {
4615  m_impl->mtype=t;
4616  m_isLinkableCached = 0;
4617 }
4618 
4619 void MemberDef::setDefinition(const char *d)
4620 {
4621  m_impl->def=d;
4622 }
4623 
4625 {
4626  m_impl->fileDef=fd;
4627  m_isLinkableCached = 0;
4630 }
4631 
4633 {
4634  m_impl->prot=p;
4635  m_isLinkableCached = 0;
4636 }
4637 
4639 {
4640  m_impl->memSpec=s;
4641 }
4642 
4644 {
4645  m_impl->memSpec|=s;
4646 }
4647 
4648 void MemberDef::setBitfields(const char *s)
4649 {
4651 }
4652 
4654 {
4655  if (lines!=-1)
4656  {
4658  }
4659 }
4660 
4662 {
4663  m_impl->explExt=b;
4664 }
4665 
4667 {
4668  m_impl->read=r;
4669 }
4670 
4672 {
4673  m_impl->write=w;
4674 }
4675 
4677 {
4678  m_impl->tspec=b;
4679 }
4680 
4682 {
4683  m_impl->related = Related;
4684  m_isLinkableCached = 0;
4685 }
4686 
4688 {
4689  m_impl->related = Foreign;
4690  m_isLinkableCached = 0;
4691 }
4692 
4694 {
4696 }
4697 
4699 {
4701 }
4702 
4704 {
4705  m_impl->docProvider = md;
4706 }
4707 
4708 void MemberDef::setArgsString(const char *as)
4709 {
4710  m_impl->args = as;
4711 }
4712 
4714 {
4715  m_impl->relatedAlso=cd;
4716 }
4717 
4719 {
4720  m_impl->classDef = cd;
4721  m_isLinkableCached = 0;
4723 }
4724 
4726 {
4728 }
4729 
4731 {
4732  m_impl->annEnumType = md;
4733 }
4734 
4736 {
4737  m_impl->proto=p;
4738 }
4739 
4741 {
4742  m_impl->grpId=id;
4743 }
4744 
4746 {
4747  m_impl->implOnly=TRUE;
4748 }
4749 
4751 {
4752  m_impl->annScope=b;
4753 }
4754 
4756 {
4757  m_impl->annMemb=m;
4758 }
4759 
4761 {
4762  return m_impl->annMemb;
4763 }
4764 
4766 {
4767  m_impl->templateMaster=mt;
4768  m_isLinkableCached = 0;
4769 }
4770 
4772 {
4774 }
4775 
4777 {
4778  m_impl->groupAlias = md;
4779 }
4780 
4782 {
4784 }
4785 
4787 {
4788  m_impl->memDef=md;
4789 }
4790 
4792 {
4793  m_impl->memDec=md;
4794 }
4795 
4797 {
4798  return m_impl->category;
4799 }
4800 
4802 {
4803  m_impl->category = def;
4804 }
4805 
4807 {
4808  return m_impl->categoryRelation;
4809 }
4810 
4812 {
4814 }
4815 
4817 {
4819 }
4820 
4822 {
4823  return m_impl->enumBaseType;
4824 }
4825 
4826 
4827 void MemberDef::cacheTypedefVal(ClassDef*val, const QCString & templSpec, const QCString &resolvedType)
4828 {
4831  m_impl->cachedTypedefTemplSpec=templSpec;
4832  m_impl->cachedResolvedType=resolvedType;
4833  //printf("MemberDef::cacheTypedefVal=%s m_impl=%p\n",m_impl->cachedResolvedType.data(),m_impl);
4834 }
4835 
4837 {
4838  {
4840  if (m_impl->defArgList && arguments)
4841  {
4843  ArgumentListIterator aliSrc(*arguments);
4844  Argument *argDst, *argSrc;
4845  for (;(argDst=aliDst.current()) && (argSrc=aliSrc.current());++aliDst,++aliSrc)
4846  {
4847  argDst->name = argSrc->name;
4848  }
4849  }
4850  }
4851  {
4853  if (m_impl->declArgList && arguments)
4854  {
4856  ArgumentListIterator aliSrc(*arguments);
4857  Argument *argDst, *argSrc;
4858  for (;(argDst=aliDst.current()) && (argSrc=aliSrc.current());++aliDst,++aliSrc)
4859  {
4860  argDst->name = argSrc->name;
4861  }
4862  }
4863  }
4864 }
4865 
4867 {
4868  if (al)
4869  {
4870  ArgumentListIterator ali(*al);
4871  Argument *a;
4872  for (ali.toFirst();(a=ali.current());++ali)
4873  {
4874  a->canType.resize(0);
4875  }
4876  }
4877 }
4878 
4880 {
4883 }
4884 
4885 //----------------
4886 
4888 {
4889  return Definition::name();
4890 }
4891 
4893 {
4894  // write search index info
4896  {
4898  QCString ln=localName(),qn=qualifiedName();
4900  if (ln!=qn)
4901  {
4903  if (getClassDef())
4904  {
4906  }
4907  else if (getNamespaceDef())
4908  {
4910  }
4911  }
4912  }
4913 }
4914 
4915 
4916 
4917 //----------------
4918 
4920 {
4921  if (decAl && defAl)
4922  {
4923  ArgumentListIterator decAli(*decAl);
4924  ArgumentListIterator defAli(*defAl);
4925  Argument *decA,*defA;
4926  for (decAli.toFirst(),defAli.toFirst();
4927  (decA=decAli.current()) && (defA=defAli.current());
4928  ++decAli,++defAli)
4929  {
4930  //printf("Argument decA->name=%s (doc=%s) defA->name=%s (doc=%s)\n",
4931  // decA->name.data(),decA->docs.data(),
4932  // defA->name.data(),defA->docs.data()
4933  // );
4934  if (decA->docs.isEmpty() && !defA->docs.isEmpty())
4935  {
4936  decA->docs = defA->docs.copy();
4937  }
4938  else if (defA->docs.isEmpty() && !decA->docs.isEmpty())
4939  {
4940  defA->docs = decA->docs.copy();
4941  }
4942  }
4943  }
4944 }
4945 
4947 {
4948  //printf("mdec=%s isPrototype()=%d\n",mdec->name().data(),mdec->isPrototype());
4949  if (
4950  (mdef->isFunction() && !mdef->isStatic() && !mdef->isPrototype()) ||
4951  (mdef->isVariable() && !mdef->isExternal() && !mdef->isStatic())
4952  )
4953  {
4954  //printf("mdef=(%p,%s) mdec=(%p,%s)\n",
4955  // mdef, mdef ? mdef->name().data() : "",
4956  // mdec, mdec ? mdec->name().data() : "");
4957 
4958  ArgumentList *mdefAl = mdef->argumentList();
4959  ArgumentList *mdecAl = mdec->argumentList();
4960  if (matchArguments2(mdef->getOuterScope(),mdef->getFileDef(),mdefAl,
4961  mdec->getOuterScope(),mdec->getFileDef(),mdecAl,
4962  TRUE
4963  )
4964  ) /* match found */
4965  {
4966  //printf("Found member %s: definition in %s (doc=`%s') and declaration in %s (doc=`%s')\n",
4967  // mn->memberName(),
4968  // mdef->getFileDef()->name().data(),mdef->documentation().data(),
4969  // mdec->getFileDef()->name().data(),mdec->documentation().data()
4970  // );
4971 
4972  // first merge argument documentation
4973  transferArgumentDocumentation(mdecAl,mdefAl);
4974 
4975  /* copy documentation between function definition and declaration */
4976  if (!mdec->briefDescription().isEmpty())
4977  {
4978  mdef->setBriefDescription(mdec->briefDescription(),mdec->briefFile(),mdec->briefLine());
4979  }
4980  else if (!mdef->briefDescription().isEmpty())
4981  {
4982  mdec->setBriefDescription(mdef->briefDescription(),mdef->briefFile(),mdef->briefLine());
4983  }
4984  if (!mdef->documentation().isEmpty())
4985  {
4986  //printf("transferring docs mdef->mdec (%s->%s)\n",mdef->argsString(),mdec->argsString());
4987  mdec->setDocumentation(mdef->documentation(),mdef->docFile(),mdef->docLine());
4989  if (mdefAl!=0)
4990  {
4991  ArgumentList *mdefAlComb = new ArgumentList;
4992  stringToArgumentList(mdef->argsString(),mdefAlComb);
4993  transferArgumentDocumentation(mdefAl,mdefAlComb);
4994  mdec->setArgumentList(mdefAlComb);
4995  }
4996  }
4997  else if (!mdec->documentation().isEmpty())
4998  {
4999  //printf("transferring docs mdec->mdef (%s->%s)\n",mdec->argsString(),mdef->argsString());
5000  mdef->setDocumentation(mdec->documentation(),mdec->docFile(),mdec->docLine());
5002  if (mdecAl!=0)
5003  {
5004  ArgumentList *mdecAlComb = new ArgumentList;
5005  stringToArgumentList(mdec->argsString(),mdecAlComb);
5006  transferArgumentDocumentation(mdecAl,mdecAlComb);
5007  mdef->setDeclArgumentList(mdecAlComb);
5008  }
5009  }
5010  if (!mdef->inbodyDocumentation().isEmpty())
5011  {
5012  mdec->setInbodyDocumentation(mdef->inbodyDocumentation(),mdef->inbodyFile(),mdef->inbodyLine());
5013  }
5014  else if (!mdec->inbodyDocumentation().isEmpty())
5015  {
5016  mdef->setInbodyDocumentation(mdec->inbodyDocumentation(),mdec->inbodyFile(),mdec->inbodyLine());
5017  }
5018  if (mdec->getStartBodyLine()!=-1 && mdef->getStartBodyLine()==-1)
5019  {
5020  //printf("body mdec->mdef %d-%d\n",mdec->getStartBodyLine(),mdef->getEndBodyLine());
5021  mdef->setBodySegment(mdec->getStartBodyLine(),mdec->getEndBodyLine());
5022  mdef->setBodyDef(mdec->getBodyDef());
5023  //mdef->setBodyMember(mdec);
5024  }
5025  else if (mdef->getStartBodyLine()!=-1 && mdec->getStartBodyLine()==-1)
5026  {
5027  //printf("body mdef->mdec %d-%d\n",mdef->getStartBodyLine(),mdec->getEndBodyLine());
5028  mdec->setBodySegment(mdef->getStartBodyLine(),mdef->getEndBodyLine());
5029  mdec->setBodyDef(mdef->getBodyDef());
5030  //mdec->setBodyMember(mdef);
5031  }
5034 
5035 
5036  // copy group info.
5037  if (mdec->getGroupDef()==0 && mdef->getGroupDef()!=0)
5038  {
5039  mdec->setGroupDef(mdef->getGroupDef(),
5040  mdef->getGroupPri(),
5041  mdef->docFile(),
5042  mdef->docLine(),
5043  mdef->hasDocumentation(),
5044  mdef
5045  );
5046  }
5047  else if (mdef->getGroupDef()==0 && mdec->getGroupDef()!=0)
5048  {
5049  mdef->setGroupDef(mdec->getGroupDef(),
5050  mdec->getGroupPri(),
5051  mdec->docFile(),
5052  mdec->docLine(),
5053  mdec->hasDocumentation(),
5054  mdec
5055  );
5056  }
5057 
5058 
5059  mdec->mergeRefItems(mdef);
5060  mdef->mergeRefItems(mdec);
5061 
5062  mdef->setMemberDeclaration(mdec);
5063  mdec->setMemberDefinition(mdef);
5064 
5065  mdef->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
5066  mdef->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
5067  mdec->enableCallGraph(mdec->hasCallGraph() || mdef->hasCallGraph());
5068  mdec->enableCallerGraph(mdec->hasCallerGraph() || mdef->hasCallerGraph());
5069  }
5070  }
5071 }
5072 
5074 {
5075  if (m_impl->templateMaster)
5076  {
5077  return m_impl->templateMaster->briefDescription(abbr);
5078  }
5079  else
5080  {
5081  return Definition::briefDescription(abbr);
5082  }
5083 }
5084 
5086 {
5087  if (m_impl->templateMaster)
5088  {
5089  return m_impl->templateMaster->documentation();
5090  }
5091  else
5092  {
5093  return Definition::documentation();
5094  }
5095 }
5096 
5098 {
5099  return m_impl->typeConstraints;
5100 }
5101 
5103 {
5104  static bool hideFriendCompounds = Config_getBool("HIDE_FRIEND_COMPOUNDS");
5105  bool isFriendToHide = hideFriendCompounds &&
5106  (m_impl->type=="friend class" ||
5107  m_impl->type=="friend struct" ||
5108  m_impl->type=="friend union");
5109  return isFriendToHide;
5110 }
5111 
5113 {
5114  return !(isFriend() && isFriendToHide());
5115 }
5116 
5118 {
5119  return isFunction() || isSlot() || isSignal();
5120 }
5121 
5123 {
5124  return isRelated() || isForeign() || (isFriend() && !isFriendToHide());
5125 }
5126 
5128 {
5129  return Definition::isReference() ||
5131 }
5132 
QCString initializer
Definition: memberdef.cpp:505
static const uint64 Gettable
Definition: entry.h:147
ArgumentList * typeConstraints
Definition: memberdef.cpp:520
QCString convertToXML(const char *s)
Definition: util.cpp:5717
void startMemberItem(const char *anchor, int i1, const char *id=0)
Definition: outputlist.h:218
void startParameterType(bool first, const char *key)
Definition: outputlist.h:418
bool isFinal() const
Definition: memberdef.cpp:4280
virtual QCString trExamples()=0
CompoundType compoundType() const
Definition: classdef.cpp:4394
virtual QCString trCallerGraph()=0
QCString type
Definition: arguments.h:67
bool isMaybeAmbiguous() const
Definition: memberdef.cpp:4422
static void writeExceptionListImpl(OutputList &ol, ClassDef *cd, MemberDef *md, QCString const &exception)
Definition: memberdef.cpp:374
void endMemberDeclaration(const char *anchor, const char *inheritId)
Definition: outputlist.h:314
void writeLatexSpacing()
Definition: outputlist.h:272
bool anonymousDeclShown() const
Definition: memberdef.cpp:4547
bool resize(uint newlen)
Definition: qcstring.h:225
bool isReadable() const
Definition: memberdef.cpp:4270
bool isAddable() const
Definition: memberdef.cpp:4255
char * rawData() const
Definition: qcstring.h:216
ClassDef * cachedAnonymousType
Definition: memberdef.cpp:525
void setArgumentList(ArgumentList *al)
Definition: memberdef.cpp:3876
QCString docFile() const
Definition: types.h:38
bool isProperty() const
Definition: memberdef.cpp:4185
QCString anchor() const
Definition: filedef.h:86
void setMemberType(MemberType t)
Definition: memberdef.cpp:4613
bool isDocsForDefinition() const
Definition: memberdef.cpp:4482
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
void findSectionsInDocumentation()
Definition: memberdef.cpp:3918
void setRelatedAlso(ClassDef *cd)
Definition: memberdef.cpp:4713
void setType(const char *t)
Definition: memberdef.cpp:3902
void append(const MemberDef *md)
Definition: memberlist.cpp:246
bool hasDocumentation() const
Definition: arguments.cpp:8
QCString header() const
Definition: membergroup.h:47
void writeDocumentation(MemberList *ml, OutputList &ol, const char *scopeName, Definition *container, bool inGroup, bool showEnumValues=FALSE, bool showInline=FALSE)
Definition: memberdef.cpp:2526
bool isOptional() const
Definition: memberdef.cpp:4310
QCString cachedResolvedType
Definition: memberdef.cpp:543
bool isDetailedSectionVisible(bool inGroup, bool inFile) const
Definition: memberdef.cpp:1920
static const uint64 NonAtomic
Definition: entry.h:161
bool isBound() const
Definition: memberdef.cpp:4397
static const uint64 Published
Definition: entry.h:182
MemberType mtype
Definition: memberdef.cpp:511
void endMemberItem()
Definition: outputlist.h:220
void setDefinition(const char *d)
Definition: memberdef.cpp:4619
void insertEnumField(MemberDef *md)
Definition: memberdef.cpp:909
This class represents an function or template argument list.
Definition: arguments.h:82
virtual QCString trDefineValue()=0
bool isTypedefValCached() const
Definition: memberdef.cpp:4572
QList< ArgumentList > * copyArgumentLists(const QList< ArgumentList > *srcLists)
Definition: util.cpp:6205
bool isLinkableInProject() const
Definition: classdef.cpp:2707
MemberDef * annEnumType
Definition: memberdef.cpp:479
static QCString scope
Definition: declinfo.cpp:668
void setFromAnonymousMember(MemberDef *m)
Definition: memberdef.cpp:4755
void setEnumBaseType(const QCString &type)
Definition: memberdef.cpp:4816
bool isMutable() const
Definition: memberdef.cpp:4220
void setReimplements(MemberDef *md)
Definition: memberdef.cpp:860
MemberDef * reimplements() const
Definition: memberdef.cpp:878
bool matchArguments2(Definition *srcScope, FileDef *srcFileScope, ArgumentList *srcAl, Definition *dstScope, FileDef *dstFileScope, ArgumentList *dstAl, bool checkCV)
Definition: util.cpp:3647
Definition: types.h:38
void combineDeclarationAndDefinition(MemberDef *mdec, MemberDef *mdef)
Definition: memberdef.cpp:4946
bool isCopy() const
Definition: memberdef.cpp:4325
bool isFunctionPtr() const
Definition: memberdef.cpp:4165
bool hasMultiLineInitializer() const
Definition: memberdef.cpp:3460
bool brief
virtual QCString getReference() const
MemberDef * docProvider
Definition: memberdef.cpp:551
void setMemberDefinition(MemberDef *md)
Definition: memberdef.cpp:4786
bool isLinkable() const
Definition: filedef.h:117
void setHasDocumentedReturnType(bool b)
Definition: memberdef.cpp:4698
MemberList * reimplementedBy() const
Definition: memberdef.cpp:883
Definition: types.h:29
static QCString varName
void setFromAnonymousScope(bool b)
Definition: memberdef.cpp:4750
void inSort(const char *key, const T *d)
Definition: sortdict.h:197
bool isWeak() const
Definition: memberdef.cpp:4340
bool isTooBig() const
Definition: dot.cpp:3959
MemberDef * redefines
Definition: memberdef.cpp:482
void writeTagFile(FTextStream &)
Definition: memberdef.cpp:3580
bool isReference() const
Definition: memberdef.cpp:5127
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
QCString getReference() const
Definition: memberdef.cpp:1001
ClassDef * accessorClass
Definition: memberdef.cpp:493
void endLabels()
Definition: outputlist.h:471
void setTagInfo(TagInfo *i)
Definition: memberdef.cpp:3992
The QRegExp class provides pattern matching using regular expressions or wildcards.
Definition: qregexp.h:46
bool hasDocumentation() const
Definition: memberdef.cpp:3274
MemberList * redefinedBy
Definition: memberdef.cpp:483
bool isFriend() const
Definition: memberdef.cpp:4175
void msg(const char *fmt,...)
Definition: message.cpp:107
Grouping::GroupPri_t getGroupPri() const
Definition: memberdef.cpp:4100
void startDescTableTitle()
Definition: outputlist.h:374
static const uint64 Mutable
Definition: entry.h:145
MemberList * getSectionList(Definition *d) const
Definition: memberdef.cpp:3541
QCString displayName(bool=TRUE) const
Definition: filedef.h:80
uint length() const
Definition: qcstring.h:195
virtual QCString trEnumerationValues()=0
void setBodyDef(FileDef *fd)
bool livesInsideEnum() const
Definition: memberdef.cpp:4492
QCString displayName(bool=TRUE) const
void _writeCategoryRelation(OutputList &ol)
Definition: memberdef.cpp:2240
void makeRelated()
Definition: memberdef.cpp:4681
int contains(char c, bool cs=TRUE) const
Definition: qcstring.cpp:153
void insertReimplementedBy(MemberDef *md)
Definition: memberdef.cpp:865
void append(const type *d)
Definition: qlist.h:73
uchar m_isConstructorCached
Definition: memberdef.h:436
ClassDef * cachedTypedefValue
Definition: memberdef.cpp:541
QCString decl
Definition: memberdef.cpp:499
bool isEvent() const
Definition: memberdef.cpp:4190
bool isUNOProperty() const
Definition: memberdef.cpp:4387
ArgumentList * defArgList
Definition: memberdef.cpp:516
ClassDef * accessorClass() const
Definition: memberdef.cpp:3913
Definition: types.h:29
uint64 memSpec
Definition: memberdef.cpp:510
void _writeCallerGraph(OutputList &ol)
Definition: memberdef.cpp:2081
bool visibleMemberGroup(bool hideNoHeader)
Definition: memberdef.cpp:3295
Abstract interface for programming language parsers.
Definition: parserintf.h:38
bool isNonAtomic() const
Definition: memberdef.cpp:4320
bool isSimple() const
Definition: classdef.cpp:4584
void setMemberGroup(MemberGroup *grp)
Definition: memberdef.cpp:3290
Protection protection() const
Definition: memberdef.cpp:4120
static const uint64 Abstract
Definition: entry.h:151
QCString getOutputFileBase() const
QList< ListItemInfo > * xrefListItems() const
Protection prot
Definition: memberdef.cpp:498
Definition: types.h:26
static QCString htmlFileExtension
Definition: doxygen.h:130
void writeString(const char *text)
Definition: outputlist.h:119
bool isPrototype() const
Definition: memberdef.cpp:4507
void startCodeFragment()
Definition: outputlist.h:244
int findRef(const type *d) const
Definition: qlist.h:89
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
void writeSourceReffedBy(OutputList &ol, const char *scopeName)
QCString inbodyDocumentation() const
bool visited
Definition: memberdef.h:398
void writeNonBreakableSpace(int num)
Definition: outputlist.h:368
type * first()
Definition: qinternallist.h:87
#define qsnprintf
Definition: qcstring.h:73
void startIndent()
Definition: outputlist.h:330
QCString defval
Definition: arguments.h:71
const char * bitfieldString() const
Definition: memberdef.cpp:4050
static const uint64 Sealed
Definition: entry.h:157
void disableAllBut(OutputGenerator::OutputType o)
Definition: outputlist.cpp:49
static const uint64 Settable
Definition: entry.h:146
void setAnchor()
Definition: memberdef.cpp:3334
char & at(uint i) const
Definition: qcstring.h:326
void startParagraph()
Definition: outputlist.h:115
void lineBreak(const char *style=0)
Definition: outputlist.h:302
MemberDef * memDec
Definition: memberdef.cpp:486
FileDef * getBodyDef() const
virtual bool hasDocumentation() const
void setTemplateSpecialization(bool b)
Definition: memberdef.cpp:4676
void writePageRef(OutputDocInterface &od, const char *cn, const char *mn)
Definition: util.cpp:247
bool isRequired() const
Definition: memberdef.cpp:4315
void startInlineMemberDoc()
Definition: outputlist.h:462
void addIndexItem(const char *s1, const char *s2)
Definition: outputlist.h:338
virtual void setOuterScope(Definition *d)
bool hasCallerGraph
Definition: memberdef.cpp:569
bool hasDocumentedReturnType
Definition: memberdef.cpp:560
void enableCallGraph(bool e)
Definition: memberdef.cpp:3923
GroupDef * group
Definition: memberdef.cpp:534
void endInlineMemberDoc()
Definition: outputlist.h:464
QCString stripAnonymousNamespaceScope(const QCString &s)
Definition: util.cpp:218
static const uint64 Weak
Definition: entry.h:166
bool isLinkableInProject() const
Definition: groupdef.cpp:1640
bool fromAnonymousScope() const
Definition: memberdef.cpp:4542
void endDescForItem()
Definition: outputlist.h:284
const bool FALSE
Definition: qglobal.h:370
void writeTypeConstraints(OutputList &ol, Definition *d, ArgumentList *al)
Definition: util.cpp:7585
bool isTemplateSpecialization() const
Definition: memberdef.cpp:4443
Definition: types.h:26
MemberDef * templateMaster() const
Definition: memberdef.cpp:4567
bool protectionVisible() const
void warn_doc_error(const char *file, int line, const char *fmt,...)
Definition: message.cpp:210
static const uint64 ProtectedGettable
Definition: entry.h:140
MemberList * enumFieldList() const
Definition: memberdef.cpp:4497
bool isLinkableInProject() const
Definition: memberdef.cpp:1150
void addListReference(Definition *d)
Definition: memberdef.cpp:3481
void setMemberGroupId(int id)
Definition: memberdef.cpp:4740
virtual QCString trProvidedByCategory()=0
MemberDef * annMemb
Definition: memberdef.cpp:514
void startMemberDescription(const char *anchor, const char *inheritId=0)
Definition: outputlist.h:308
virtual QCString trImplementedFromList(int numEntries)=0
void endEmphasis()
Definition: outputlist.h:257
QCString anc
Definition: memberdef.cpp:496
void endInlineMemberType()
Definition: outputlist.h:456
void startEmphasis()
Definition: outputlist.h:255
GroupPri_t
Definition: types.h:64
static const uint64 MaybeDefault
Definition: entry.h:180
static const uint64 NoExcept
Definition: entry.h:172
uchar m_isDestructorCached
Definition: memberdef.h:437
QCString def
Definition: memberdef.cpp:495
void setNamespace(NamespaceDef *nd)
Definition: memberdef.cpp:3400
void enableCallerGraph(bool e)
Definition: memberdef.cpp:3929
Definition: entry.h:50
MemberType
Definition: types.h:195
QCString left(uint len) const
Definition: qcstring.cpp:213
bool isDefine() const
Definition: memberdef.cpp:4170
bool stripPrefix(const char *prefix)
Definition: qcstring.cpp:201
void setArgsString(const char *as)
Definition: memberdef.cpp:4708
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
static const uint64 Assign
Definition: entry.h:164
static bool suppressDocWarnings
Definition: doxygen.h:142
int briefLine() const
void setPrototype(bool p)
Definition: memberdef.cpp:4735
virtual bool isReference() const
bool isEnabled(OutputGenerator::OutputType o)
Definition: outputlist.cpp:99
bool protectionLevelVisible(Protection prot)
Definition: util.cpp:8098
bool isSignal() const
Definition: memberdef.cpp:4130
void writeLink(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool onlyText=FALSE)
Definition: memberdef.cpp:1183
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
bool isSlot() const
Definition: memberdef.cpp:4135
QCString header
Definition: membergroup.h:147
void exceptionEntry(const char *prefix, bool closeBracket)
Definition: outputlist.h:430
init
Definition: train.py:42
void init(Definition *def, const char *t, const char *a, const char *e, Protection p, Specifier v, bool s, Relationship r, MemberType mt, const ArgumentList *tal, const ArgumentList *al)
Definition: memberdef.cpp:608
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
Grouping::GroupPri_t grouppri
Definition: memberdef.cpp:535
int count() const
Definition: sortdict.h:284
static const uint64 Default
Definition: entry.h:170
bool isImplementation() const
Definition: memberdef.cpp:4433
bool isFunctionOrSignalSlot() const
Definition: memberdef.cpp:5117
QCString extraTypeChars
Definition: memberdef.cpp:506
bool isVariable() const
Definition: memberdef.cpp:4140
void setReadAccessor(const char *r)
Definition: memberdef.cpp:4666
QCString bitfields
Definition: memberdef.cpp:501
bool isAbstract() const
Definition: memberdef.cpp:4305
static bool isMisc(const MemberDef *mdef)
void _writeEnumValues(OutputList &ol, Definition *container, const QCString &cfname, const QCString &ciname, const QCString &cname)
Definition: memberdef.cpp:2314
MemberDef * getGroupAlias() const
Definition: memberdef.cpp:4608
static void writeExceptionList(OutputList &ol, ClassDef *cd, MemberDef *md)
Definition: memberdef.cpp:413
virtual QCString trGlobal(bool first_capital, bool singular)=0
void warn_undoc(const char *file, int line, const char *fmt,...)
Definition: message.cpp:202
virtual QCString displayName(bool includeScope=TRUE) const =0
bool hasCallerGraph() const
Definition: memberdef.cpp:4562
void startAnonTypeScope(int i1)
Definition: outputlist.h:214
bool isInline() const
Definition: memberdef.cpp:4210
void append(const char *key, const T *d)
Definition: sortdict.h:135
bool isObjCProperty() const
Definition: memberdef.cpp:3962
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
Definition: types.h:26
void setInheritsDocsFrom(MemberDef *md)
Definition: memberdef.cpp:4703
QCString getReference() const
Definition: classdef.cpp:3814
int findRev(char c, int index=-1, bool cs=TRUE) const
Definition: qcstring.cpp:95
void _writeReimplementedBy(OutputList &ol)
Definition: memberdef.cpp:2165
Definition: types.h:29
bool isBaseClass(ClassDef *bcd, bool followInstances, int level=0)
Definition: classdef.cpp:2777
MemberDef * memberDefinition() const
Definition: memberdef.cpp:4593
void startTextLink(const char *file, const char *anchor)
Definition: outputlist.h:159
ArgumentList * declArgumentList() const
Definition: memberdef.cpp:4517
virtual void setInbodyDocumentation(const char *d, const char *docFile, int docLine)
Definition: definition.cpp:711
void startParameterName(bool one)
Definition: outputlist.h:422
void startInlineMemberType()
Definition: outputlist.h:454
QCString removeAnonymousScopes(const QCString &s)
Definition: util.cpp:164
bool isUnretained() const
Definition: memberdef.cpp:4357
void setExplicitExternal(bool b)
Definition: memberdef.cpp:4661
unsigned char uchar
Definition: nybbler.cc:11
bool parseText(const QCString &textStr)
Definition: outputlist.cpp:175
void endParameterName(bool last, bool one, bool bracket)
Definition: outputlist.h:424
void _writeExamples(OutputList &ol)
Definition: memberdef.cpp:2293
virtual QCString trSubprogram(bool first_capital, bool singular)=0
QCString getDefFileName() const
QCString getDefFileExtension() const
QCString anchor
Definition: entry.h:54
QCString copy() const
Definition: qcstring.h:250
void endCodeFragment()
Definition: outputlist.h:246
ClassDef * getClass(const char *n)
Definition: util.cpp:472
void invalidateTypedefValCache()
Definition: memberdef.cpp:4781
QCString canType
Definition: arguments.h:68
bool isNotFriend() const
Definition: memberdef.cpp:5112
MemberDef * memDef
Definition: memberdef.cpp:485
void writeDocAnchorsToTagFile(FTextStream &)
Definition: definition.cpp:520
bool constSpecifier
Definition: arguments.h:99
void warnIfUndocumented()
Definition: memberdef.cpp:3210
static const uint64 Raisable
Definition: entry.h:154
int getDefColumn() const
Definition: definition.h:191
static const uint64 Optional
Definition: entry.h:159
static const uint64 Explicit
Definition: entry.h:144
virtual QCString trInitialValue()=0
static bool parseSourcesNeeded
Definition: doxygen.h:131
bool isDocumentedFriendClass() const
Definition: memberdef.cpp:3259
QCString extractDirection(QCString &docs)
Definition: util.cpp:8342
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
bool hasCallGraph() const
Definition: memberdef.cpp:4557
void setHasDocumentedParams(bool b)
Definition: memberdef.cpp:4693
void mergeMemberSpecifiers(uint64 s)
Definition: memberdef.cpp:4643
#define Config_getInt(val)
Definition: config.cpp:661
QCString displayDefinition() const
Definition: memberdef.cpp:2403
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
Relationship
Definition: types.h:38
bool isDeleted() const
Definition: memberdef.cpp:3269
QCString substituteTemplateArgumentsInString(const QCString &name, ArgumentList *formalArgs, ArgumentList *actualArgs)
Definition: util.cpp:6099
static NamespaceDef * globalScope
Definition: doxygen.h:128
static const uint64 Inline
Definition: entry.h:143
QCString displayName(bool=TRUE) const
Definition: memberdef.cpp:4887
void endMemberDocPrefixItem()
Definition: outputlist.h:412
static ParserManager * parserManager
Definition: doxygen.h:141
void popGeneratorState()
Definition: outputlist.cpp:121
void setBitfields(const char *s)
Definition: memberdef.cpp:4648
void setGroupAlias(MemberDef *md)
Definition: memberdef.cpp:4776
virtual DefType definitionType() const =0
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
bool isExplicit() const
Definition: memberdef.cpp:4215
static const uint64 Strong
Definition: entry.h:165
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 endDescTable()
Definition: outputlist.h:372
void endBold()
Definition: outputlist.h:306
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition: util.cpp:8065
void endCallGraph(const DotCallGraph &g)
Definition: outputlist.h:392
QCString tagName
Definition: entry.h:52
Specifier virt
Definition: memberdef.cpp:497
uint count() const
Definition: qlist.h:66
void setDefinitionTemplateParameterLists(QList< ArgumentList > *lists)
Definition: memberdef.cpp:1174
MemberDef * templateMaster
Definition: memberdef.cpp:521
void makeImplementationDetail()
Definition: memberdef.cpp:4745
bool isNew() const
Definition: memberdef.cpp:4285
void copyArgumentNames(MemberDef *bmd)
Definition: memberdef.cpp:4836
static constexpr double as
Definition: Units.h:101
bool volatileSpecifier
Definition: arguments.h:101
void addIndexItem(Definition *context, MemberDef *md, const char *sectionAnchor=0, const char *title=0)
Definition: index.h:142
MemberDef * getEnumScope() const
Definition: memberdef.cpp:4487
void endParameterType()
Definition: outputlist.h:420
int close(int)
Closes the file descriptor fd.
static SearchIndexIntf * searchIndex
Definition: doxygen.h:133
void endParagraph()
Definition: outputlist.h:117
Q_EXPORT uint qstrlen(const char *str)
Definition: qcstring.h:81
bool docEnumValues
Definition: memberdef.cpp:565
static const uint64 Retain
Definition: entry.h:163
const QCString & name() const
Definition: definition.h:114
QCString accessorType
Definition: memberdef.cpp:492
void _computeIsDestructor()
Definition: memberdef.cpp:3714
bool isDetailedSectionLinkable() const
Definition: memberdef.cpp:1852
const double e
ClassDef * relatedAlso
Definition: memberdef.cpp:487
MemberDef * createTemplateInstanceMember(ArgumentList *formalArgs, ArgumentList *actualArgs)
Definition: memberdef.cpp:3406
bool hasDocumentedParams
Definition: memberdef.cpp:559
int getDefLine() const
Definition: definition.h:188
bool isEnumValue() const
Definition: memberdef.cpp:4150
void endInlineMemberName()
Definition: outputlist.h:460
QCString write
Definition: memberdef.cpp:503
static const uint64 Transient
Definition: entry.h:178
QCString inbodyFile() const
QCString exception
Definition: memberdef.cpp:504
fileName
Definition: dumpTree.py:9
QCString getCachedTypedefTemplSpec() const
Definition: memberdef.cpp:4582
ClassDef * category() const
Definition: memberdef.cpp:4796
QCString getScopeString() const
Definition: memberdef.cpp:3301
bool isRemovable() const
Definition: memberdef.cpp:4260
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
bool isTrivial() const
Definition: dot.cpp:3954
void setInbodyDocumentation(const char *d, const char *inbodyFile, int inbodyLine)
Definition: memberdef.cpp:1138
def key(type, name=None)
Definition: graph.py:13
QCString groupFileName
Definition: memberdef.cpp:536
void setMemberClass(ClassDef *cd)
Definition: memberdef.cpp:3392
QCString briefDescription(bool abbr=FALSE) const
Definition: memberdef.cpp:5073
bool hasBriefDescription() const
bool isEmpty() const
Definition: qlist.h:67
void MD5Buffer(const unsigned char *buf, unsigned int len, unsigned char sig[16])
Definition: md5.c:275
void moveTo(Definition *)
Definition: memberdef.cpp:832
MemberDef * enumScope
Definition: memberdef.cpp:477
ClassDef * relatedAlso() const
Definition: memberdef.cpp:4467
QCString right(uint len) const
Definition: qcstring.cpp:231
MemberDef * groupMember
Definition: memberdef.cpp:538
void inSort(const MemberDef *md)
Definition: memberlist.cpp:241
SrcLangExt getLanguage() const
std::void_t< T > n
void startDescForItem()
Definition: outputlist.h:282
const char * getWriteAccessor() const
Definition: memberdef.cpp:4090
static void transferArgumentDocumentation(ArgumentList *decAl, ArgumentList *defAl)
Definition: memberdef.cpp:4919
QCString explicitOutputFileBase
Definition: memberdef.cpp:554
const double a
static const uint64 Alias
Definition: entry.h:168
virtual void addWord(const char *word, bool hiPriority)=0
FileDef * fileDef
Definition: memberdef.cpp:474
void writeChar(char c)
Definition: outputlist.h:259
static int s_indentLevel
Definition: memberdef.h:425
static const uint64 Addable
Definition: entry.h:152
MemberDef * inheritsDocsFrom() const
Definition: memberdef.cpp:4603
void startDescTableData()
Definition: outputlist.h:378
QCString anchor() const
Definition: classdef.cpp:4606
bool isForeign() const
Definition: memberdef.cpp:4200
static const uint64 New
Definition: entry.h:156
static bool writeVHDLTypeDocumentation(const MemberDef *mdef, const Definition *d, OutputList &ol)
Specifier
Definition: types.h:29
bool docsForDefinition
Definition: memberdef.cpp:573
MemberList * enumFields
Definition: memberdef.cpp:480
QList< ArgumentList > * definitionTemplateParameterLists() const
Definition: memberdef.cpp:4527
void setTemplateMaster(MemberDef *mt)
Definition: memberdef.cpp:4765
bool livesInsideEnum
Definition: memberdef.cpp:478
void startDescTable(const char *title)
Definition: outputlist.h:370
ArgumentList * declArgList
Definition: memberdef.cpp:517
ClassDef * category
Definition: memberdef.cpp:576
void stringToArgumentList(const char *argsString, ArgumentList *al, QCString *extraTypeChars)
Definition: defargs.cpp:2922
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
bool isWritable() const
Definition: memberdef.cpp:4275
bool isAssign() const
Definition: memberdef.cpp:4330
p
Definition: test.py:223
bool isConstructor() const
Definition: memberdef.cpp:3702
void disable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:79
bool isSettable() const
Definition: memberdef.cpp:4240
bool isFriendClass() const
Definition: memberdef.cpp:3252
void append(const type *d)
Definition: qinternallist.h:61
void setProtection(Protection p)
Definition: memberdef.cpp:4632
bool isLinkable() const
QCString id() const
Definition: definition.cpp:413
void _writeReimplements(OutputList &ol)
Definition: memberdef.cpp:2106
A bunch of utility functions.
void endDescTableTitle()
Definition: outputlist.h:376
bool isInitonly() const
Definition: memberdef.cpp:4300
void startParameterList(bool openBracket)
Definition: outputlist.h:426
const char * data() const
Definition: qcstring.h:207
virtual bool hasUserDocumentation() const
bool isPublished() const
Definition: memberdef.cpp:4427
bool isConstrained() const
Definition: memberdef.cpp:4402
ArgumentList * tArgList
Definition: memberdef.cpp:519
bool isLinkable() const
Definition: classdef.cpp:2729
QCString anchor() const
Definition: memberdef.cpp:1031
General LArSoft Utilities.
void setAccessorType(ClassDef *cd, const char *t)
Definition: memberdef.cpp:3907
type * current() const
Definition: qlist.h:146
void endParameterList()
Definition: outputlist.h:428
bool isGettable() const
Definition: memberdef.cpp:4225
ClassDef * classDef
Definition: memberdef.cpp:473
string tmp
Definition: languages.py:63
bool isStrong() const
Definition: memberdef.cpp:4345
void writeDoc(DocRoot *root, Definition *ctx, MemberDef *md)
Definition: outputlist.cpp:162
static QIntDict< MemberGroupInfo > memGrpInfoDict
Definition: doxygen.h:126
bool isStrongEnumValue() const
Definition: memberdef.cpp:4350
void enable(OutputGenerator::OutputType o)
Definition: outputlist.cpp:89
#define Config_getBool(val)
Definition: config.cpp:664
void setReference(const char *r)
const char * definition() const
Definition: memberdef.cpp:4025
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
MemberGroup * memberGroup
Definition: memberdef.cpp:533
static const uint64 Removable
Definition: entry.h:153
bool isPrivateGettable() const
Definition: memberdef.cpp:4230
void setSectionList(Definition *d, MemberList *sl)
Definition: memberdef.cpp:3548
static const uint64 Required
Definition: entry.h:160
bool isDefault() const
Definition: memberdef.cpp:4367
QCString briefFile() const
MemberDef * categoryRelation() const
Definition: memberdef.cpp:4806
type * getFirst() const
Definition: qlist.h:95
static const uint64 Property
Definition: entry.h:174
QCString type
Definition: memberdef.cpp:491
QCString anchor
Definition: example.h:30
bool isObjCMethod() const
Definition: memberdef.cpp:3956
uint64 getMemberSpecifiers() const
Definition: memberdef.cpp:4065
bool isDelete() const
Definition: memberdef.cpp:4372
virtual QCString qualifiedName() const
static const uint64 Override
Definition: entry.h:155
void startBold()
Definition: outputlist.h:304
void setAnonymousEnumType(MemberDef *md)
Definition: memberdef.cpp:4730
type * next()
Definition: qinternallist.h:89
void warn(const char *file, int line, const char *fmt,...)
Definition: message.cpp:183
void writeMemberDocSimple(OutputList &ol, Definition *container)
Definition: memberdef.cpp:3096
void makeForeign()
Definition: memberdef.cpp:4687
ClassDef * getCachedTypedefVal() const
Definition: memberdef.cpp:4577
void startSimpleSect(SectionTypes t, const char *file, const char *anchor, const char *title)
Definition: outputlist.h:321
MemberDef * fromAnonymousMember() const
Definition: memberdef.cpp:4760
static bool writeDefArgumentList(OutputList &ol, Definition *scope, MemberDef *md)
Definition: memberdef.cpp:121
void err(const char *fmt,...)
Definition: message.cpp:226
void _writeGroupInclude(OutputList &ol, bool inGroup)
Definition: memberdef.cpp:2482
bool hasDocumentedReturnType() const
Definition: memberdef.cpp:4453
void writeSourceRefs(OutputList &ol, const char *scopeName)
QCString name
Definition: example.h:31
void startDoxyAnchor(const char *fName, const char *manName, const char *anchor, const char *name, const char *args)
Definition: outputlist.h:266
bool isReadonly() const
Definition: memberdef.cpp:4392
MemberType memberType() const
Definition: memberdef.cpp:4125
virtual QCString trMore()=0
int inbodyLine() const
virtual QCString briefDescription(bool abbreviate=FALSE) const
virtual QCString trExtendsClass()=0
const char * declaration() const
Definition: memberdef.cpp:4020
void setTypeConstraints(ArgumentList *al)
Definition: memberdef.cpp:3888
void startMemberDoc(const char *clName, const char *memName, const char *anchor, const char *title, bool showInline)
Definition: outputlist.h:261
QCString read
Definition: memberdef.cpp:502
bool isFriendToHide() const
Definition: memberdef.cpp:5102
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
static const uint64 Attribute
Definition: entry.h:173
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
QCString getOutputFileBase() const
Definition: filedef.h:83
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 setDocumentedEnumValues(bool value)
Definition: memberdef.cpp:4725
void setDocsForDefinition(bool b)
Definition: memberdef.cpp:4771
ClassDef * categoryOf() const
Definition: classdef.cpp:4514
bool hasDocumentedParams() const
Definition: memberdef.cpp:4448
void setMemberSpecifiers(uint64 s)
Definition: memberdef.cpp:4638
TFile * inFile
Definition: makeDST.cxx:36
void endMemberDoc(bool hasArgs)
Definition: outputlist.h:264
static void invalidateCachedTypesInArgumentList(ArgumentList *al)
Definition: memberdef.cpp:4866
QCString getOutputFileBase() const
Definition: classdef.cpp:3533
bool hasOneLineInitializer() const
Definition: memberdef.cpp:3451
MemberDef * groupAlias
Definition: memberdef.cpp:531
QCString args
Definition: memberdef.cpp:494
const char * getGroupFileName() const
Definition: memberdef.cpp:4105
bool hasExamples()
Definition: memberdef.cpp:933
void writeEnumDeclaration(OutputList &typeDecl, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd)
Definition: memberdef.cpp:3754
MemberGroup * getMemberGroup() const
Definition: memberdef.cpp:4537
static const uint64 Constrained
Definition: entry.h:177
void setCategory(ClassDef *)
Definition: memberdef.cpp:4801
virtual Definition * getOuterScope() const
QCString documentation() const
Definition: memberdef.cpp:5085
QCString enumBaseType
Definition: memberdef.cpp:507
bool isMaybeVoid() const
Definition: memberdef.cpp:4412
bool isHidden() const
int getEndBodyLine() const
void startInlineMemberName()
Definition: outputlist.h:458
GroupDef * getGroupDef() const
Definition: memberdef.cpp:4095
QCString attrib
Definition: arguments.h:66
static const uint64 Unretained
Definition: entry.h:167
static bool userComments
Definition: doxygen.h:148
virtual QCString trReimplementedFromList(int numEntries)=0
void _writeTypeConstraints(OutputList &ol)
Definition: memberdef.cpp:2306
ArgumentList * argumentList() const
Definition: memberdef.cpp:4512
static const uint64 Initonly
Definition: entry.h:158
bool showInCallGraph() const
Definition: memberdef.cpp:4458
const char * getReadAccessor() const
Definition: memberdef.cpp:4085
MemberDef * deepCopy() const
Definition: memberdef.cpp:758
MemberDef * memberDeclaration() const
Definition: memberdef.cpp:4598
void startMemberTemplateParams()
Definition: outputlist.h:222
void _addToSearchIndex()
Definition: memberdef.cpp:4892
void setMaxInitLines(int lines)
Definition: memberdef.cpp:4653
QCString qualifiedName() const
Definition: memberdef.cpp:3968
int getStartBodyLine() const
void writeInlineCode(OutputList &ol, const char *scopeName)
int initializerLines() const
Definition: memberdef.cpp:4060
void MD5SigToString(unsigned char signature[16], char *str, int len)
Definition: md5.c:285
void startTypewriter()
Definition: outputlist.h:172
QCString tempArgListToString(ArgumentList *al, SrcLangExt lang)
Definition: util.cpp:2197
bool isDeleted
Definition: arguments.h:107
static const uint64 Bound
Definition: entry.h:176
void writeSourceDef(OutputList &ol, const char *scopeName)
Definition: definition.cpp:918
bool isAlias() const
Definition: memberdef.cpp:4362
static const uint64 PrivateSettable
Definition: entry.h:141
const char * extraTypeChars() const
Definition: memberdef.cpp:4030
static const uint64 Readonly
Definition: entry.h:175
static const uint64 Writable
Definition: entry.h:149
bool isOverride() const
Definition: memberdef.cpp:4295
void endDoxyAnchor(const char *fn, const char *anchor)
Definition: outputlist.h:270
int getMemberGroupId() const
Definition: memberdef.cpp:4532
bool isRetain() const
Definition: memberdef.cpp:4335
QCString getCachedResolvedTypedef() const
Definition: memberdef.cpp:4587
const QCString & initializer() const
Definition: memberdef.cpp:4055
const char * excpString() const
Definition: memberdef.cpp:4045
QCString objCMethodName(bool localLink, bool showStatic) const
Definition: memberdef.cpp:4003
bool isDCOP() const
Definition: memberdef.cpp:4180
uint toUInt(bool *ok=0) const
Definition: qcstring.cpp:445
MemberDef * getAnonymousEnumType() const
Definition: memberdef.cpp:4477
void setEnumScope(MemberDef *md, bool livesInsideEnum=FALSE)
Definition: memberdef.cpp:3377
void setInitializer(const char *i)
Definition: memberdef.cpp:3470
void setMemberDeclaration(MemberDef *md)
Definition: memberdef.cpp:4791
QCString name
Definition: arguments.h:69
QCString getDeclType() const
Definition: memberdef.cpp:1383
void endMemberDocName()
Definition: outputlist.h:416
virtual void setBriefDescription(const char *b, const char *briefFile, int briefLine)
Definition: definition.cpp:687
QCString fieldType() const
Definition: memberdef.cpp:3084
MemberDef * categoryRelation
Definition: memberdef.cpp:577
void enableAll()
Definition: outputlist.cpp:59
QCString fileName
Definition: entry.h:53
static QCString type
Definition: declinfo.cpp:672
void mergeRefItems(Definition *d)
virtual void setCurrentDoc(Definition *ctx, const char *anchor, bool isSourceFile)=0
QCString getOutputFileBase() const
Definition: memberdef.cpp:941
virtual QCString trReimplementedInList(int numEntries)=0
const ArgumentList * typeConstraints() const
Definition: memberdef.cpp:5097
void setAnonymousUsed()
Definition: memberdef.cpp:4552
void endAnonTypeScope(int i1)
Definition: outputlist.h:216
void endIndent()
Definition: outputlist.h:332
void setEnumClassScope(ClassDef *cd)
Definition: memberdef.cpp:4718
void endMemberDescription()
Definition: outputlist.h:310
void cacheTypedefVal(ClassDef *val, const QCString &templSpec, const QCString &resolvedType)
Definition: memberdef.cpp:4827
ClassDef * getClassDefOfAnonymousType()
Definition: memberdef.cpp:1236
QCString trailingReturnType
Definition: arguments.h:105
void setDeclArgumentList(ArgumentList *al)
Definition: memberdef.cpp:3882
static bool * b
Definition: config.cpp:1043
bool isPrivateSettable() const
Definition: memberdef.cpp:4245
bool isMaybeDefault() const
Definition: memberdef.cpp:4417
void invalidateCachedArgumentTypes()
Definition: memberdef.cpp:4879
NamespaceDef * getNamespaceDef() const
Definition: memberdef.cpp:4080
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
Protection
Definition: types.h:26
Translator * theTranslator
Definition: language.cpp:157
ArgumentList * deepCopy() const
Definition: arguments.cpp:20
int getGroupStartLine() const
Definition: memberdef.cpp:4110
void endSimpleSect()
Definition: outputlist.h:324
MemberDefImpl * m_impl
Definition: memberdef.h:434
virtual void setDocumentation(const char *d, const char *docFile, int docLine, bool stripWhiteSpace=TRUE)
Definition: definition.cpp:612
bool isId(int c)
Definition: util.h:224
ExampleSDict * exampleSDict
Definition: memberdef.cpp:489
QCString memberTypeName() const
Definition: memberdef.cpp:3188
bool isReimplementedBy(ClassDef *cd) const
Definition: memberdef.cpp:888
bool isFunction() const
Definition: memberdef.cpp:4160
bool isEmpty() const
Definition: docparser.h:1409
static void writeTemplatePrefix(OutputList &ol, ArgumentList *al)
Definition: memberdef.cpp:436
NamespaceDef * nspace
Definition: memberdef.cpp:475
void getTemplateParameterLists(QList< ArgumentList > &lists) const
Definition: classdef.cpp:3838
QCString enumBaseType() const
Definition: memberdef.cpp:4821
friend class Iterator
Definition: sortdict.h:289
float pi
Definition: units.py:11
bool isTypedefValCached
Definition: memberdef.cpp:540
bool hasDocumentedEnumValues() const
Definition: memberdef.cpp:4472
virtual QCString trImplementedInList(int numEntries)=0
bool addExample(const char *anchor, const char *name, const char *file)
Definition: memberdef.cpp:915
void setGroupDef(GroupDef *gd, Grouping::GroupPri_t pri, const QCString &fileName, int startLine, bool hasDocs, MemberDef *member=0)
Definition: memberdef.cpp:3363
list cmd
Definition: getreco.py:22
void setHidden(bool b)
Definition: memberdef.cpp:1144
static QCString baseName
Definition: scanner.cpp:10890
bool isRelated() const
Definition: memberdef.cpp:4195
int docLine() const
void endDescTableData()
Definition: outputlist.h:380
void docFindSections(const char *input, Definition *d, MemberGroup *mg, const char *fileName)
Definition: docparser.cpp:7434
void setWriteAccessor(const char *w)
Definition: memberdef.cpp:4671
const char * argsString() const
Definition: memberdef.cpp:4040
bool isLinkableInProject() const
bool isSealed() const
Definition: memberdef.cpp:4290
static void writeSource(MemberDef *mdef, OutputList &ol, QCString &cname)
QCString getOutputFileBase() const
Definition: groupdef.cpp:1512
static const uint64 PrivateGettable
Definition: entry.h:139
QCString lower() const
Definition: qcstring.cpp:263
bool isStatic() const
Definition: memberdef.cpp:4205
void setFileDef(FileDef *fd)
Definition: memberdef.cpp:4624
virtual QCString trCallGraph()=0
void _computeLinkableInProject()
Definition: memberdef.cpp:1054
void docify(const char *s)
Definition: outputlist.h:145
void insertMemberAlign(bool templ=FALSE)
Definition: outputlist.h:238
unsigned long long uint64
Definition: qglobal.h:361
uint count() const
Definition: qinternallist.h:56
bool isTypedef() const
Definition: memberdef.cpp:4155
T * find(const char *key)
Definition: sortdict.h:232
void linkifyText(const TextGeneratorIntf &out, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition: util.cpp:1916
bool isObjectiveC() const
Definition: classdef.cpp:4504
virtual QCString documentation() const
static QCString simplifyTypeForTable(const QCString &s)
Definition: memberdef.cpp:3022
if(!yymsg) yymsg
static const uint64 ProtectedSettable
Definition: entry.h:142
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
bool isExternal() const
Definition: memberdef.cpp:4438
bool isRaisable() const
Definition: memberdef.cpp:4265
unsigned uint
Definition: qglobal.h:351
void setAutoDelete(bool enable)
Definition: qlist.h:99
bool hasDocumentation() const
Definition: arguments.h:61
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
bool isLinkable() const
Definition: memberdef.cpp:1161
QAsciiDict< Entry > ns
void endTextLink()
Definition: outputlist.h:161
void setBriefDescription(const char *b, const char *briefFile, int briefLine)
Definition: memberdef.cpp:1132
const QCString & docName() const
Definition: filedef.h:99
static QCString addTemplateNames(const QCString &s, const QCString &n, const QCString &t)
Definition: memberdef.cpp:54
void endMemberTemplateParams(const char *anchor, const char *inheritId)
Definition: outputlist.h:224
type * toLast()
Definition: qlist.h:136
void _computeIsConstructor()
Definition: memberdef.cpp:3659
virtual QCString trMember(bool first_capital, bool singular)=0
QCString stripExtension(const char *fName)
Definition: util.cpp:6799
QCString file
Definition: example.h:32
static QCString * s
Definition: config.cpp:1042
bool isRelatedOrFriend() const
Definition: memberdef.cpp:5122
static const uint64 Copy
Definition: entry.h:162
QCString localName() const
const char * qPrint(const char *s)
Definition: qcstring.h:797
const bool TRUE
Definition: qglobal.h:371
void getLabels(QStrList &sl, Definition *container) const
Definition: memberdef.cpp:1938
QList< ArgumentList > * defTmpArgLists
Definition: memberdef.cpp:522
static IndexList * indexList
Definition: doxygen.h:149
QCString simplifyWhiteSpace() const
Definition: qcstring.cpp:323
bool isTransient() const
Definition: memberdef.cpp:4407
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
Relationship related
Definition: memberdef.cpp:562
ExampleSDict * getExamples() const
Definition: memberdef.cpp:4502
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
uchar m_isLinkableCached
Definition: memberdef.h:435
bool isProtectedSettable() const
Definition: memberdef.cpp:4250
QTextStream & endl(QTextStream &s)
bool isAttribute() const
Definition: memberdef.cpp:4382
QCString & append(const char *s)
Definition: qcstring.cpp:383
bool isEnumerate() const
Definition: memberdef.cpp:4145
void writeDeclaration(OutputList &ol, ClassDef *cd, NamespaceDef *nd, FileDef *fd, GroupDef *gd, bool inGroup, ClassDef *inheritFrom=0, const char *inheritId=0)
Definition: memberdef.cpp:1411
bool isNoExcept() const
Definition: memberdef.cpp:4377
ArgumentList * templateArguments() const
Definition: memberdef.cpp:4522
bool isDestructor() const
Definition: memberdef.cpp:3743
static const uint64 MaybeVoid
Definition: entry.h:179
void startMemberDocPrefixItem()
Definition: outputlist.h:410
QCString array
Definition: arguments.h:70
void startLabels()
Definition: outputlist.h:467
QCString cachedTypedefTemplSpec
Definition: memberdef.cpp:542
#define ASSERT(x)
Definition: qglobal.h:590
MemberDef(const char *defFileName, int defLine, int defColumn, const char *type, const char *name, const char *args, const char *excp, Protection prot, Specifier virt, bool stat, Relationship related, MemberType t, const ArgumentList *tal, const ArgumentList *al)
Definition: memberdef.cpp:736
bool getGroupHasDocs() const
Definition: memberdef.cpp:4115
QCString docs
Definition: arguments.h:72
void warn_uncond(const char *fmt,...)
Definition: message.cpp:218
void startCallGraph()
Definition: outputlist.h:390
SDict< MemberList > * classSectionSDict
Definition: memberdef.cpp:529
bool isProtectedGettable() const
Definition: memberdef.cpp:4235
void disableAll()
Definition: outputlist.cpp:69
void endTypewriter()
Definition: outputlist.h:174
virtual void setHidden(bool b)
static const uint64 Readable
Definition: entry.h:148
type * toFirst()
Definition: qlist.h:135
static const uint64 Delete
Definition: entry.h:171
void setCategoryRelation(MemberDef *)
Definition: memberdef.cpp:4811
void setBodySegment(int bls, int ble)
void _writeCallGraph(OutputList &ol)
Definition: memberdef.cpp:2055
static const uint64 MaybeAmbiguous
Definition: entry.h:181
virtual void resetCodeParserState()=0
static QCString trTypeString(uint64 type)
void startMemberDocName(bool align)
Definition: outputlist.h:414